[PATCH] sframe: Allow input R_*_NONE relocations

H.J. Lu hjl.tools@gmail.com
Mon Jul 14 19:29:46 GMT 2025


"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.

OK for master?

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sframe-Allow-input-R_-_NONE-relocations.patch
Type: text/x-patch
Size: 4171 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250715/a4fd245e/attachment.bin>


More information about the Binutils mailing list