musl-cross-make/patches/binutils-2.44/0004-s390x-pie-symbol-binding.diff
Rich Felker 2398261280 add patches to fix riscv & s390x ld not binding PIE symbols at link time
these should probably be backported to older binutils too, but they
don't apply as-is since the code has been refactored. I don't consider
this a high priority; use of old binutils should probably be treated
as deprecated at some point.
2025-07-21 02:24:15 +00:00

14 lines
413 B
Diff

See riscv-pie.patch
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -2953,7 +2953,7 @@ elf_s390_relocate_section (bfd *output_bfd,
|| r_type == R_390_PC32DBL
|| r_type == R_390_PC64
|| !bfd_link_pic (info)
- || !SYMBOLIC_BIND (info, h)
+ || !(bfd_link_pie (info) || SYMBOLIC_BIND (info, h))
|| !h->def_regular))
{
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);