[tip: timers/vdso] elf, uapi: Add definition for STN_UNDEF

tip-bot2 for Thomas Weißschuh posted 1 patch 11 months, 1 week ago
include/uapi/linux/elf.h | 2 ++
1 file changed, 2 insertions(+)
[tip: timers/vdso] elf, uapi: Add definition for STN_UNDEF
Posted by tip-bot2 for Thomas Weißschuh 11 months, 1 week ago
The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     c4131140961b93883e69a01b09f8ed4bcebefaf1
Gitweb:        https://git.kernel.org/tip/c4131140961b93883e69a01b09f8ed4bcebefaf1
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Wed, 26 Feb 2025 12:44:41 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 03 Mar 2025 20:00:11 +01:00

elf, uapi: Add definition for STN_UNDEF

The definition is used by tools/testing/selftests/vDSO/parse_vdso.c.

To be able to build the vDSO selftests without a libc dependency,
add the definition to the kernels own UAPI headers.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.symtab.html
Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-2-28e14e031ed8@linutronix.de
---
 include/uapi/linux/elf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index b44069d..448695c 100644
--- a/include/uapi/linux/elf.h
+++ b/include/uapi/linux/elf.h
@@ -125,6 +125,8 @@ typedef __s64	Elf64_Sxword;
 #define STB_GLOBAL 1
 #define STB_WEAK   2
 
+#define STN_UNDEF 0
+
 #define STT_NOTYPE  0
 #define STT_OBJECT  1
 #define STT_FUNC    2