jeudi 26 mars 2015

Linux environment variable using non-fullpath


I'm setting the environment variable LD_PRELOAD to a shared library file I created, in order to let LD_PRELOAD to point to my created shared library file, I need to give the full path like this:



export LD_PRELOAD=full/path/to/file.so


but if I point the LD_PRELOAD to a shared library under /usr/lib/, I don't need to give the full path, I don't have root privilege so I cannot put my shared library file to /usr/lib/, in such case, how can I set the environment variable LD_PRELOAD using non-fullpath like this:



export LD_PRELOAD=file.so


Aucun commentaire:

Enregistrer un commentaire