aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-07-10 17:01:00 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-07-12 15:29:08 -0300
commitdddc88587a7f48cbb361d9929ec23d790164eef8 (patch)
tree5d68ec2c777263280278fd1a4cafad19f2c16fcc /sysdeps/powerpc
parentca230f5833d699a35778f83b3ab646ba37f6f66c (diff)
downloadglibc-dddc88587a7f48cbb361d9929ec23d790164eef8.tar
glibc-dddc88587a7f48cbb361d9929ec23d790164eef8.tar.gz
glibc-dddc88587a7f48cbb361d9929ec23d790164eef8.tar.bz2
glibc-dddc88587a7f48cbb361d9929ec23d790164eef8.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>
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/dl-lookupcfg.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/powerpc/dl-lookupcfg.h b/sysdeps/powerpc/dl-lookupcfg.h
index db0869bd33..0d6dcb8e25 100644
--- a/sysdeps/powerpc/dl-lookupcfg.h
+++ b/sysdeps/powerpc/dl-lookupcfg.h
@@ -25,7 +25,7 @@
/* We need to correctly set the audit modules value for bind-now. */
# define DL_FIXUP_BINDNOW_ADDR_VALUE(addr) \
(((Elf64_FuncDesc *)(addr))->fd_func)
-# define DL_FIXUP_BINDNOW_RELOC(value, new_value, st_value) \
+# define DL_FIXUP_BINDNOW_RELOC(l, reloc, value, new_value, st_value, lazy) \
({ \
Elf64_FuncDesc *opd = (Elf64_FuncDesc *) (value); \
opd->fd_func = (st_value); \
@@ -34,6 +34,6 @@
})
#else
# define DL_FIXUP_BINDNOW_ADDR_VALUE(addr) (addr)
-# define DL_FIXUP_BINDNOW_RELOC(value, new_value, st_value) \
+# define DL_FIXUP_BINDNOW_RELOC(l, reloc, value, new_value, st_value, lazy) \
(*value) = st_value;
#endif