Re: [PATCH] elf: Avoid relocating non-allocated code sections

Jan Beulich <[email protected]> Thu, 30 Jul 2026 08:57:03 +0200
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
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