diff --git a/sys/sys/elf32.h b/sys/sys/elf32.h --- a/sys/sys/elf32.h +++ b/sys/sys/elf32.h @@ -152,6 +152,8 @@ /* Macro for constructing r_info from field values. */ #define ELF32_R_INFO(sym, type) (((sym) << 8) + (unsigned char)(type)) +typedef Elf32_Word Elf32_Relr; + /* * Note entry header */ diff --git a/sys/sys/elf64.h b/sys/sys/elf64.h --- a/sys/sys/elf64.h +++ b/sys/sys/elf64.h @@ -166,6 +166,8 @@ #define ELF64_R_TYPE_INFO(data, type) \ (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type)) +typedef Elf64_Xword Elf64_Relr; + /* * Note entry header */ diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -617,6 +617,9 @@ #define DT_PREINIT_ARRAYSZ 33 /* Size in bytes of the array of pre-initialization functions. */ #define DT_MAXPOSTAGS 34 /* number of positive tags */ +#define DT_RELRSZ 35 /* Total size of ElfNN_Relr relocations. */ +#define DT_RELR 36 /* Address of ElfNN_Relr relocations. */ +#define DT_RELRENT 37 /* Size of each ElfNN_Relr relocation. */ #define DT_LOOS 0x6000000d /* First OS-specific */ #define DT_SUNW_AUXILIARY 0x6000000d /* symbol auxiliary name */ #define DT_SUNW_RTLDINF 0x6000000e /* ld.so.1 info (private) */ diff --git a/sys/sys/elf_generic.h b/sys/sys/elf_generic.h --- a/sys/sys/elf_generic.h +++ b/sys/sys/elf_generic.h @@ -71,6 +71,7 @@ __ElfType(Dyn); __ElfType(Rel); __ElfType(Rela); +__ElfType(Relr); __ElfType(Sym); __ElfType(Verdef); __ElfType(Verdaux);