shared objects .init section not executed !?
Torsten Duwe
duwe@caldera.de
Wed Aug 9 03:18:00 GMT 2000
Andreas> You shouldn't use ld -shared. Please try gcc -shared.
Ah, thanks ! I was digging into the internals using a bottom-up approach, and
the "ld -shared crtbeginS.o ..." _seemed_ to work, but really didn't. I was
missing crti.o & crtn.o .
Andreas> Which glibc version are you using?
All versions I tried from 2.1.2 to a -current CVS snapshot, for the record.
>> Have I overlooked something fundamentally, is this intentional for
>> some obscure reason or is it simply a yet undiscovered bug ?
So apparently 1 and/or 2 is true, 3 is false. Since global objects in shared
libraries are basically a "Bad Thing"[tm] I deemed this being a long
unnoticed bug at least possible.
Sorry for the bother.
>> whole test case for your convenience:
>> --[[application/octet-stream; type=tar+gzip Content-Disposition:
>> attachment; filename="solib-inittest.tar.gz"][base64]]
Andreas> That's no proper MIME-attachment. Please resend it.
Well, actually it is (was), but the whole mail wasn't "multipart" -- sorry.
Thanks,
Torsten
More information about the Libc-alpha
mailing list