Why does $LIB not work on Ubuntu?
Florian Weimer
fweimer@bfk.de
Thu Aug 4 08:17:00 GMT 2011
* Adam Kellas:
> I have an application which makes use of LD_PRELOAD and I recently
> discovered how to make it work with either 32- or 64-bit programs by
> using the dynamic string token '$LIB' in the path. According to Ulrich
> Drepper's document
> http://www.akkadia.org/drepper/dsohowto.pdf, $LIB will expand to
> "/lib" for a 32-bit process and /lib64 for a 64-bit process, they
> enabling me to maintain both flavors and find the appropriate one in
> all cases. I implemented this in my code and it works great. Problem
> solved.
I'm pretty sure that at least on some Ubuntu versions, /lib64 is a
symlink to /lib. Then $LIB will not work as expected.
--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
More information about the Libc-help
mailing list