hackers,
i'm having trouble with the runtime linker. it seems like a bug, but
perhaps there's something mystical i'm supposed to do to make this work.
the short version of what i'm seeing is this:
my app references symbols in a shared lib. the shared lib uses symbols in
another shared lib. if i like my app only against lib #1, it crashes while
initializing static objects in lib #2. if i link my app against both lib #1
and lib #2, it runs fine. i believe the problem is that the runtime
linker/loader is initializing objects out of order.
okay, the longer version:
i create shared lib A kinda like this:
g++ obj1.o obj2.o ... -pthread -shared -Wl,-h,libA.so.5 -o libA.so.5
ln -s libA.so.5 libA.so
then i create shared lib B sorta like this:
g++ obj3.o obj4.o ... -pthread -shared -lA -Wl,-h,libB.so.5 -o libB.so.5
ln -s libB.so.5 libB.so
then if i make the app like so:
g++ app.o -lB -pthread -o app
it cores at startup. if i make it like this:
g++ app.o -lA -lB -pthread -o app
it runs fine.
this is not good. is there something i'm missing? if not, how do i go
about building a debug version of the runtime linker so i can debug this
bastage? thanks.
btw: this works fine under linux (gcc 2.95.2, ld 2.9.5, glibc 2.1.3) and
under solaris (sun's CC, ld, libc, etc), so i don't think i'm expecting too
much.
--
-greg
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message