This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
hard-coding shared library paths
- To: gcc-help at gcc dot gnu dot org
- Subject: hard-coding shared library paths
- From: prj at po dot cwru dot edu (Paul Jarc)
- Date: 15 May 2001 13:50:57 -0400
$ gcc foo.o
$ ldd a.out
libc.so.6 => /lib/i686/libc.so.6 (0x4001c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
I want the first line to look like:
/lib/i686/libc.so.6 => /lib/i686/libc.so.6 (0x4001c000)
I.e., I want the full path to libc to be embedded in the executable,
just like ld-linux.so. More generally, I want to be able to link to
any shared library by a fixed path instead of the run-time search.
Ideas?
paul