This is the mail archive of the 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]

RFC: Should .strtab and .shstrtab sections have the SHF_STRINGS flag ?

Hi Guys,

  Should the ELF .strtab and .shstrtab sections be allowed to have the
  SHF_STRINGS flag set ?

  The Solaris linker currently does this, and I am wondering whether it
  would be a good thing for our linker to do the same.  The logic of the
  change is that both of these sections do contain nul terminated
  strings, so setting the flag bit makes sense.  (It would also mean
  that we could add an option to the strings program to only dump those
  sections with the SHF_STRINGS flag bit set, thus possibly reducing the
  amount of noise produced).

  The counter argument as I see it, is that the current ELF spec says
  that these sections do not have any flag bits set (.shstrtab) or just
  the SHF_ALLOC bit (.strtab, when it is in a loadable segment).

  But the SHF_STRINGS bit is an extension to the ELF specification, so
  naturally its use would not be described in the spec.  What worries me
  though is whether a .strtab or .shstrtab section with the SHF_STRINGS
  flag bit set would be considered to be non-conforming by some other

  Thoughts ?


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