From a85e47072ff808846242da49295b4b73af23b840 Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 21 Jun 2023 21:15:05 +0000 Subject: deploy: 35dc3c48a50594148554010ac626480161ad357a --- development/c++.html | 2 +- development/c++filt.html | 2 +- development/gcc.html | 2 +- development/gcov.html | 2 +- development/glibc.html | 2 +- development/index.html | 2 +- development/ld.so.html | 15 ++++++++++++++- development/make.html | 2 +- development/python.html | 2 +- development/symbolver.html | 2 +- 10 files changed, 23 insertions(+), 10 deletions(-) (limited to 'development') diff --git a/development/c++.html b/development/c++.html index 4ed1fad..05a0577 100644 --- a/development/c++.html +++ b/development/c++.html @@ -83,7 +83,7 @@ diff --git a/development/c++filt.html b/development/c++filt.html index 9b9a37a..d89d7de 100644 --- a/development/c++filt.html +++ b/development/c++filt.html @@ -83,7 +83,7 @@ diff --git a/development/gcc.html b/development/gcc.html index bb2e845..f8324f0 100644 --- a/development/gcc.html +++ b/development/gcc.html @@ -83,7 +83,7 @@ diff --git a/development/gcov.html b/development/gcov.html index 582e703..d2062aa 100644 --- a/development/gcov.html +++ b/development/gcov.html @@ -83,7 +83,7 @@ diff --git a/development/glibc.html b/development/glibc.html index ab9c252..629439f 100644 --- a/development/glibc.html +++ b/development/glibc.html @@ -83,7 +83,7 @@ diff --git a/development/index.html b/development/index.html index f6e4874..b27db9f 100644 --- a/development/index.html +++ b/development/index.html @@ -83,7 +83,7 @@ diff --git a/development/ld.so.html b/development/ld.so.html index 5a8326e..9e8ce60 100644 --- a/development/ld.so.html +++ b/development/ld.so.html @@ -83,7 +83,7 @@ @@ -157,6 +157,19 @@ =symbols show search path for symbol lookup =bindings show against which definition a symbol is bound +

LD_LIBRARY_PATH and dlopen(3)

+

When dynamically loading a shared library during program runtime with +dlopen(3), only the LD_LIBRARY_PATH as it was during program startup is +evaluated. +Therefore the following is a code smell:

+
// at startup LD_LIBRARY_PATH=/moose
+
+// Assume /foo/libbar.so
+setenv("LD_LIBRARY_PATH", "/foo", true /* overwrite */);
+
+// Will look in /moose and NOT in /foo.
+dlopen("libbar.so", RTLD_LAZY);
+

Libraries specified in LD_PRELOAD are loaded from left-to-right but initialized from right-to-left.

diff --git a/development/make.html b/development/make.html index fe08ad1..23065c7 100644 --- a/development/make.html +++ b/development/make.html @@ -83,7 +83,7 @@ diff --git a/development/python.html b/development/python.html index c847ad5..7648137 100644 --- a/development/python.html +++ b/development/python.html @@ -83,7 +83,7 @@ diff --git a/development/symbolver.html b/development/symbolver.html index d43b7d0..eab2ea0 100644 --- a/development/symbolver.html +++ b/development/symbolver.html @@ -83,7 +83,7 @@ -- cgit v1.2.3