Skip to content

Commit c080f2b

Browse files
t-8chIngo Molnar
authored andcommitted
x86/vdso: Always reject undefined references 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: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20250306-vdso-checkundef-v2-1-a26cc315fd73@linutronix.de
1 parent 886653e commit c080f2b

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

arch/x86/entry/vdso/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ targets += $(foreach x, 64 x32 32, vdso-image-$(x).c vdso$(x).so vdso$(x).so.dbg
3232

3333
CPPFLAGS_vdso.lds += -P -C
3434

35-
VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \
35+
VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 \
3636
-z max-page-size=4096
3737

3838
$(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE
@@ -151,10 +151,9 @@ $(obj)/vdso32.so.dbg: $(obj)/vdso32/vdso32.lds $(vobjs32) FORCE
151151
quiet_cmd_vdso = VDSO $@
152152
cmd_vdso = $(LD) -o $@ \
153153
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
154-
-T $(filter %.lds,$^) $(filter %.o,$^) && \
155-
sh $(src)/checkundef.sh '$(NM)' '$@'
154+
-T $(filter %.lds,$^) $(filter %.o,$^)
156155

157-
VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 \
156+
VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 --no-undefined \
158157
$(call ld-option, --eh-frame-hdr) -Bsymbolic -z noexecstack
159158

160159
quiet_cmd_vdso_and_check = VDSO $@

arch/x86/entry/vdso/checkundef.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)