diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-04-10 21:36:39 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-04-10 21:36:39 +0200 |
commit | ae498864bb638e597b589c52ff27237835625281 (patch) | |
tree | 4c1b35d35e71a926a6f9c82976d7cc41a79956e0 /src/development/ldso/samename/Makefile | |
parent | 16e5ab04800f86002e9bd3f904ec60cf63238f91 (diff) | |
download | notes-ae498864bb638e597b589c52ff27237835625281.tar.gz notes-ae498864bb638e597b589c52ff27237835625281.zip |
ld.so: load libs with same name experiments
Diffstat (limited to 'src/development/ldso/samename/Makefile')
-rw-r--r-- | src/development/ldso/samename/Makefile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/development/ldso/samename/Makefile b/src/development/ldso/samename/Makefile new file mode 100644 index 0000000..f35a1e3 --- /dev/null +++ b/src/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 |