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

elf, uapi: Add types ElfXX_Verdef and ElfXX_Veraux

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

To be able to build the vDSO selftests without a libc dependency,
add the types 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/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html#VERDEFEXTS
Link: https://lore.kernel.org/all/20250226-parse_vdso-nolibc-v2-6-28e14e031ed8@linutronix.de

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
e0d15896 2c86f604

+30
+30
include/uapi/linux/elf.h
··· 491 491 /* Bits for GNU_PROPERTY_AARCH64_FEATURE_1_BTI */ 492 492 #define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0) 493 493 494 + typedef struct { 495 + Elf32_Half vd_version; 496 + Elf32_Half vd_flags; 497 + Elf32_Half vd_ndx; 498 + Elf32_Half vd_cnt; 499 + Elf32_Word vd_hash; 500 + Elf32_Word vd_aux; 501 + Elf32_Word vd_next; 502 + } Elf32_Verdef; 503 + 504 + typedef struct { 505 + Elf64_Half vd_version; 506 + Elf64_Half vd_flags; 507 + Elf64_Half vd_ndx; 508 + Elf64_Half vd_cnt; 509 + Elf64_Word vd_hash; 510 + Elf64_Word vd_aux; 511 + Elf64_Word vd_next; 512 + } Elf64_Verdef; 513 + 514 + typedef struct { 515 + Elf32_Word vda_name; 516 + Elf32_Word vda_next; 517 + } Elf32_Verdaux; 518 + 519 + typedef struct { 520 + Elf64_Word vda_name; 521 + Elf64_Word vda_next; 522 + } Elf64_Verdaux; 523 + 494 524 #endif /* _UAPI_LINUX_ELF_H */