[PATCH] D87613: [llvm-readelf/obj] - Print section symbol names properly when dumping relocations.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 03:39:19 PDT 2020


grimar added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:1175-1178
+    const object::ELFFile<ELFT> &Obj = *ObjF->getELFFile();
+    const Elf_Shdr *SymTab = IsDynamic ? DotDynsymSec : DotSymtabSec;
+    Elf_Sym_Range Syms =
+        unwrapOrError(ObjF->getFileName(), Obj.symbols(SymTab));
----------------
jhenderson wrote:
> If I'm following this correctly, there's an unrelated behaviour change here to do with which symbol table to use when `IsDynamic` is `true`? That sounds like a different patch (also possibly unnecessary, since I'm not sure a STT_SECTION symbol in a dynsym makes sense, but that's possibly tangential). 
This change is gone.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:1187
+
+    // A section symbol describes the section at index 0.
+    if (*SectionIndex == 0)
----------------
jhenderson wrote:
> I think you can delete this comment. It just describes what the code says.
This change is gone.


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

https://reviews.llvm.org/D87613



More information about the llvm-commits mailing list