[PATCH] D64999: [yaml2obj] - Change how we handle implicit sections.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 02:38:28 PDT 2019
jhenderson added inline comments.
================
Comment at: tools/yaml2obj/yaml2elf.cpp:195
+
+ std::vector<StringRef> ImplicitSections = {".symtab", ".strtab", ".shstrtab"};
+ if (!Doc.DynamicSymbols.empty())
----------------
grimar wrote:
> jhenderson wrote:
> > Just a thought, not really related to this change, but shouldn't the presence of .symtab and .strtab be dependent on there being any symbols defined (just like .dynsym/.dynstr)?
> Perhaps having .strtab (even an empty one, i.e. only with a zero entry) is a bit more common?
>
> I am not sure actually, but if you take an empty test.s and compile it with llvm-mc, you'll get a file which has:
>
> ```
> Symbol table '.symtab' contains 1 entry:
> Num: Value Size Type Bind Vis Ndx Name
> 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
>
> ```
>
I guess it doesn't really matter either way.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64999/new/
https://reviews.llvm.org/D64999
More information about the llvm-commits
mailing list