[PATCH] D38329: [llvm-objcopy] Fix latent bug that allowed some Sections to be improperly cast to StringTableSections
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 01:19:51 PDT 2017
jhenderson added a comment.
So, from what I can see, it is no longer a requirement for a dynamic section (or indeed any "SectionWithStrTab" instance) to refer to a section of type SHT_STRTAB? Is this desirable, because it sounds a bit odd to me? I could support a check in SectionWithStrtab::initialize that checks the actual type of the string table. Otherwise, this change looks reasonable to me.
================
Comment at: tools/llvm-objcopy/Object.h:119
// This is just a wraper around a StringTableBuilder that implements SectionBase
class StringTableSection : public SectionBase {
private:
----------------
As this class is now only usable for non-alloc string table sections, I think that we need to explicitly say so in the comment, along with the reason why.
Repository:
rL LLVM
https://reviews.llvm.org/D38329
More information about the llvm-commits
mailing list