I have a shared object file libfault.so for my 32 bit compiled application on RHEL 6.4.I want to preload this file while starting my application. I have placed it in /usr/local/lib/ directory.But while starting the application, i am getting the following error.ERROR: ld.so: object 'libfault.so' from LD_PRELOAD cannot be preloaded: ignored.But, if i compile libfault.so in 64 bit and place in /usr/local/lib64/, I do not get the error. But the file is not doing its intended function since my application is 32 bit compiled.
How to use 32 bit compiled shared object (.so) file on 64 bit RHEL?
linux;rhel;dynamic linking
You can use the environment variable $LD_LIBRARY_PATH to override the dynamic loader's search path when looking for libraries to load.To do it temporarily for a single application, you can invoke it like so:$ LD_LIBRARY_PATH=/usr/local/lib <your executable here>You can make the change more permanent for your shell instance by exporting that variable:$ export LD_LIBRARY_PATH=/usr/local/libAdjust the paths above as needed for where ever your 32-bit .so is being stored.