diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-04-06 23:17:02 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-04-06 23:17:02 +0200 |
commit | 6d2292f2431ec9405b8789c28c81e8e711c15b2d (patch) | |
tree | 31cd471b7e3443af75fdddec619c51ad2db6c199 /src/development/ldso/deepbind/Makefile | |
parent | 3de8cfbc28ff4f7619c20d5552e03ca96aab4b01 (diff) | |
download | notes-6d2292f2431ec9405b8789c28c81e8e711c15b2d.tar.gz notes-6d2292f2431ec9405b8789c28c81e8e711c15b2d.zip |
ld.so: add RTLD_LOCAL, RTLD_DEEPBIND notes + example
Diffstat (limited to 'src/development/ldso/deepbind/Makefile')
-rw-r--r-- | src/development/ldso/deepbind/Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/development/ldso/deepbind/Makefile b/src/development/ldso/deepbind/Makefile new file mode 100644 index 0000000..6fc4eb1 --- /dev/null +++ b/src/development/ldso/deepbind/Makefile @@ -0,0 +1,19 @@ +run: build + LD_PRELOAD=./libprel.so ./main + +debug: build + #LD_DEBUG_OUTPUT=ldso + LD_DEBUG=scopes,symbols,bindings LD_PRELOAD=./libprel.so ./main + +build: + gcc -g -o libprel.so lib.c -DNAME=\"prel\" -fPIC -shared + gcc -g -o libdeep.so lib.c -DNAME=\"deep\" -fPIC -shared + gcc -g -o libnodp.so lib.c -DNAME=\"nodp\" -fPIC -shared + gcc -g -o liblink.so lib.c -DNAME=\"link\" -fPIC -shared + gcc -g -o main main.c ./liblink.so -ldl + +fmt: + clang-format -i *.c + +clean: + $(RM) *.so main |