[PATCH] [llvm-readobj][ELF] New `llvm-readobj` command line option `-mips-plt-got` to print a MIPS .got section

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Mon Jun 9 19:31:58 PDT 2014


================
Comment at: tools/llvm-readobj/ELFDumper.cpp:85
@@ +84,3 @@
+template <typename ELFO>
+std::string getFullSymbolName(const ELFO &Obj,
+                              typename ELFO::Elf_Sym_Iter Symbol) {
----------------
Can this be static?

================
Comment at: tools/llvm-readobj/ELFDumper.cpp:654
@@ -653,3 +712,1 @@
 void ELFDumper<ELFT>::printSymbol(typename ELFO::Elf_Sym_Iter Symbol) {
-  StringRef SymbolName = errorOrDefault(Obj->getSymbolName(Symbol));
-
----------------
This is a refactoring, no? Can you split it?

================
Comment at: tools/llvm-readobj/ELFDumper.cpp:679
@@ -678,3 +716,1 @@
 
-  std::string FullSymbolName(SymbolName);
-  if (Symbol.isDynamic()) {
----------------
This part too.

================
Comment at: tools/llvm-readobj/ELFDumper.cpp:682
@@ +681,3 @@
+template <class ELFT>
+const typename ELFDumper<ELFT>::Elf_Shdr *
+ELFDumper<ELFT>::findSectionByAddress(uint64_t Addr) {
----------------
Can this be static.

http://reviews.llvm.org/D4014






More information about the llvm-commits mailing list