[PATCH] D77858: [llvm-xray] Add llvm-xray extract support for 32 bit ARM

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 00:30:13 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/XRay/InstrumentationMap.cpp:67
     return make_error<StringError>(
-        "File format not supported (only does ELF and Mach-O little endian 64-bit).",
+        Twine("File format not supported (only does ELF and "
+              "Mach-O little endian 64-bit, and ARM 32-bit)."),
----------------
`AArch64/ARM/ppc64le/x86-64`


================
Comment at: llvm/lib/XRay/InstrumentationMap.cpp:129
 
-  if ((C - Contents.bytes_end()) % ELF64SledEntrySize != 0)
+  bool Is32Bit = ObjFile.getBinary()->getArch() == Triple::arm;
+  static size_t ELFSledEntrySize = Is32Bit ? 16 : 32;
----------------
`size_t ELFSledEntrySize = ObjFile.getBinary()->makeTriple().isArch32Bit() ? 16 : 32`



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77858





More information about the llvm-commits mailing list