aboutsummaryrefslogtreecommitdiffhomepage
path: root/development/ldso/samename/Makefile
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2024-04-10 19:37:02 +0000
committerjohannst <johannst@users.noreply.github.com>2024-04-10 19:37:02 +0000
commit269caa8ae18eb33e1286e4c21d434ea07228a619 (patch)
treeb9c0ae7bf44a6873adc4c9da9204de2bdf4a1de1 /development/ldso/samename/Makefile
parent92fc0e8e46352a593c3ce7f87292ee1c4ee4c4e4 (diff)
downloadnotes-269caa8ae18eb33e1286e4c21d434ea07228a619.tar.gz
notes-269caa8ae18eb33e1286e4c21d434ea07228a619.zip
deploy: ae498864bb638e597b589c52ff27237835625281
Diffstat (limited to 'development/ldso/samename/Makefile')
-rw-r--r--development/ldso/samename/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/development/ldso/samename/Makefile b/development/ldso/samename/Makefile
new file mode 100644
index 0000000..f35a1e3
--- /dev/null
+++ b/development/ldso/samename/Makefile
@@ -0,0 +1,13 @@
+all:
+ mkdir -p foo bar
+ gcc -g -o foo/lib.so lib.c -shared -fPIC -DNAME=\"foo\"
+ gcc -g -o bar/lib.so lib.c -shared -fPIC -DNAME=\"bar\"
+ gcc -g -o main main.c -ldl
+ ./main foo/lib.so bar/lib.so
+ LD_LIBRARY_PATH=foo:bar ./main lib.so lib.so
+ LD_LIBRARY_PATH=bar:foo ./main lib.so lib.so
+ LD_LIBRARY_PATH=foo ./main lib.so foo/lib.so
+ LD_LIBRARY_PATH=foo ./main lib.so bar/lib.so
+
+clean:
+ $(RM) -r foo bar main