Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

elf, uapi: Add definitions for VER_FLG_BASE and VER_FLG_WEAK

The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c.

To be able to build the vDSO selftests without a libc dependency,
add the definitions 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://docs.oracle.com/cd/E19683-01/816-1386/chapter6-80869/index.html
Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-4-28e14e031ed8@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
049d19bb 50881d14

+3
+3
include/uapi/linux/elf.h
··· 136 136 #define STT_COMMON 5 137 137 #define STT_TLS 6 138 138 139 + #define VER_FLG_BASE 0x1 140 + #define VER_FLG_WEAK 0x2 141 + 139 142 #define ELF_ST_BIND(x) ((x) >> 4) 140 143 #define ELF_ST_TYPE(x) ((x) & 0xf) 141 144 #define ELF32_ST_BIND(x) ELF_ST_BIND(x)