[PATCH V2] libc: deal with aux vect inside __uClibc_main only if !SHARED

Carmelo Amoroso carmelo73 at gmail.com
Sun May 19 17:15:45 UTC 2013


Il giorno 19/mag/2013 07:08, "Mike Frysinger" <vapier at gentoo.org> ha
scritto:
>
> 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;
>

Hello Mike

> 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:
>

This code fragment was actually in __uClibc_main.c so I'm wondering why
current HEAD is note failing ... I don't this id failing due to this patch

> 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

Likely we are missing some include in x86 case.
We'll try to re produce and fix.

> -mike
>
>

Thanks
Carmelo _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc


More information about the uClibc mailing list