aboutsummaryrefslogtreecommitdiff
path: root/03_hello_dynld
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2021-04-28 23:11:34 +0200
committerjohannst <johannes.stoelp@gmail.com>2021-04-28 23:11:34 +0200
commitecb1b4b4d081429b9170e5234eaa314380eda9a7 (patch)
tree68812322ff85e13e1d7f95cdd97d404118b40a2c /03_hello_dynld
parent6cf4e09083cddd4321de0ae69f2b4b2181b348e2 (diff)
downloaddynld-ecb1b4b4d081429b9170e5234eaa314380eda9a7.tar.gz
dynld-ecb1b4b4d081429b9170e5234eaa314380eda9a7.zip
03: add check for relocation in the makefile
Diffstat (limited to '03_hello_dynld')
-rw-r--r--03_hello_dynld/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/03_hello_dynld/Makefile b/03_hello_dynld/Makefile
index 5764166..d8201ef 100644
--- a/03_hello_dynld/Makefile
+++ b/03_hello_dynld/Makefile
@@ -25,6 +25,11 @@ dynld.so: dynld.S dynld.c ../lib/libcommon.a
-Wl,--no-allow-shlib-undefined \
$^
+ @if ! readelf -r $@ | grep 'There are no relocations in this file' >& /dev/null; then \
+ echo "ERROR: $@ contains relocations while we don't support relocations in $@!"; \
+ exit 1; \
+ fi
+
../lib/libcommon.a:
make -C ../lib