mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
sparc: Fix la_symbind for bind-now (BZ 23734)
The sparc ABI has multiple cases on how to handle JMP_SLOT relocations, (sparc_fixup_plt/sparc64_fixup_plt). For BINDNOW, _dl_audit_symbind will be responsible to setup the final relocation value; while for lazy binding _dl_fixup/_dl_profile_fixup will call the audit callback and tail cail elf_machine_fixup_plt (which will call sparc64_fixup_plt). This patch fixes by issuing the SPARC specific routine on bindnow and forwarding the audit value to elf_machine_fixup_plt for lazy resolution. It fixes the la_symbind for bind-now tests on sparc64 and sparcv9: elf/tst-audit24a elf/tst-audit24b elf/tst-audit24c elf/tst-audit24d Checked on sparc64-linux-gnu and sparcv9-linux-gnu. Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
This commit is contained in:
@@ -176,8 +176,8 @@ rtld_hidden_def (_dl_audit_symbind_alt)
|
||||
|
||||
void
|
||||
_dl_audit_symbind (struct link_map *l, struct reloc_result *reloc_result,
|
||||
const ElfW(Sym) *defsym, DL_FIXUP_VALUE_TYPE *value,
|
||||
lookup_t result)
|
||||
const void *reloc, const ElfW(Sym) *defsym,
|
||||
DL_FIXUP_VALUE_TYPE *value, lookup_t result, bool lazy)
|
||||
{
|
||||
bool for_jmp_slot = reloc_result == NULL;
|
||||
|
||||
@@ -259,7 +259,7 @@ _dl_audit_symbind (struct link_map *l, struct reloc_result *reloc_result,
|
||||
}
|
||||
|
||||
if (flags & LA_SYMB_ALTVALUE)
|
||||
DL_FIXUP_BINDNOW_RELOC (value, new_value, sym.st_value);
|
||||
DL_FIXUP_BINDNOW_RELOC (l, reloc, value, new_value, sym.st_value, lazy);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user