[PATCH] D148517: [llvm-lib] [llvm-readobj] [llvm-cvtres] Add Support for ARM64X object files.

Jacek Caban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 05:51:18 PDT 2023


jacek created this revision.
jacek added a reviewer: efriedma.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a reviewer: jhenderson.
Herald added a project: All.
jacek requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

Similar to D125411 <https://reviews.llvm.org/D125411>, but for ARM64X.

ARM64X PE binaries are hybrids containing both ARM64EC and pure ARM64 variants in one file. They are usually linked by passing separate ARM64EC and ARM64 object files to linker. Linked binaries use ARM64 machine and contain additional CHPE metadata in their load config. CHPE metadata support is not part of this patch, I plan to send that later.

Using ARM64X as a machine type of object files themselves is somewhat ambiguous, but such files are allowed by MSVC. It treats them as ARM64 or ARM64EC object, depending on the context. Such objects can be produced with cvtres.exe -machine:arm64x.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148517

Files:
  llvm/include/llvm/BinaryFormat/COFF.h
  llvm/lib/BinaryFormat/Magic.cpp
  llvm/lib/Object/COFFImportFile.cpp
  llvm/lib/Object/COFFObjectFile.cpp
  llvm/lib/Object/WindowsMachineFlag.cpp
  llvm/lib/Object/WindowsResource.cpp
  llvm/lib/ObjectYAML/COFFEmitter.cpp
  llvm/lib/ObjectYAML/COFFYAML.cpp
  llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
  llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
  llvm/test/tools/llvm-cvtres/machine.test
  llvm/test/tools/llvm-lib/Inputs/arm64x.yaml
  llvm/test/tools/llvm-lib/machine-mismatch.test
  llvm/test/tools/llvm-readobj/COFF/arm64x.yaml
  llvm/tools/llvm-readobj/COFFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148517.514176.patch
Type: text/x-patch
Size: 15735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/06e469c9/attachment.bin>


More information about the llvm-commits mailing list