]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86-64: Remove sframe relocs against discarded sections
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Jul 2025 02:41:25 +0000 (10:41 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 16 Jul 2025 05:23:30 +0000 (22:23 -0700)
commitd7f343eaad3f34c76657b9996e6253b4f9a218d5
tree38f999e4302e618d21be12c342541558470de42d
parent14c6a06be8e0cdb40262d0b8ae000266d97e74cb
x86-64: Remove sframe relocs against discarded sections

Since unlike eh_frame editing code, sframe editing code keeps
R_X86_64_NONE reloc as is, its r_offset is wrong, we must not
generate R_X86_64_NONE reloc in sframe section against discarded
sections for "ld -r".

bfd/

PR ld/33156
* elf64-x86-64.c (elf_x86_64_relocate_section): Also remove
sframe relocations against discarded sections for "ld -r".

ld/

PR ld/33156
* testsuite/ld-elf/eh-group.exp (as_gsframe): New.
Assemble eh-group.o with $as_gsframe.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
bfd/elf64-x86-64.c
ld/testsuite/ld-elf/eh-group.exp