On Tue, Sep 02, 2008 at 02:09:20PM +0200, Carmelo AMOROSO wrote: > I did not success to create a test that could fail. > application ctor/dtor defined by gcc attribute ((__contructor__)) on > ((__destructor__)) are correctly invoked. > Indeed, if I put the ctor/dtor in a separate object file and I build it > as a PIC object, then the compiler will create the proper > _GLOBAL_OFFSET_TABLE_ entry and will produce the proper code to load and > use r12. > Yes, glibc _init function does it, but I'm thinking that it is useless. > I cannot see a scenario in which this may fail. Are we sure we need this > code at all? or we simply have taken the code as is from glibc in the past ? > I expect it is just something that was blindly copied from glibc. I wasn't the one that copied it in to uclibc originally, but I would wager it's a sanity measure to work around old compilers.
The GCC ident references 3.3.2, I don't have anything that old sitting around any more, but it might be worth testing out with something before that to see if the proper entry is generated without the init/fini help before deciding whether to axe the code completely or not. _______________________________________________ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc