Little bit of background: I have a execuatable which requires admin-privileges to run. This executable also has a runtime dependency on a custom dynamic lib. That dynamic lib has to be loaded from a custom path (and not from /usr/lib because a similar old version of this executable is present on which other l…
Tag: rpath
What are the recommended GNU linker options to specify $ORIGIN in RPATH?
Assume my platform is vanilla (non-embedded) x86-64 Linux using GNU build toolchain (GCC, etc.). To specify $ORIGIN in RPATH, I know about the linker option: -Wl,-rpath,’$$ORIGIN’. Today, I discovered another option: -Wl,-z,origin. Should I always include -Wl,-z,origin when using -Wl,-rpath,’…