This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: linker script, /DISCARD/ section and SHT_GROUP
- From: Alan Modra <amodra at gmail dot com>
- To: Serge Guelton <sguelton at redhat dot com>
- Cc: binutils at sourceware dot org, nickc at redhat dot com
- Date: Tue, 19 Nov 2019 20:06:54 +1030
- Subject: Re: linker script, /DISCARD/ section and SHT_GROUP
- References: <20191113095215.GA24927@sguelton.remote.csb>
On Wed, Nov 13, 2019 at 10:52:15AM +0100, Serge Guelton wrote:
> I find this behavior relatively strange with respect to group semantic: we end
> up with a group with one of its member stripped, and the others happily living
> around.
I don't see anything particularly strange. A section group typically
is used to package up code, data and debug info for a function. You
normally want to include or exclude the whole group, but in some cases
you might want to exclude all sections of a particular type. An
obvious example is when stripping debug info. Other abnormal cases
surely exist, allowed for by /DISCARD/.
--
Alan Modra
Australia Development Lab, IBM