diff options
Diffstat (limited to 'sysdeps/mips')
-rw-r--r-- | sysdeps/mips/ldsodefs.h | 15 | ||||
-rw-r--r-- | sysdeps/mips/linkmap.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h index f0acb020f5..95cd38e486 100644 --- a/sysdeps/mips/ldsodefs.h +++ b/sysdeps/mips/ldsodefs.h @@ -26,6 +26,21 @@ struct La_mips_32_retval; struct La_mips_64_regs; struct La_mips_64_retval; +#define ELF_MACHINE_GNU_HASH_ADDRIDX (DT_MIPS_XHASH - DT_LOPROC + DT_NUM) + +/* Calculate the index of a symbol in MIPS xhash. */ +#define ELF_MACHINE_HASH_SYMIDX(map, hasharr) \ + ((map)->l_mach.mips_xlat_zero[(hasharr) - (map)->l_gnu_chain_zero]) + +/* Setup MIPS xhash. */ +#define ELF_MACHINE_XHASH_SETUP(hash32, symbias, map) \ + do \ + { \ + (hash32) += (map)->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val - (symbias); \ + (map)->l_mach.mips_xlat_zero = (hash32) - (symbias); \ + } \ + while (0) + #define ARCH_PLTENTER_MEMBERS \ Elf32_Addr (*mips_o32_gnu_pltenter) (Elf32_Sym *, unsigned int, \ uintptr_t *, uintptr_t *, \ diff --git a/sysdeps/mips/linkmap.h b/sysdeps/mips/linkmap.h index 1fb9678a6d..1e640c3ba9 100644 --- a/sysdeps/mips/linkmap.h +++ b/sysdeps/mips/linkmap.h @@ -3,4 +3,5 @@ struct link_map_machine ElfW(Addr) plt; /* Address of .plt */ ElfW(Word) fpabi; /* FP ABI of the object */ unsigned int odd_spreg; /* Does the object require odd_spreg support? */ + const Elf32_Word *mips_xlat_zero; /* .MIPS.xhash */ }; |