From ecd4c19f3df7f3687867a2183934efb54a7d3c14 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 21 Oct 2018 22:36:17 -0700 Subject: 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 --- arch/sparc/vdso/checkundef.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 arch/sparc/vdso/checkundef.sh (limited to 'arch/sparc/vdso/checkundef.sh') 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 -- cgit v1.2.3-59-g8ed1b