[PATCH] x86-64: Remove sframe relocs against discarded sections

Jan Beulich jbeulich@suse.com
Tue Jul 15 07:20:56 GMT 2025


On 15.07.2025 07:51, Sam James wrote:
> From: "H.J. Lu" <hjl.tools@gmail.com>
> 
> 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>
> ---
> Sent on H.J.'s behalf. OK?

What's the relationship with what it now 5f9bf0cf711a ("sframe: Allow
input R_*_NONE relocations")? Indu's reply there suggests to me that
altering the number of relocs may be a problem.

Jan


More information about the Binutils mailing list