diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-11-21 15:33:48 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-27 07:30:55 -0700 |
commit | 3f03a5cfce0f721aac78136b8c1f1b60c33bdc18 (patch) | |
tree | b66551e45fd7eb97c354b774f25d7f1a5b626883 | |
parent | 2186aeb6816b262858b9318814d78513e8de226c (diff) | |
download | glibc-3f03a5cfce0f721aac78136b8c1f1b60c33bdc18.tar.gz |
Add x32 support to dl-irel.h.
-rw-r--r-- | ChangeLog.x32 | 5 | ||||
-rw-r--r-- | sysdeps/x86_64/dl-irel.h | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog.x32 b/ChangeLog.x32 index 2ee3b4d2bd..6748331685 100644 --- a/ChangeLog.x32 +++ b/ChangeLog.x32 @@ -1,5 +1,10 @@ 2011-11-21 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/x86_64/dl-irel.h: Replace Elf64_XXX with ElfW(XXX). + Replace ELF64_R_TYPE with ELF32_R_TYPE. + +2011-11-21 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/x86_64/dl-tls.h (dl_tls_index): Replace long with long long. diff --git a/sysdeps/x86_64/dl-irel.h b/sysdeps/x86_64/dl-irel.h index 19f94576b3..db03827460 100644 --- a/sysdeps/x86_64/dl-irel.h +++ b/sysdeps/x86_64/dl-irel.h @@ -26,23 +26,23 @@ #define ELF_MACHINE_IRELA 1 -static inline Elf64_Addr +static inline ElfW(Addr) __attribute ((always_inline)) -elf_ifunc_invoke (Elf64_Addr addr) +elf_ifunc_invoke (ElfW(Addr) addr) { - return ((Elf64_Addr (*) (void)) (addr)) (); + return ((ElfW(Addr) (*) (void)) (addr)) (); } static inline void __attribute ((always_inline)) -elf_irela (const Elf64_Rela *reloc) +elf_irela (const ElfW(Rela) *reloc) { - Elf64_Addr *const reloc_addr = (void *) reloc->r_offset; - const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info); + ElfW(Addr) *const reloc_addr = (void *) reloc->r_offset; + const unsigned long int r_type = ELF32_R_TYPE (reloc->r_info); if (__builtin_expect (r_type == R_X86_64_IRELATIVE, 1)) { - Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend); + ElfW(Addr) value = elf_ifunc_invoke(reloc->r_addend); *reloc_addr = value; } else |