[PATCH] D145761: [MTE] [llvm-readobj] Add globals section parsing to --memtag

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 16:09:04 PDT 2023


hctim marked 3 inline comments as done.
hctim added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:5908
+    if (auto E = Contents.takeError()) {
+      reportUniqueWarning("couldn't get SHT_AARCH64_MEMTAG_GLOBALS_DYNAMIC section contents: " + toString(std::move(E)));
+      return ArrayRef<uint8_t>();
----------------
jhenderson wrote:
> I don't think this is tested?
this isn't really testable here; `getSectionContents()` has a few failure conditions but none of them are really memtag-relevant.

i have however added a check that the address of the SHT_AARCH64_MEMTAG_GLOBALS_DYNAMIC section is the same as the DT_AARCH64_MEMTAG_GLOBALS dynamic table entry, and tested it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145761



More information about the llvm-commits mailing list