[PATCH v3 0/3] vdso: Reject absolute relocations during build

From: Thomas Weißschuh
Date: Wed Jun 11 2025 - 05:22:40 EST


The compiler can emit absolute relocations in vDSO code,
which are invalid in vDSO code.
Detect them at compile-time.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
Changes in v3:
- Drop already applied bugfix for arm64
- Disable LTO for the riscv vDSO, as it is incompatible
- Link to v2: https://lore.kernel.org/r/20250430-vdso-absolute-reloc-v2-0-5efcc3bc4b26@xxxxxxxxxxxxx

Changes in v2:
- Link to openend (invalid) GCC bug containing more explanations
- Refine commit messages
- Don't fail on commit absolute relocations in debug info
- Link to v1: https://lore.kernel.org/r/20250429-vdso-absolute-reloc-v1-0-987a0afd10b5@xxxxxxxxxxxxx

---
Thomas Weißschuh (3):
riscv: vdso: Deduplicate CFLAGS_REMOVE_* variables
riscv: vdso: Disable LTO for the vDSO
vdso: Reject absolute relocations during build

arch/riscv/kernel/vdso/Makefile | 7 ++++---
lib/vdso/Makefile.include | 6 ++++++
2 files changed, 10 insertions(+), 3 deletions(-)
---
base-commit: 13a2ea925ad717de32b5aeaaccda62ed26146d9f
change-id: 20250428-vdso-absolute-reloc-a226293c1761

Best regards,
--
Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>