[PATCH] D127645: [docs] Adding table of object file formats

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 08:05:40 PDT 2022


beanz created this revision.
beanz added reviewers: arsenm, MaskRay, rengolin.
Herald added subscribers: luke957, StephenFan, s.egerton, simoncook, fedor.sergeev, dschuff.
Herald added a project: All.
beanz requested review of this revision.
Herald added subscribers: pcwang-thead, aheejin, wdng.
Herald added a project: LLVM.

The added section and table here list the object file formats LLVM MC
supports and which targets support each format.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127645

Files:
  llvm/docs/CodeGenerator.rst


Index: llvm/docs/CodeGenerator.rst
===================================================================
--- llvm/docs/CodeGenerator.rst
+++ llvm/docs/CodeGenerator.rst
@@ -702,6 +702,36 @@
 layer.  It is the type used by the instruction encoder, the instruction printer,
 and the type generated by the assembly parser and disassembler.
 
+.. _ObjectFormats:
+
+Supported Object Formats
+------------------------
+
+The MC layer's object writers support a variety of object formats. Because of
+target-specific aspects of object formats each target only supports a subset of
+the formats supported by the MC layer. Most targets support emitting ELF
+objects. Other vendor-specific objects are generally supported only on targets
+that are supported by that vendor (i.e. MachO is only supported on targets
+supported by Darwin, and XCOFF is only supported on targets that support AIX).
+Additionally some targets have their own object formats (i.e. DirectX, SPIR-V
+and WebAssembly).
+
+The table below captures a snapshot of object file support in LLVM:
+
+  .. table:: Object File Formats
+
+     ================== ========================================================
+     Format              Supported Targets
+     ================== ========================================================
+     ``ELF``             AArch64, AMDGPU, ARM, AVR, BPF, CSKY, Hexagon, Lanai, LoongArch, M86k, MSP430, MIPS, PowerPC, RISCV, SPARC, VE, X86
+     ``COFF``            AArch64, ARM, PowerPC, X86
+     ``DXContainer``     DirectX
+     ``MachO``           AArch64, ARM, X86
+     ``SPIR-V``          SPIR-V
+     ``WASM``            WebAssembly
+     ``XCOFF``           PowerPC
+     ================== ========================================================
+
 .. _Target-independent algorithms:
 .. _code generation algorithm:
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127645.436395.patch
Type: text/x-patch
Size: 1830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220613/b0ef9da9/attachment.bin>


More information about the llvm-commits mailing list