Wednesday, February 23, 2005

LD_LIBARARY_PATH and LD_PRELOAD

If you want to run a program that needs a different library:

1) ldd programname

This lists the dynamic libary dependencies of the program

2) Copy all those libraries to a directory

3) setenv LD_LIBRARY_PATH /path/to/directory/with/libs

LD_PRELOAD lets you load a different function instead of a libc library call
like if you wanted to make your own testing version of open().

So, so far, I can't override the GLIBC_2.3. If anyone has an idea
email me, please.