This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Section garbage collection problem
- From: "H.J. Lu" <hjl at lucon dot org>
- To: Denys Vlasenko <vda dot linux at googlemail dot com>
- Cc: binutils at sourceware dot org, Alan Modra <amodra at bigpond dot net dot au>
- Date: Sun, 16 Sep 2007 15:20:54 -0700
- Subject: Re: Section garbage collection problem
- References: <200709161942.25443.vda.linux@googlemail.com>
On Sun, Sep 16, 2007 at 07:42:25PM +0100, Denys Vlasenko wrote:
> I nned to fix it so that it looks like this:
>
> ... -> .text.f_used -> .smp_locks.AAAA -> .text.f_used
> .text.unused -> .smp_locks.BBBB -> .text.unused
>
> And ld will throw .text.unused and .smp_locks.BBBB sections away.
>
> How to achieve this?
>
Have you tried comdat group? That is put .text.unused and
.smp_locks.BBBB in the same comdat group. When ld discards
.text.unused, it will discard .smp_locks.BBBB automatically
together.
H.J.