Skip to content

Commit e0d1589

Browse files
t-8chKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Vincenzo Frascino <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html#VERDEFEXTS Link: https://lore.kernel.org/all/[email protected]
1 parent 2c86f60 commit e0d1589

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

include/uapi/linux/elf.h

+30
Original file line numberDiff line numberDiff line change
@@ -491,4 +491,34 @@ typedef struct elf64_note {
491491
/* Bits for GNU_PROPERTY_AARCH64_FEATURE_1_BTI */
492492
#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
493493

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+
494524
#endif /* _UAPI_LINUX_ELF_H */

0 commit comments

Comments
 (0)