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: Should .strtab and .shstrtab sections have the SHF_STRINGS flag ?


Hi Cary,

> SHF_STRINGS *is* part of the ELF spec (yes, it was an extension, but
> it was adopted in the gABI 17 years ago).
> 
>     http://www.sco.com/developers/gabi/latest/contents.html

Ah - thanks for the pointer.


> Perhaps the gABI could use some clarification to the effect that
> SHF_MERGE and SHF_STRINGS are intended for SHT_PROGBITS sections only,
> or that the flags are optional (and implied) for SHT_STRTAB sections.
> (The former would invalidate what Solaris is doing, while the latter
> would allow it.)

Well I think that it would be nice to have a decision, and if it could 
be compatible with the current Solaris linker that would be even better.

In the meantime I have modified my original patch so that it allows 
individual targets to decide what flag bits should be set for these
sections.  The default is none - ie the current behaviour - but for
Solaris based targets the patch changes this to be SHF_STRINGS.  This
seems to me like the best compromise - no change for non-Solaris 
targets for now, but allowing the possibility of change in the future.

Cheers
  Nick


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