Skip to content

Commit

Permalink
sparc/vdso: Always reject undefined references during linking
Browse files Browse the repository at this point in the history
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>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20250306-vdso-checkundef-v2-2-a26cc315fd73@linutronix.de
  • Loading branch information
Thomas Weißschuh authored and Ingo Molnar committed Mar 11, 2025
1 parent c080f2b commit 6522629
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
7 changes: 3 additions & 4 deletions arch/sparc/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ targets += $(foreach x, 32 64, vdso-image-$(x).c vdso$(x).so vdso$(x).so.dbg)

CPPFLAGS_vdso.lds += -P -C

VDSO_LDFLAGS_vdso.lds = -m elf64_sparc -soname linux-vdso.so.1 --no-undefined \
VDSO_LDFLAGS_vdso.lds = -m elf64_sparc -soname linux-vdso.so.1 \
-z max-page-size=8192

$(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE
Expand Down Expand Up @@ -101,7 +101,6 @@ $(obj)/vdso32.so.dbg: FORCE \
quiet_cmd_vdso = VDSO $@
cmd_vdso = $(LD) -nostdlib -o $@ \
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
-T $(filter %.lds,$^) $(filter %.o,$^) && \
sh $(src)/checkundef.sh '$(OBJDUMP)' '$@'
-T $(filter %.lds,$^) $(filter %.o,$^)

VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic
VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic --no-undefined
10 changes: 0 additions & 10 deletions arch/sparc/vdso/checkundef.sh

This file was deleted.

0 comments on commit 6522629

Please sign in to comment.