[uClibc] Proposal adding -z defs by default

Joakim Tjernlund joakim.tjernlund at lumentis.se
Wed Nov 3 17:02:59 UTC 2004


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

> 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





More information about the uClibc mailing list