[PATCH] D136787: [XCOFF] Decode the relocation entries of loader section of xcoff for llvm-readobj

Esme Yi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 18:55:32 PST 2022


Esme added a comment.





================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:315-317
+    W.startLine() << center_justify("Vaddr", Obj.is64Bit() ? 18 : 10)
+                  << center_justify("Type", 8) << center_justify(" RelSect", 8)
+                  << center_justify("SymbolName(Index)", 20) << "\n";
----------------
Prefer to move the code (lines 315~317) into the `else` code block below (line 353).


================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:316
+    W.startLine() << center_justify("Vaddr", Obj.is64Bit() ? 18 : 10)
+                  << center_justify("Type", 8) << center_justify(" RelSect", 8)
+                  << center_justify("SymbolName(Index)", 20) << "\n";
----------------
We seem to be more accustomed to abbreviating Section as Sec, is it more meaningful to change `RelSect` to `SecNum`?


================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:362-363
+                    << "    " << SymbolName << "("
+                    << LoaderSecRelEntPtr->SymbolIndex << ")"
+                    << "\n";
+    }
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136787



More information about the llvm-commits mailing list