[PATCH] D134883: [XCOFF] llvm-readobj support decoding the loader section header field for XCOFF object file.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 00:50:38 PDT 2022


jhenderson added a comment.

One more suggestion. I thought I made this in the previous version of the patch, but apparently not.



================
Comment at: llvm/tools/llvm-readobj/llvm-readobj.cpp:514-515
+    if (opts::XCOFFLoaderSectionHeader) {
+      Dumper->setPrintLoaderSectionHeader();
+      Dumper->printLoaderSection();
+    }
----------------
This is a very odd way of getting it to print a specific part of the loader section. It would be much more normal to pass in booleans into `printLoaderSection`, rather than modifying the state of the dumper to ensure it does print it. Take a look at the `printSymbols` call for example.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134883



More information about the llvm-commits mailing list