[PATCH v2 1/3] ld: bfd: sframe: KEEP .sframe sections and support gc-sections
Claudiu Zissulescu Ianculescu
claziss@gmail.com
Fri Jan 16 11:40:17 GMT 2026
On Fri, Jan 16, 2026 at 11:36 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 14.01.2026 11:05, claudiu.zissulescu-ianculescu--- via Binutils wrote:
> > From: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
> >
> > Fix PR ld/32769
> >
> > Currently, specifying --gc-sections causes the linker to discard all
> > input .sframe sections. Fix this behaviour by adding KEEP for .sframe
> > sections in the default ELF linker script.
>
> Is this correct though? What if all text sections in an object file are
> removed by gc? You'll then keep .sframe for no reason? Yes, it looks to
> work similarly for .eh_frame, yet that then looks similarly wrong to me.
> Of course I may be missing something here.
I think this is a common problem of anything which uses KEEP in the
linker script. Maybe this deserves a separate discussion?
//Claudiu
More information about the Binutils
mailing list