lkml.org 
[lkml]   [2005]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Illegal use of reserved word in system.h
On Thu, 19 May 2005, Maciej W. Rozycki wrote:

> On Thu, 19 May 2005, Arjan van de Ven wrote:
>
>>> First off, I think we need a system-call that will return some of
>>> the information that now comes from headers. PAGE_SIZE comes to
>>> mind. You need this for mmap() but there doesn't seem to be any
>>> way to get it. getpagesize() 'C' library just returns something
>>> it's swiped from kernel headers when the library was compiled.
>>> There are other things like the following that sometimes need
>>
>> for getpagesize() I can see the point
>
> If that is the case, then that's a bug in that C library, which should be
> reported and fixed. When starting a program, i.e. as a result of
> execve(), Linux passes the current page size in use in the auxiliary
> vector. That value should be retrieved and used by a C library for
> platforms that support various page sizes and returned by library calls
> like getconf(). For example glibc gets it right.
>
> Maciej
>

Would you please explain 'auxiliary' vector???

According to the documentation, the following information
is passed to a program:

#
# %edx Contains a function pointer to be registered with `atexit'.
# This is how the dynamic linker arranges to have DT_FINI
# functions called for shared libraries that have been loaded
# before this code runs.
#
# %esp The stack contains the arguments and environment:
# (%esp) argc
# 4(%esp) argv[0]
# ...
# (4*argc)(%esp) NULL
# (4*(argc+1))(%esp) envp[0]
# ...
# NULL
#

Now, where is that 'auxiliary vevtor'??? I got a pointer to
something to be executed before calling exit, I have an
argument count, then a bunch of pointers (argv), terminating
with a NULL, then another bunch of pointers (envp) terminating
with a NULL. Is there something after that??? If so, what's
the contents of this thing?


Cheers,
Dick Johnson
Penguin : Linux version 2.6.11.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-19 15:09    [W:0.824 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site