This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

ld and DT_NEEDED


Hello,

I'm working on a program intended to run on a PowerPC with SuSE, which
has two versions of the GLIBC DSO, one with TLS and the other without
it. I need to link my program against the version without TLS but I
don't seem to be able to since ld extracts the names for DT_NEEDED
entries from sonames, and both libs have the same soname.

So, when ld.so.1 is searching for dependencies, it goes to ld.so.cache
and there it finds the TLS version of the library (located at
/lib/tls/libc.so.6) instead of the non-TLS version of the library (ie.
/lib/libc.so.6). I assume it finds the former because of the hwcaps of
the program. I've tried to override this behavior using the LD flags
-nodefaultlib and -rpath /lib/, but since /lib/ is a default search
directory, I end up getting the TLS version. My best solution would be
specifying the DT_NEEDED entry with the full path, but since GLIBC has
a soname, I haven't found any way to do it.

Any ideas?


Thank you very much in advance.



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