Commit acc4f131 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Thomas Gleixner
Browse files

sparc64: vdso: Link with -z noexecstack



The vDSO stack does not need to be executable. Prevent the linker from
creating executable. For more background see commit ffcf9c57 ("x86:
link vdso and boot with -z noexecstack --no-warn-rwx-segments").

Also prevent the following warning from the linker:
sparc64-linux-ld: warning: arch/sparc/vdso/vdso-note.o: missing .note.GNU-stack section implies executable stack
sparc64-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Fixes: 9a08862a ("vDSO for sparc")
Suggested-by: default avatarArnd Bergmann <arnd@kernel.org>
Signed-off-by: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@kernel.org>
Tested-by: default avatarAndreas Larsson <andreas@gaisler.com>
Reviewed-by: default avatarAndreas Larsson <andreas@gaisler.com>
Acked-by: default avatarAndreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/lkml/20250707144726.4008707-1-arnd@kernel.org/
Link: https://patch.msgid.link/20260304-vdso-sparc64-generic-2-v6-4-d8eb3b0e1410@linutronix.de
parent 05988dba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,4 +107,4 @@ quiet_cmd_vdso = VDSO $@
		       $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
		       -T $(filter %.lds,$^) $(filter %.o,$^)

VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic --no-undefined
VDSO_LDFLAGS = -shared --hash-style=both --build-id=sha1 -Bsymbolic --no-undefined -z noexecstack