[coco-devel] ld -L versus -R
Brought to you by:
svref
From: David M. <sv...@ya...> - 2002-03-09 19:43:20
|
Thomas Klausner wrote: > Oh, and patch-aa: The rpath has to be added manually. -L doesn't > automatically add its argument to the binary's rpath, because the -L > path is only for link-time, the -R path is for run-time. > [Imagine you want to link against some libraries before installing > them, then you don't want to embed the temporary path in the binary]. I don't quite follow. Are you saying -R would be better than -L if you compiled (say) OpenAL, but didn't install it, then compiled and installed coco, then went back and installed OpenAL, then deleted the OpenAL source tree? man ld says: -R filename --just-symbols=filename Read symbol names and their addresses from filename, but do not relocate it or include it in the output. This allows your output file to refer symbolically to absolute locations of memory defined in other pro grams. You may use this option more than once. For compatibility with other ELF linkers, if the -R option is followed by a directory name, rather than a file name, it is treated as the -rpath option. |