This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: shared objects .init section not executed !?



    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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]