mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
Replace Elf64_XXX with ElfW(XXX) in dl-irel.h
This commit is contained in:
parent
1da7940c77
commit
81b035fe63
@ -1,3 +1,9 @@
|
||||
2012-03-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* include/link.h (ELFW): New macro.
|
||||
* sysdeps/x86_64/dl-irel.h: Replace Elf64_XXX with ElfW(XXX).
|
||||
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
|
||||
|
@ -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 */
|
||||
|
@ -25,23 +25,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 = ELFW(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
|
||||
|
Loading…
Reference in New Issue
Block a user