diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-07-10 17:01:00 -0300 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2023-07-12 22:31:27 +0200 |
commit | 58f7431fd77c0a6dd8df08d50c51ee3e7f09825f (patch) | |
tree | c068456de45e8becdd618733932dfdd6b1244e37 /elf/do-rel.h | |
parent | 260d4b742bc36744aa2282421547f1a7b483d2f8 (diff) | |
download | glibc-58f7431fd77c0a6dd8df08d50c51ee3e7f09825f.tar.gz glibc-58f7431fd77c0a6dd8df08d50c51ee3e7f09825f.tar.xz glibc-58f7431fd77c0a6dd8df08d50c51ee3e7f09825f.zip |
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> (cherry picked from commit dddc88587a7f48cbb361d9929ec23d790164eef8)
Diffstat (limited to 'elf/do-rel.h')
-rw-r--r-- | elf/do-rel.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/elf/do-rel.h b/elf/do-rel.h index 7e1cc4452a..ea973b155a 100644 --- a/elf/do-rel.h +++ b/elf/do-rel.h @@ -154,7 +154,8 @@ elf_dynamic_do_Rel (struct link_map *map, struct r_scope_elem *scope[], = RESOLVE_MAP (map, scope, &sym, rversion, ELF_MACHINE_JMP_SLOT); if (sym != NULL) - _dl_audit_symbind (map, NULL, sym, r_addr_arg, sym_map); + _dl_audit_symbind (map, NULL, r, sym, r_addr_arg, sym_map, + false); } #endif } @@ -200,7 +201,8 @@ elf_dynamic_do_Rel (struct link_map *map, struct r_scope_elem *scope[], (struct r_found_version *) NULL, ELF_MACHINE_JMP_SLOT); if (sym != NULL) - _dl_audit_symbind (map, NULL , sym,r_addr_arg, sym_map); + _dl_audit_symbind (map, NULL, r, sym,r_addr_arg, sym_map, + false); } # endif } |