Skip to main content

Home/ Coders/ Group items tagged linker

Rss Feed Group items tagged

Fabien Cadet

Why LD_LIBRARY_PATH is bad, by David Barr (2001) - 2 views

  • This list is prepended to the existing list of compiled-in loader paths for a given executable, and any system default loader paths.
  • For security reasons, LD_LIBRARY_PATH is ignored at runtime for executables that have their setuid or setgid bit set. This severely limits the usefulness of LD_LIBRARY_PATH.
  • SunOS 4.x uses major and minor revision numbers. If you have a library “Xt”, then it's named something like “libXt.so.4.10” (Major version 4, minor 10). If you update the library (to correct a bug, for example), you would install libX11.so.4.11 and applications would automatically use the new version.
  • ...5 more annotations...
  • Linux, SunOS 5.x and most other SYSV variants use only major revision numbers. A library “Xt” is just named something like “libXt.so.4”.
  • Linux confuses things by generally using major/minor library file names, but always include a symlink that is the actual library path referenced. So, for example, a library “libXt.so.6” is actually a symlink to “libXt.so.6.0”.
  • The linker/loader actually looks for “libXt.so.6”.
  • run-time vs link-time paths
  • There's also LD_RUN_PATH which is an environment variable which acts to “ld” just like specifying -R.
1 - 2 of 2
Showing 20 items per page