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


Hi Rod,

It looks like SHF_EXCLUDE is exactly what I am looking for. How useful
is it in your experiences?

Thanks.

H.J.
hongjiu.lu@intel.com

>-----Original Message-----
>From: generic-abi@googlegroups.com
[mailto:generic-abi@googlegroups.com] On
>Behalf Of Rod Evans
>Sent: Tuesday, January 09, 2007 2:15 PM
>To: generic-abi@googlegroups.com
>Cc: gcc@gcc.gnu.org; binutils@sources.redhat.com
>Subject: Re: RFC: Mark a section to be discarded for DSO and executable
>
>
>H. J. Lu wrote:
>> With LTO, an object file may contain sections with IL, which
>> can be discarded when building DSO and executable. Currently we can't
>> mark such sections with gABI. With GNU linker, we can use a
>> linker script to discard such sections. But it will be more generic
>> to make a section to be discarded for DSO and executable in gABI.
>> In that case, we don't need a special linker script to discard
>> such sections. Something like
>>
>> #define SHF_DISCARD		0x800
>>
>> would work.
>
>We invented:
>
>#define      SHF_EXCLUDE     0x80000000
>
>a long time ago, which is applied to some sections within relocatable
>objects.  Sections tagged with this flag are removed from any final
>object (executables of .so's).
>
>This probably should have followed a SHF_SUNW_ conversion, but this
>was invented long before we thought about OS specific flags.
>
>
>
>  SHF_EXCLUDE
>
>     This section is excluded from input to the link-edit of an
executable
>     or shared object. This flag is ignored if the SHF_ALLOC flag is
also
>     set, or if relocations exist against the section.
>
>--
>
>Rod.
>
>--~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
Groups
>"Generic System V Application Binary Interface" group.
>To post to this group, send email to generic-abi@googlegroups.com
>To unsubscribe from this group, send email to generic-abi-
>unsubscribe@googlegroups.com
>For more options, visit this group at
>http://groups.google.com/group/generic-abi?hl=en
>-~----------~----~----~----~------~----~------~--~---


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