[PATCH] elf: Avoid relocating non-allocated code sections
Jan Beulich
jbeulich@suse.com
Thu Jul 30 06:57:03 GMT 2026
On 30.07.2026 02:33, H.J. Lu wrote:
> Since non-allocated code sections can't be properly relocated, issue an
> error on such input.
>
> PR ld/34444
> * elflink.c (elf_link_input_bfd): Issue an error on a non-allocated
> code section.
In addition to what Alan said - why would text sections be different here?
Iirc this isn't the first time that you want to treat them specially when
there's no provision for that in the spec. Once that restriction was
removed, I expect your check would trigger on e.g. debugging sections,
indicating that it's wrong to have.
Jan
More information about the Binutils
mailing list