Commit 90daca7c authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Johannes Berg
Browse files

um: vdso: Always reject undefined references in during linking



Instead of using a custom script to detect and fail on undefined
references, use --no-undefined for all VDSO linker invocations.

Drop the now unused checkundef.sh script.

Signed-off-by: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20241011-vdso-checkundef-v1-2-1a46e0352d20@linutronix.de


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b9ee5fc8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ CFLAGS_REMOVE_um_vdso.o = -pg -fprofile-arcs -ftest-coverage
quiet_cmd_vdso = VDSO    $@
      cmd_vdso = $(CC) -nostdlib -o $@ \
		       $(CC_FLAGS_LTO) $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
		 sh $(src)/checkundef.sh '$(NM)' '$@'
		       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)

VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack
VDSO_LDFLAGS = -fPIC -shared -Wl,--hash-style=sysv -z noexecstack -Wl,--no-undefined

arch/x86/um/vdso/checkundef.sh

deleted100644 → 0
+0 −11
Original line number Diff line number Diff line
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
nm="$1"
file="$2"
$nm "$file" | grep '^ *U' > /dev/null 2>&1
if [ $? -eq 1 ]; then
    exit 0
else
    echo "$file: undefined symbols found" >&2
    exit 1
fi