[uClibc] Proposal adding -z defs by default

Peter S. Mazinger ps.m at gmx.net
Wed Nov 3 17:39:20 UTC 2004


On Wed, 3 Nov 2004, Joakim Tjernlund wrote:

> > On Wed Nov 03, 2004 at 09:38:43AM +0100, Joakim Tjernlund wrote:
> > > > > Yes, unless I am mistaken, ld complain that main is undefined in __uClibc_main.c. Making it weak
> > > > > will shut up ld and resolve to NULL iff no main function is found elsewere. That would also mean that
> > > > > if you try ty build an exec and forget to define main, you will probably NOT get a compliant from ld
> > > > > about missing main function.
> > > > 
> > > > Then I wouldn't add that ;-(, it would introduce probably more trouble.
> > > > 
> > > > Would you accept a patch that ignores libc, but adds -z defs to LDFLAGS to 
> > > > all other libs?
> > > > 
> > > > Peter
> > > 
> > > This is a system wide change and I don't know if there are other side effects, you
> > > better ask Erik.
> >
> 
> [SNIP]
> > but sadly it does
> > indeed whine about missing main, and we can't add even a weak
> > main to libc or badness will ensue.  Might be possible to link
> 
> Badness being ld NOT complaining about missing main when it should?
> Something more?

I think he means that an app w/o main would be built w/o failure against 
such a libc.

Peter

> 
> > libuClibc twice, with a script wrapping up ld and filtering
> > stdout for 'main' and only emitting an error for additional
> > output....
> 
> hmm, maybe one can move the reference to main into the crt* files
> somehow? Would that be even possible?
> 
>  Jocke
> 
> 
> 

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