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: * llvm-objdump: the "file format " line matches GNU objdump on ARM/AArch64 objects * "file format " line can be extracted and fed into llvm-objcopy -O literally. (https://github.com/ClangBuiltLinux/linux/issues/779 has such a use case) Affected tools: llvm-readobj, llvm-objdump, llvm-dwarfdump, MCJIT (internal implementation detail, not exposed) Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D76046
11 lines
260 B
ArmAsm
11 lines
260 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: rm -f %t.a
|
|
# RUN: llvm-ar rc %t.a
|
|
# RUN: ld.lld -m elf_x86_64 %t.a -o %t -r
|
|
# RUN: llvm-readobj --file-headers %t | FileCheck %s
|
|
|
|
# CHECK: Format: elf64-x86-64
|
|
# CHECK: Arch: x86_64
|
|
# CHECK: AddressSize: 64bit
|
|
# CHECK: Type: Relocatable
|