One difference between uClibc and glibc

Peter S. Mazinger ps.m at gmx.net
Thu Mar 23 13:25:04 UTC 2006


On Thu, 23 Mar 2006, 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 */

STATIC means here, that we build only libc.a, but no libc.so (it is 
useless to have all duplicates if we do not build shared libs), but if 
both are built, the __GI_x internals are present in both libc.so and 
libc.a

glibc is diff, because it builds all the time 2 objects, one with 
duplicates for libc.so, another for libc.a, I have decided to do that only 
where it is necessary (.oS for libc.so and .os/.o for libc.a depending on 
DOPIC), else the build will take twice the time. 

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list