[PATCH] D149089: [llvm-readobj] Add support for dumping CHPE metadata.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 13:06:01 PDT 2023


efriedma added inline comments.


================
Comment at: llvm/lib/Object/COFFObjectFile.cpp:758
+  uintptr_t ChpeOff = 0;
+  if (is64()) {
+    auto Config = getLoadConfig64();
----------------
Does "is64()" here refer to whether the target is 32-bit?  I guess 32-bit ARM CHPE is a thing that exists, but it doesn't look like the rest of the code is built to accept it; I'd rather bail out as soon as possible.


================
Comment at: llvm/tools/llvm-readobj/COFFDumper.cpp:924
+    W.printNumber("CodeRangesToEntryPointsCount",
+                  CHPE->CodeRangesToEntryPointsCount);
+    W.printNumber("RedirectionMetadataCount", CHPE->RedirectionMetadataCount);
----------------
Not sure you need to print CodeRangesToEntryPointsCount/RedirectionMetadataCount separately?  You can easily infer it from what is already dumped.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149089



More information about the llvm-commits mailing list