]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
hppa64: Disable -gc-section support on hppa*64*-*-hpux*
authorJohn David Anglin <danglin@gcc.gnu.org>
Tue, 5 May 2026 18:51:40 +0000 (14:51 -0400)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 5 May 2026 18:51:40 +0000 (14:51 -0400)
commitd6ce0aa3f877dd4475f77033496383c66383d69b
tree3cd94d8928d68c55b20af09adf42bb81510c0b20
parent90fe72f797828eabae2a876f7b4356ca7845123c
hppa64: Disable -gc-section support on hppa*64*-*-hpux*

The HP-UX dynamic linker on hppa generates an error if it detects
a dynamic relocation with the R_PARISC_NONE type.  As a result,
there is no way to handle relocations in sections that are garbage
collected.  Although these can mostly be avoided, I think it best
to disable -gc-section support.

2026-05-06  John David Anglin  <danglin@gcc.gnu.org>

bfd/ChangeLog:

* elf64-hppa.c (elf_hppa_final_link_relocate): Rework
BFD_ASSERT to only trigger on hpux.  Zero rela if the
new offset is invalid.
(elf_backend_can_gc_sections): Set to zero on hpux.

ld/ChangeLog:

* testsuite/ld-elf/group8a.d: xfail hppa*64*-*-hpux*.
* testsuite/ld-elf/group8b.d: Likewise.
* testsuite/ld-elf/group9a.d: Likewise.
* testsuite/ld-elf/group9b.d: Likewise.
* testsuite/ld-elf/pr12851.d: Likewise.
* testsuite/ld-elf/pr22677.d: Likewise.
bfd/elf64-hppa.c
ld/testsuite/ld-elf/group8a.d
ld/testsuite/ld-elf/group8b.d
ld/testsuite/ld-elf/group9a.d
ld/testsuite/ld-elf/group9b.d
ld/testsuite/ld-elf/pr12851.d
ld/testsuite/ld-elf/pr22677.d