[PATCH V2] libc: deal with aux vect inside __uClibc_main only if !SHARED
Mike Frysinger
vapier at gentoo.org
Sun May 19 05:08:01 UTC 2013
On Friday 14 December 2012 05:40:05 Filippo ARCIDIACONO wrote:
> --- a/libc/misc/elf/dl-support.c
> +++ b/libc/misc/elf/dl-support.c
> @@ -28,6 +28,7 @@ void (*_dl_init_static_tls) (struct link_map *) =
> &_dl_nothread_init_static_tls;
>
> ElfW(Phdr) *_dl_phdr;
> size_t _dl_phnum;
> +size_t _dl_pagesize;
>
> void internal_function _dl_aux_init (ElfW(auxv_t) *av);
> void internal_function _dl_aux_init (ElfW(auxv_t) *av)
> @@ -37,6 +38,9 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av)
>
> /* Get the number of program headers from the aux vect */
> _dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val;
> +
> + /* Get the pagesize from the aux vect */
> + _dl_pagesize = (av[AT_PAGESZ].a_un.a_val) ? (size_t)
> av[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
you cannot use PAGE_SIZE. pretty much every arch has long ago removed that
from their kernel headers exported to userspace. and indeed, this breaks
building for at least x86:
libc/misc/elf/dl-support.c: In function '_dl_aux_init':
libc/misc/elf/dl-support.c:43:68: error: 'PAGE_SIZE' undeclared (first use in
this function)
_dl_pagesize = (av[AT_PAGESZ].a_un.a_val) ? (size_t)
av[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
^
libc/misc/elf/dl-support.c:43:68: note: each undeclared identifier is reported
only once for each function it appears in
make: *** [libc/misc/elf/dl-support.os] Error 1
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20130519/3159b819/attachment.asc>
More information about the uClibc
mailing list