RFC: Should .strtab and .shstrtab sections have the SHF_STRINGS flag ?
Nick Clifton
nickc@redhat.com
Wed Apr 13 16:29:00 GMT 2016
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
More information about the Binutils
mailing list