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


>>>>> Torsten Duwe writes:

Andreas> You shouldn't use ld -shared.  Please try gcc -shared.

Torsten> Ah, thanks ! I was digging into the internals using a bottom-up approach, and
Torsten> the "ld -shared crtbeginS.o ..." _seemed_ to work, but really didn't. I was
Torsten> missing crti.o & crtn.o .

As usual :-(.  ld -shared is not expected to work for the normal user!

Andreas> Which glibc version are you using?
Torsten> 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 ?

Torsten> So apparently 1 and/or 2 is true, 3 is false. Since global objects in shared
Torsten> libraries are basically a "Bad Thing"[tm] I deemed this being a long
Torsten> unnoticed bug at least possible.

Does it work with gcc -shared now?  If not, please resend the
attachment so that others can look into it.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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