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: RFC: Mark a section to be discarded for DSO and executable


On Tue, Jan 09, 2007 at 10:09:35AM -0800, Ian Lance Taylor wrote:
> 
> That is not strictly required for LTO as I see it.  With LTO, the lto
> program is going to read the .o files with the IL information.  It
> will then generate a new .s file to pass to the assembler.  The IL
> information will never go through the linker.
> 
> Of course, it is also possible that LTO .o files with IL information
> will be passed directly to the linker, for whatever reason.  In that
> case, we may want the linker to remove the IL information.  This is
> not substantially different from the linker's current ability to strip
> debugging information on request.

It is different since stripping debugging information is controlled
by a linker switch. The new section attribute will make section
to be discarded regardless any linker switch.

> 
> So if you want to propose a solution for that, I think you should
> consider how it can be used for debugging information as well.  And I
> don't think SHF_DISCARD is a good name.  We don't want to arbitrarily
> discard the data, we want to discard it in certain specific scenarios.

It is just a way to make a section to be discarded for executable
and DSO. I am not sure if you want to mark debugging information to
be discarded unless you mean a switch which will ignore the new
attribute so that such debugging information won't be discarded.

You should mark a section with SHF_DISCARD only if such a section
will be removed during final link in all scenarios.


H.J.


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