This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: shared objects .init section not executed !?
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: shared objects .init section not executed !?
- From: Torsten Duwe <duwe at caldera dot de>
- Date: Wed, 9 Aug 2000 12:18:19 +0200 (CEST)
- Cc: libc-alpha at sourceware dot cygnus dot com
- References: <200008081152.NAA00338@ns.lst.de><u83dkf7y5p.fsf@gromit.rhein-neckar.de>
- Reply-to: Torsten dot Duwe at caldera dot de
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