This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker script, /DISCARD/ section and SHT_GROUP


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]