Page MenuHomePhabricator

[Object] Change ELFObjectFile<ELFT>::getFileFormatName() to use BFD names
ClosedPublic

Authored by MaskRay on Mar 11 2020, 10:46 PM.

Details

Summary

Follow-up for D74433

What the function returns are almost standard BFD names, except that "ELF" is
in uppercase instead of lowercase.

This patch changes "ELF" to "elf" and changes ARM/AArch64 to use their BFD names.
MIPS and PPC64 have endianness differences as well, but this patch does not intend to address them.

Advantages:

Affected tools: llvm-readobj, llvm-objdump, llvm-dwarfdump, MCJIT (internal implementation detail, not exposed)

Diff Detail

Event Timeline

MaskRay created this revision.Mar 11 2020, 10:46 PM
MaskRay updated this revision to Diff 250104.Mar 12 2020, 5:26 PM

elfnn-riscv -> elfnn-littleriscv

jhenderson accepted this revision.Mar 16 2020, 2:38 AM

Seems reasonable to me. LGTM.

lld/test/ELF/basic-ppc.s
12

Whilst you're modifying this line, would you mind lining it up with the line below?

lld/test/ELF/basic-ppc64.s
17

Ditto.

This revision is now accepted and ready to land.Mar 16 2020, 2:38 AM
MaskRay updated this revision to Diff 250559.Mar 16 2020, 7:34 AM
MaskRay marked 2 inline comments as done.

Address comments

This revision was automatically updated to reflect the committed changes.