[PATCH] D12944: [ELF2] Fill up local symbols field correctly

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 14:18:19 PDT 2015


rafael added inline comments.

================
Comment at: ELF/Writer.cpp:700
@@ +699,3 @@
+        ESym->setBindingAndType(Sym.getBinding(), Sym.getType());
+        ErrorOr<const Elf_Shdr *> SymHOrErr =
+            File.getObj()->getSection(Sym.st_shndx);
----------------
This doesn't handle SHN_XINDEX.

There is getExtendedSymbolTableIndex to help with that.

================
Comment at: ELF/Writer.cpp:703
@@ +702,3 @@
+        error(SymHOrErr, Twine("can't get section header"));
+        for (SectionChunk<ELFT> *C : File.getChunks()) {
+          if (!C)
----------------
Instead of the loop you should be able to do just Chunks[SecIndex], like we do in createSymbolBody.


Repository:
  rL LLVM

http://reviews.llvm.org/D12944





More information about the llvm-commits mailing list