aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2021-04-28 23:51:53 +0200
committerjohannst <johannes.stoelp@gmail.com>2021-04-28 23:51:53 +0200
commit8b1b84fa12bec56e4a4066975c43dee6486bf591 (patch)
treeb68e4a8be82a53f16cd2357829f919aeb15db750
parent48dbe3390c675be71c59d87a6088cb2f61acc48d (diff)
downloaddynld-8b1b84fa12bec56e4a4066975c43dee6486bf591.tar.gz
dynld-8b1b84fa12bec56e4a4066975c43dee6486bf591.zip
03/04: replace shlib undef linker flag
-rw-r--r--03_hello_dynld/Makefile12
-rw-r--r--04_dynld_nostd/Makefile12
2 files changed, 12 insertions, 12 deletions
diff --git a/03_hello_dynld/Makefile b/03_hello_dynld/Makefile
index d8201ef..0db8281 100644
--- a/03_hello_dynld/Makefile
+++ b/03_hello_dynld/Makefile
@@ -17,12 +17,12 @@ main: dynld.so main.c ../lib/libcommon.a
readelf -W --program-headers $@
dynld.so: dynld.S dynld.c ../lib/libcommon.a
- gcc -o $@ \
- $(COMMON_CFLAGS) \
- -fPIC \
- -fvisibility=hidden \
- -Wl,--entry=dl_start \
- -Wl,--no-allow-shlib-undefined \
+ gcc -o $@ \
+ $(COMMON_CFLAGS) \
+ -fPIC \
+ -fvisibility=hidden \
+ -Wl,--entry=dl_start \
+ -Wl,--no-undefined \
$^
@if ! readelf -r $@ | grep 'There are no relocations in this file' >& /dev/null; then \
diff --git a/04_dynld_nostd/Makefile b/04_dynld_nostd/Makefile
index e4dceb1..f953e94 100644
--- a/04_dynld_nostd/Makefile
+++ b/04_dynld_nostd/Makefile
@@ -42,12 +42,12 @@ libgreet.so: libgreet.c
# We assert that the dynamic linker doesn't contain any relocations as we
# didn't implement support to resolve its own relocations.
dynld.so: dynld.S dynld.c ../lib/libcommon.a
- gcc -o $@ \
- $(COMMON_CFLAGS) \
- -fPIC -static-pie \
- -fvisibility=hidden \
- -Wl,--entry=dl_start \
- -Wl,--no-allow-shlib-undefined \
+ gcc -o $@ \
+ $(COMMON_CFLAGS) \
+ -fPIC -static-pie \
+ -fvisibility=hidden \
+ -Wl,--entry=dl_start \
+ -Wl,--no-undefined \
$^
@if ! readelf -r $@ | grep 'There are no relocations in this file' >& /dev/null; then \