From 3f03a5cfce0f721aac78136b8c1f1b60c33bdc18 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 21 Nov 2011 15:33:48 -0800 Subject: Add x32 support to dl-irel.h. --- ChangeLog.x32 | 5 +++++ 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,3 +1,8 @@ +2011-11-21 H.J. Lu + + * 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 * sysdeps/x86_64/dl-tls.h (dl_tls_index): Replace long with 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 -- cgit v1.2.1