[PATCH] D58498: [obj2yaml] - Do not miss section index for SHN_ABS and SHN_COMMON symbols.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 03:53:07 PST 2019


jhenderson added inline comments.


================
Comment at: tools/obj2yaml/elf2yaml.cpp:279
 
+  if (Sym->st_shndx == ELF::SHN_ABS || Sym->st_shndx == ELF::SHN_COMMON) {
+    S.Index = (ELFYAML::ELF_SHN)Sym->st_shndx;
----------------
I'm thinking that we should probably actually preserve all values >= SHN_LORESERVE, since these aren't normal section indexes. What do you think?

SHN_XINDEX is possibly a special case though. Not sure about that one, but it's possible it just works.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58498/new/

https://reviews.llvm.org/D58498





More information about the llvm-commits mailing list