aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/vdso/checkundef.sh
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-10-21 22:36:17 -0700
committerDavid S. Miller <davem@davemloft.net>2018-10-22 16:09:27 -0700
commitecd4c19f3df7f3687867a2183934efb54a7d3c14 (patch)
tree226bf19f76f3af813d5805bc53ddf1cf027b1a7f /arch/sparc/vdso/checkundef.sh
parentsparc: Really use linker with LDFLAGS. (diff)
downloadlinux-dev-ecd4c19f3df7f3687867a2183934efb54a7d3c14.tar.xz
linux-dev-ecd4c19f3df7f3687867a2183934efb54a7d3c14.zip
sparc: Validate VDSO for undefined symbols.
There should be no undefined symbols in the resulting VDSO image(s). On sparc, fixed register usage can result in undefined symbols ending up in the image. To combat this, we do two things: 1) Define current_thread_info() specially when BUILD_DSO. 2) Ignore "#scratch" register undefined symbols in the output. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--arch/sparc/vdso/checkundef.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sparc/vdso/checkundef.sh b/arch/sparc/vdso/checkundef.sh
new file mode 100644
index 000000000000..2d85876ffc32
--- /dev/null
+++ b/arch/sparc/vdso/checkundef.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+objdump="$1"
+file="$2"
+$objdump -t "$file" | grep '*UUND*' | grep -v '#scratch' > /dev/null 2>&1
+if [ $? -eq 1 ]; then
+ exit 0
+else
+ echo "$file: undefined symbols found" >&2
+ exit 1
+fi