]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sframe: Allow input R_*_NONE relocations
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 12 Jul 2025 20:56:16 +0000 (04:56 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 14 Jul 2025 21:35:35 +0000 (05:35 +0800)
commit5f9bf0cf711a153a0a20d6ff88181e9a6775bdba
tree85cd17f436be070fd82566ed83a4f699174ce8bc
parent104a90ece991e599de16b335ef2f001c437b4e19
sframe: Allow input R_*_NONE relocations

"ld -r" generates R_*_NONE relocations in sframe section if input
relocations in sframe section are against discarded section.  Allow
input R_*_NONE relocations if there are more relocation entries than
SFrame entries, instead of assuming number of SFrame entries == number
of relocation entries.

bfd/

PR ld/33127
* elf-sframe.c (sframe_decoder_init_func_bfdinfo): Allow input
R_*_NONE relocations if there are more relocation entries than
SFrame entries.

ld/

PR ld/33127
* testsuite/ld-x86-64/sframe-reloc-2a.s: New file.
* testsuite/ld-x86-64/sframe-reloc-2b.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/33127 tests.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
bfd/elf-sframe.c
ld/testsuite/ld-x86-64/sframe-reloc-2a.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/sframe-reloc-2b.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp