This is an archive of the discontinued LLVM Phabricator instance.

[docs] Adding table of object file formats
ClosedPublic

Authored by beanz on Jun 13 2022, 8:05 AM.

Details

Summary

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

Diff Detail

Event Timeline

beanz created this revision.Jun 13 2022, 8:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2022, 8:05 AM
beanz requested review of this revision.Jun 13 2022, 8:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 13 2022, 8:05 AM

PowerPC and Mach-O is not a thing anymore?
The ELF line is too long.
I believe it is Mach-O and not MachO.

beanz added a comment.Jun 13 2022, 8:53 AM

PowerPC and Mach-O is not a thing anymore?

PowerPC MachO (and Darwin) support was removed a few years ago.

The ELF line is too long.

RST doesn't wrap lines in tables, so wrapping the line in the file will break the table. Because of this we generally allow long lines in documentation files :(

I believe it is Mach-O and not MachO.

Elsewhere in this doc it is MachO, and generally there's no real consistency here. Most places in the code it is MachO, but some places in text it is Mach-O. I chose to match the spelling used elsewhere in this file for consistency.

MaskRay added inline comments.
llvm/docs/CodeGenerator.rst
707

"object file format" is more conventional.

726

You can sort rows alphabetically.

732

Add a row:

GOFF: SystemZ

@uweigand is this accurate?

MaskRay added inline comments.Jun 13 2022, 10:50 AM
llvm/docs/CodeGenerator.rst
730

SPIRV

I assume that supported targets here are LLVM_TARGETS_TO_BUILD/LLVM_EXPERIMENTAL_TARGETS_TO_BUILD allowed values (no - separator), not the official term describing the target.

MaskRay added inline comments.
llvm/docs/CodeGenerator.rst
727

@mstorsjo Is this accurate for COFF?

compnerd added inline comments.
llvm/docs/CodeGenerator.rst
727

AArch64, ARM, X86 I believe is the right set for COFF.

mstorsjo added inline comments.Jun 13 2022, 1:40 PM
llvm/docs/CodeGenerator.rst
727

Yes, drop PowerPC. Microsoft's PE-COFF can support a bunch of other stuff too, like PPC, Alpha, MIPS, IA64 etc, but we only support writing AArch64, ARM and X86 (both 32 and 64).

uweigand added inline comments.Jun 13 2022, 2:02 PM
llvm/docs/CodeGenerator.rst
732

Yes, for z/OS (although upstream support for z/OS is not fully complete at this point).

Of course, SystemZ should also be listed for ELF (for Linux, which has been fully supported for many years).

MaskRay requested changes to this revision.Jun 14 2022, 10:58 PM
This revision now requires changes to proceed.Jun 14 2022, 10:58 PM
beanz marked 8 inline comments as done.Jun 15 2022, 6:51 AM
beanz updated this revision to Diff 437139.Jun 15 2022, 6:51 AM

Updates based on review feedback.

MaskRay accepted this revision.Jun 15 2022, 10:50 AM

Some suggestions inlined

llvm/docs/CodeGenerator.rst
711

object file formats

714

I'd delete the i.e. sentence, since the information is redundant given the table below.

731

Use SPIRV instead of SPIR-V.

(Otherwise you need to use Mach-O instead of MachO).

This revision is now accepted and ready to land.Jun 15 2022, 10:50 AM
beanz added inline comments.Jun 15 2022, 11:03 AM
llvm/docs/CodeGenerator.rst
731

The spelling of MachO is largely inconsistent in documentation and code, but I was hoping for SPIR-V that we could use the proper spelling everywhere except where we refer to the target (which omits the - due to limitations that are sad).

So far, the SPIRVUsage doc is consistent in referring to the format as SPIR-V, so I'd like to keep that consistent here.

arsenm accepted this revision.Jun 16 2022, 2:34 PM
This revision was landed with ongoing or failed builds.Jun 17 2022, 11:40 AM
This revision was automatically updated to reflect the committed changes.