One difference between uClibc and glibc

Jie Zhang jzhang918 at gmail.com
Thu Mar 23 12:34:48 UTC 2006


On 3/23/06, Rich Felker <dalias at aerifal.cx> wrote:
> On Thu, Mar 23, 2006 at 03:51:53PM +0800, Jie Zhang wrote:
> > On 3/23/06, Mike Frysinger <vapier at gentoo.org> wrote:
> > > On Thursday 23 March 2006 01:29, Jie Zhang wrote:
> > > > On 3/23/06, Mike Frysinger <vapier at gentoo.org> wrote:
> > > > > On Wednesday 22 March 2006 00:16, Jie Zhang wrote:
> > > > > > What do you think?
> > > > >
> > > > > this fix is fine for all versions of uClibc released thus far released,
> > > > > but i'm pretty sure (99%) that this isnt an issue for current uClibc svn
> > > > > (and thus for the next 0.9.29 release) ... since psm's changes to hide
> > > > > relocations against internal symbols in libc.so, snprintf() now calls an
> > > > > internal alias to vsnprintf() rather than having the symbol be processed
> > > > > at runtime ... same goes for all other such i/o functions ...
> > > >
> > > > But that's only for shared library.
> > >
> > > no, it's for all objects ... the libc_hidden_* macro's create aliases
> > > automatically for us ...
> > >
> > If you read /include/libc-symbols.h, you will see:
> >
> > #if !defined STATIC && !defined __BCC__
> > ...
> > #else /* SHARED */
> > ...
> > # define hidden_def(name)
> > # define hidden_data_def(name)
> > # define hidden_weak(name)
> > # define hidden_data_weak(name)
> > #endif /* SHARED */
> >
> > You can test it using i386 arch with both PIC and shared library options off.
>
> Even if these macros were defined 'correctly' for static libs, they
> would not do what you expect. This sort of hidden symbol hack only

No, I don't expect these macros do what I need. I just pointed out
that these macros are only defined to hide symbols when building
shared library.

Jie



More information about the uClibc mailing list