One difference between uClibc and glibc

Jie Zhang jzhang918 at gmail.com
Thu Mar 23 07:51:53 UTC 2006


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.

Jie



More information about the uClibc mailing list