This is the mail archive of the libc-help@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]

Re: Why does $LIB not work on Ubuntu?


* 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


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