From 99bd7834198fdfca7d8f9c6f7b19eb83de26db95 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Thu, 30 May 2002 08:32:18 +0000 Subject: [PATCH] Move the definition of ElfN_Hashelt to common headers. The only platform which has a different definition for this is alpha. --- sys/alpha/include/elf.h | 11 ----------- sys/amd64/include/elf.h | 11 ----------- sys/i386/include/elf.h | 11 ----------- sys/ia64/include/elf.h | 11 ----------- sys/powerpc/include/elf.h | 11 ----------- sys/sparc64/include/elf.h | 11 ----------- sys/sys/elf32.h | 1 + sys/sys/elf64.h | 13 +++++++++++++ sys/sys/elf_generic.h | 1 + 9 files changed, 15 insertions(+), 66 deletions(-) diff --git a/sys/alpha/include/elf.h b/sys/alpha/include/elf.h index d3a935a74897..f606ada3ee7f 100644 --- a/sys/alpha/include/elf.h +++ b/sys/alpha/include/elf.h @@ -60,17 +60,6 @@ typedef struct { /* Auxiliary vector entry on initial stack */ __ElfType(Auxinfo); -/* - * Types of dynamic symbol hash table bucket and chain elements. - * - * This is inconsistent among 64 bit architectures, so a machine dependent - * typedef is required. - */ - -typedef Elf64_Off Elf64_Hashelt; - -__ElfType(Hashelt); - /* Values for a_type. */ #define AT_NULL 0 /* Terminates the vector. */ #define AT_IGNORE 1 /* Ignored entry. */ diff --git a/sys/amd64/include/elf.h b/sys/amd64/include/elf.h index 1b718d0851ea..46d512c05929 100644 --- a/sys/amd64/include/elf.h +++ b/sys/amd64/include/elf.h @@ -60,17 +60,6 @@ typedef struct { /* Auxiliary vector entry on initial stack */ __ElfType(Auxinfo); -/* - * Types of dynamic symbol hash table bucket and chain elements. - * - * This is inconsistent among 64 bit architectures, so a machine dependent - * typedef is required. - */ - -typedef Elf32_Off Elf32_Hashelt; - -__ElfType(Hashelt); - /* Values for a_type. */ #define AT_NULL 0 /* Terminates the vector. */ #define AT_IGNORE 1 /* Ignored entry. */ diff --git a/sys/i386/include/elf.h b/sys/i386/include/elf.h index 1b718d0851ea..46d512c05929 100644 --- a/sys/i386/include/elf.h +++ b/sys/i386/include/elf.h @@ -60,17 +60,6 @@ typedef struct { /* Auxiliary vector entry on initial stack */ __ElfType(Auxinfo); -/* - * Types of dynamic symbol hash table bucket and chain elements. - * - * This is inconsistent among 64 bit architectures, so a machine dependent - * typedef is required. - */ - -typedef Elf32_Off Elf32_Hashelt; - -__ElfType(Hashelt); - /* Values for a_type. */ #define AT_NULL 0 /* Terminates the vector. */ #define AT_IGNORE 1 /* Ignored entry. */ diff --git a/sys/ia64/include/elf.h b/sys/ia64/include/elf.h index 271dc2017421..116029340528 100644 --- a/sys/ia64/include/elf.h +++ b/sys/ia64/include/elf.h @@ -60,17 +60,6 @@ typedef struct { /* Auxiliary vector entry on initial stack */ __ElfType(Auxinfo); -/* - * Types of dynamic symbol hash table bucket and chain elements. - * - * This is inconsistent among 64 bit architectures, so a machine dependent - * typedef is required. - */ - -typedef Elf64_Half Elf64_Hashelt; - -__ElfType(Hashelt); - /* Values for a_type. */ #define AT_NULL 0 /* Terminates the vector. */ #define AT_IGNORE 1 /* Ignored entry. */ diff --git a/sys/powerpc/include/elf.h b/sys/powerpc/include/elf.h index 0ab7d5fddcbf..01248f05372b 100644 --- a/sys/powerpc/include/elf.h +++ b/sys/powerpc/include/elf.h @@ -63,17 +63,6 @@ typedef struct { /* Auxiliary vector entry on initial stack */ __ElfType(Auxinfo); -/* - * Types of dynamic symbol hash table bucket and chain elements. - * - * This is inconsistent among 64 bit architectures, so a machine dependent - * typedef is required. - */ - -typedef Elf32_Off Elf32_Hashelt; - -__ElfType(Hashelt); - /* Values for a_type. */ #define AT_NULL 0 /* Terminates the vector. */ #define AT_IGNORE 1 /* Ignored entry. */ diff --git a/sys/sparc64/include/elf.h b/sys/sparc64/include/elf.h index 059c4835e542..e1e31c0ad4f3 100644 --- a/sys/sparc64/include/elf.h +++ b/sys/sparc64/include/elf.h @@ -57,17 +57,6 @@ typedef struct { /* Auxiliary vector entry on initial stack */ __ElfType(Auxinfo); -/* - * Types of dynamic symbol hash table bucket and chain elements. - * - * This is inconsistent among 64 bit architectures, so a machine dependent - * typedef is required. - */ - -typedef Elf64_Half Elf64_Hashelt; - -__ElfType(Hashelt); - /* Values for a_type. */ #define AT_NULL 0 /* Terminates the vector. */ #define AT_IGNORE 1 /* Ignored entry. */ diff --git a/sys/sys/elf32.h b/sys/sys/elf32.h index 309f1a43eada..55ba93debf86 100644 --- a/sys/sys/elf32.h +++ b/sys/sys/elf32.h @@ -41,6 +41,7 @@ typedef u_int32_t Elf32_Off; typedef int32_t Elf32_Sword; typedef u_int32_t Elf32_Word; typedef u_int32_t Elf32_Size; +typedef Elf32_Off Elf32_Hashelt; /* * ELF header. diff --git a/sys/sys/elf64.h b/sys/sys/elf64.h index 022b174f559d..9118d437181d 100644 --- a/sys/sys/elf64.h +++ b/sys/sys/elf64.h @@ -43,6 +43,19 @@ typedef u_int64_t Elf64_Word; typedef u_int64_t Elf64_Size; typedef u_int16_t Elf64_Quarter; +/* + * Types of dynamic symbol hash table bucket and chain elements. + * + * This is inconsistent among 64 bit architectures, so a machine dependent + * typedef is required. + */ + +#ifdef __alpha__ +typedef Elf64_Off Elf64_Hashelt; +#else +typedef Elf64_Half Elf64_Hashelt; +#endif + /* * ELF header. */ diff --git a/sys/sys/elf_generic.h b/sys/sys/elf_generic.h index 32c3e161b5a4..cf8da57832ed 100644 --- a/sys/sys/elf_generic.h +++ b/sys/sys/elf_generic.h @@ -60,6 +60,7 @@ __ElfType(Off); __ElfType(Sword); __ElfType(Word); __ElfType(Size); +__ElfType(Hashelt); __ElfType(Ehdr); __ElfType(Shdr); __ElfType(Phdr);