diff options
-rw-r--r-- | ChangeLog.x32 | 6 | ||||
-rw-r--r-- | include/link.h | 5 | ||||
-rw-r--r-- | sysdeps/x86_64/dl-irel.h | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog.x32 b/ChangeLog.x32 index b62ccc1baa..832e7a4b02 100644 --- a/ChangeLog.x32 +++ b/ChangeLog.x32 @@ -1,5 +1,11 @@ 2012-03-22 H.J. Lu <hongjiu.lu@intel.com> + * include/link.h (ELFW): New macro. + * sysdeps/x86_64/dl-irel.h (elf_irela): Replace ELF64_R_TYPE + with ELFW(R_TYPE). + +2012-03-22 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/x86_64/dl-tls.h (dl_tls_index): Replace unsigned long long with uint64_t. diff --git a/include/link.h b/include/link.h index c5265ee16f..2eb3179475 100644 --- a/include/link.h +++ b/include/link.h @@ -330,4 +330,9 @@ extern int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data); +/* We use this macro to refer to ELF macros independent of the native + wordsize. `ELFW(R_TYPE)' is used in place of `ELF32_R_TYPE' or + `ELF64_R_TYPE'. */ +#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type) + #endif /* include/link.h */ diff --git a/sysdeps/x86_64/dl-irel.h b/sysdeps/x86_64/dl-irel.h index 24bfa18452..830f5db8c8 100644 --- a/sysdeps/x86_64/dl-irel.h +++ b/sysdeps/x86_64/dl-irel.h @@ -37,7 +37,7 @@ __attribute ((always_inline)) elf_irela (const ElfW(Rela) *reloc) { ElfW(Addr) *const reloc_addr = (void *) reloc->r_offset; - const unsigned long int r_type = ELF32_R_TYPE (reloc->r_info); + const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info); if (__builtin_expect (r_type == R_X86_64_IRELATIVE, 1)) { |