Date: Tue, 13 Feb 1996 10:00:11 +1100 (EST) From: John Birrell <cimaxp1!jb@werple.net.au> To: hackers@FreeBSD.org Cc: jb@cimlogic.com.au Subject: rtld LD_NO_INTERN_SEARCH and LD_LIBRARY_PATH Message-ID: <199602122300.KAA27706@werple.net.au>
next in thread | raw e-mail | index | archive | help
G'day, The man file for rtld describes an environment variable called LD_NO_INTERN_SEARCH. This does not appear to be implemented. The man file says that LD_LIBRARY_PATH is "A colon separated list of directories, overriding the default search path for shared libraries." We *always* use -nostdlib and *never* -l to specify libraries. Our build process gives an explicit path to the shared library that we want it to link against. This path is written by ld into the executable file. When we release the programs and libraries, we expect to be able to set LD_LIBRARY_PATH to the place where the libraries are installed, not where they were when the program was linked. This does not work because rtld is always taking the path in the executable. Was the LD_NO_INTERN_SEARCH option to rtld supposed to stop it using the paths out of the execuable? FWIW, here is an example of a link command (edited to multiple lines to make it halfway readable) we use: gcc -Xlinker -e -Xlinker start -nostdlib -nostartfiles -Xlinker -o pre bld00000.w /u/dev/usr/lib/crt0.ws pre.w pre_uap.w pre_uapd.w pre_uapi.w pre_uapp.w pre_uapr.w pre_uaps.w pre.a /u/dev/cim/lib/dhu.so.1.1 /u/dev/cim/lib/st5.so.1.2 /u/dev/cim/lib/t5s.so.1.2 /u/dev/cim/lib/t5c.so.1.2 /u/dev/cim/lib/uap.so.1.2 prl.so.1.2 /u/dev/cim/lib/sd.so.1.2 /u/dev/cim/lib/sm.so.1.2 /u/dev/cim/lib/elg.so.1.2 /u/dev/lib/pro.so.1.2 /u/dev/lib/dhl.so.1.2 /u/dev/lib/io.so.1.2 /u/dev/lib/ex.so.1.2 /u/dev/lib/ll.so.1.2 /u/dev/lib/ic.so.1.2 /u/dev/lib/mem.so.1.2 /u/dev/lib/dbg.so.1.2 /u/dev/lib/uf.so.1.2 /u/dev/lib/c.so.1.2 /u/dev/usr/lib/libgcc.so.1.1 /u/dev/usr/lib/libc.so.1.2 After running automatic tests on programs like this, we release to a /u/rel tree. We don't want to have released programs using shared libraries out of the /u/dev tree. Any hints as to how we can do this? Regards, -- John Birrell CIMlogic Pty Ltd jb@cimlogic.com.au 119 Cecil Street Ph +61 3 9690 6900 South Melbourne Vic 3205 Fax +61 3 9690 6650 Australia Mob +61 18 353 137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602122300.KAA27706>