shared objects .init section not executed !?
Torsten Duwe
duwe@caldera.de
Wed Aug 9 04:39:00 GMT 2000
Andreas> You shouldn't use ld -shared. Please try gcc -shared.
Torsten> Ah, thanks ! I was digging into the internals using a bottom-up
Torsten> approach, and the "ld -shared crtbeginS.o ..." _seemed_ to work,
Torsten> but really didn't. I was missing crti.o & crtn.o .
** ^
Andreas> As usual :-(. ld -shared is not expected to work for the normal
Andreas> user!
You mean you have to be root or something ;-) ?
Andreas> Does it work with gcc -shared now? If not, please resend the
Andreas> attachment so that others can look into it.
Yes, that was implied by the ** "Ah, thanks!" above. Exactly the crti and
crtn makes it work. Now I'm getting
(.../)ld: internal error ../../ld/ldlang.c 3607
with "gcc ... -Wl,--whole-archive lib_pic.a" which is of course not a glibc
problem. Replacing the --whole-archive and lib_pic.a with the plain object
works.
Anyway, for those interested:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solib-inittest.tar.gz
Type: application/x-gzip
Size: 811 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20000809/5dc7652d/attachment.bin>
More information about the Libc-alpha
mailing list