[PATCH] D76046: [Object] Change ELFObjectFile<ELFT>::getFileFormatName() to use BFD names
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 23:18:05 PDT 2020
MaskRay created this revision.
MaskRay added reviewers: grimar, jhenderson, rupprecht.
Herald added subscribers: llvm-commits, danielkiss, kerbowa, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, Jim, jocewei, PkmX, dexonsmith, the_o, brucehoult, MartinMosbeck, rogfer01, steven_wu, atanasyan, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, fedor.sergeev, kbarton, hiraditya, kristof.beyls, arichardson, aprantl, nhaehnle, jvesely, nemanjai, sdardis, emaste, dylanmckay, jyknight.
Herald added a reviewer: espindola.
Herald added a reviewer: alexshap.
Herald added a project: LLVM.
Follow-up for D74433 <https://reviews.llvm.org/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)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76046
Files:
lld/test/ELF/basic-ppc.s
lld/test/ELF/basic-ppc64.s
lld/test/ELF/format-binary.test
lld/test/ELF/gnu-hash-table.s
lld/test/ELF/linkerscript/linker-script-in-search-path.s
lld/test/ELF/lto/lto-start.ll
lld/test/ELF/lto/obj-path.ll
lld/test/ELF/lto/thinlto-debug-fission.ll
lld/test/ELF/lto/thinlto-obj-path.ll
lld/test/ELF/relocatable-empty-archive.s
lld/test/ELF/relocatable.s
llvm/include/llvm/Object/ELFObjectFile.h
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
llvm/test/CodeGen/AArch64/arm64-simplest-elf.ll
llvm/test/CodeGen/AMDGPU/elf.ll
llvm/test/CodeGen/AMDGPU/elf.r600.ll
llvm/test/DebugInfo/AArch64/big-endian-dump.ll
llvm/test/DebugInfo/AArch64/little-endian-dump.ll
llvm/test/DebugInfo/ARM/big-endian-dump.ll
llvm/test/DebugInfo/ARM/little-endian-dump.ll
llvm/test/DebugInfo/Sparc/gnu-window-save.ll
llvm/test/MC/ARM/dwarf-asm-no-code.s
llvm/test/MC/AVR/dwarf-asm-no-code.s
llvm/test/MC/AsmParser/non-english-characters.s
llvm/test/MC/ELF/empty.s
llvm/test/MC/ELF/relocation-386.s
llvm/test/MC/Hexagon/basic.ll
llvm/test/MC/RISCV/elf-header.s
llvm/test/MC/Sparc/sparc-relocations.s
llvm/test/Object/AMDGPU/elf32-unknown.yaml
llvm/test/Object/AMDGPU/elf64-unknown.yaml
llvm/test/Object/invalid-alignment.test
llvm/test/ThinLTO/X86/empty-module.ll
llvm/test/tools/gold/X86/thinlto.ll
llvm/test/tools/llvm-objcopy/ELF/binary-output-target.test
llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
llvm/test/tools/llvm-objcopy/ELF/many-sections.test
llvm/test/tools/llvm-readobj/ELF/all.test
llvm/test/tools/llvm-readobj/ELF/amdgpu-elf-definitions.test
llvm/test/tools/llvm-readobj/ELF/basic.test
llvm/test/tools/llvm-readobj/ELF/dynamic-no-pt-dynamic.test
llvm/test/tools/llvm-readobj/ELF/file-headers.test
llvm/test/tools/llvm-readobj/ELF/loadname.test
llvm/test/tools/llvm-readobj/ELF/no-action.test
llvm/test/tools/llvm-readobj/ELF/ppc64-glink.test
llvm/test/tools/llvm-readobj/ELF/program-headers.test
llvm/test/tools/llvm-readobj/archive.test
llvm/test/tools/llvm-readobj/thin-archive.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76046.249839.patch
Type: text/x-patch
Size: 29509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200312/36c1be41/attachment-0001.bin>
More information about the llvm-commits
mailing list