[PATCH] Replace coff-/elf-dump with llvm-readobj
Nico Rieck
nico.rieck at gmail.com
Thu Apr 11 16:03:06 PDT 2013
This patch series replaces the coff-/elf-dump scripts with llvm-readobj and converts every test to the new format.
I have tried to keep the intention of test checks identical to before, so there might be opportunities to improve and/or simplify selected tests. Relocation tests have been simplified a lot.
Missing relocation names have been added to libObject. Also, relocation names for MIPS64EL has been implemented. MIPS64EL supports three relocation operations per entry, so their names are concatenated and return as the relocation name.
Some concerns have been raised over the use of just relocation type names (and not their respective raw values) in tests. I feel that it is definitely a plus to get rid of those magic numbers, but without additional tests this just checks self-consistency in LLVM.
I added extensive relocation name tests with carefully crafted object files to test this (and an additional flag to llvm-readobj that shows the raw value of relocation types). A few architectures are not included (COFF/ARM, ELF/MBlaze, ELF/Hexagon, ELF/PPC) because of missing (assembler) support in LLVM.
With all tests converted, coff-dump and elf-dump are obsolete, and macho-dumpx isn't used anywhere, so all test scripts have been removed.
http://llvm-reviews.chandlerc.com/D661
Files:
include/llvm/Object/ELF.h
include/llvm/Support/ELF.h
test/CodeGen/AArch64/adrp-relocation.ll
test/CodeGen/AArch64/elf-extern.ll
test/CodeGen/AArch64/jump-table.ll
test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
test/CodeGen/ARM/2010-11-30-reloc-movt.ll
test/CodeGen/ARM/2010-12-08-tpsoft.ll
test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
test/CodeGen/ARM/ehabi-mc-section-group.ll
test/CodeGen/ARM/ehabi-mc-sh_link.ll
test/CodeGen/PowerPC/mcm-obj-2.ll
test/CodeGen/PowerPC/mcm-obj.ll
test/CodeGen/PowerPC/pr15359.ll
test/CodeGen/PowerPC/tls-gd-obj.ll
test/CodeGen/PowerPC/tls-ie-obj.ll
test/CodeGen/PowerPC/tls-ld-obj.ll
test/MC/AArch64/elf-globaladdress.ll
test/MC/AArch64/elf-reloc-addsubimm.s
test/MC/AArch64/elf-reloc-condbr.s
test/MC/AArch64/elf-reloc-ldrlit.s
test/MC/AArch64/elf-reloc-ldstunsimm.s
test/MC/AArch64/elf-reloc-movw.s
test/MC/AArch64/elf-reloc-pcreladdressing.s
test/MC/AArch64/elf-reloc-tstb.s
test/MC/AArch64/elf-reloc-uncondbrimm.s
test/MC/AArch64/tls-relocs.s
test/MC/ARM/cxx-global-constructor.ll
test/MC/ARM/data-in-code.ll
test/MC/ARM/elf-eflags-eabi-cg.ll
test/MC/ARM/elf-eflags-eabi.s
test/MC/ARM/elf-movt.s
test/MC/ARM/elf-reloc-01.ll
test/MC/ARM/elf-reloc-02.ll
test/MC/ARM/elf-reloc-03.ll
test/MC/ARM/elf-reloc-condcall.s
test/MC/ARM/elf-thumbfunc-reloc.ll
test/MC/ARM/elf-thumbfunc-reloc.s
test/MC/ARM/elf-thumbfunc.s
test/MC/ARM/xscale-attributes.ll
test/MC/AsmParser/section.s
test/MC/AsmParser/section_names.s
test/MC/COFF/align-nops.s
test/MC/COFF/basic-coff-64.s
test/MC/COFF/basic-coff.s
test/MC/COFF/bss.s
test/MC/COFF/diff.s
test/MC/COFF/module-asm.ll
test/MC/COFF/secrel32.s
test/MC/COFF/seh-section.s
test/MC/COFF/seh.s
test/MC/COFF/simple-fixups.s
test/MC/COFF/symbol-alias.s
test/MC/COFF/symbol-fragment-offset-64.s
test/MC/COFF/symbol-fragment-offset.s
test/MC/COFF/weak-symbol-section-specification.ll
test/MC/COFF/weak.s
test/MC/ELF/abs.s
test/MC/ELF/alias-reloc.s
test/MC/ELF/alias.s
test/MC/ELF/align-bss.s
test/MC/ELF/align-nops.s
test/MC/ELF/align-size.s
test/MC/ELF/align-text.s
test/MC/ELF/align.s
test/MC/ELF/basic-elf-32.s
test/MC/ELF/basic-elf-64.s
test/MC/ELF/call-abs.s
test/MC/ELF/cfi-adjust-cfa-offset.s
test/MC/ELF/cfi-advance-loc2.s
test/MC/ELF/cfi-def-cfa-offset.s
test/MC/ELF/cfi-def-cfa-register.s
test/MC/ELF/cfi-def-cfa.s
test/MC/ELF/cfi-escape.s
test/MC/ELF/cfi-offset.s
test/MC/ELF/cfi-register.s
test/MC/ELF/cfi-rel-offset.s
test/MC/ELF/cfi-rel-offset2.s
test/MC/ELF/cfi-remember.s
test/MC/ELF/cfi-restore.s
test/MC/ELF/cfi-same-value.s
test/MC/ELF/cfi-sections.s
test/MC/ELF/cfi-signal-frame.s
test/MC/ELF/cfi-undefined.s
test/MC/ELF/cfi-zero-addr-delta.s
test/MC/ELF/cfi.s
test/MC/ELF/comdat.s
test/MC/ELF/common.s
test/MC/ELF/common2.s
test/MC/ELF/debug-line.s
test/MC/ELF/debug-loc.s
test/MC/ELF/diff.s
test/MC/ELF/empty-dwarf-lines.s
test/MC/ELF/empty.s
test/MC/ELF/entsize.ll
test/MC/ELF/entsize.s
test/MC/ELF/file.s
test/MC/ELF/gen-dwarf.s
test/MC/ELF/global-offset.s
test/MC/ELF/got.s
test/MC/ELF/ident.s
test/MC/ELF/lcomm.s
test/MC/ELF/leb128.s
test/MC/ELF/local-reloc.s
test/MC/ELF/merge.s
test/MC/ELF/n_bytes.s
test/MC/ELF/noexec.s
test/MC/ELF/norelocation.s
test/MC/ELF/org.s
test/MC/ELF/pic-diff.s
test/MC/ELF/plt.s
test/MC/ELF/pr9292.s
test/MC/ELF/relax-arith.s
test/MC/ELF/relax.s
test/MC/ELF/relocation-386.s
test/MC/ELF/relocation-pc.s
test/MC/ELF/relocation.s
test/MC/ELF/rename.s
test/MC/ELF/section.s
test/MC/ELF/set.s
test/MC/ELF/sleb.s
test/MC/ELF/symref.s
test/MC/ELF/tls-i386.s
test/MC/ELF/tls.s
test/MC/ELF/type.s
test/MC/ELF/uleb.s
test/MC/ELF/undef.s
test/MC/ELF/undef2.s
test/MC/ELF/version.s
test/MC/ELF/weak-relocation.s
test/MC/ELF/weak.s
test/MC/ELF/weakref-plt.s
test/MC/ELF/weakref-reloc.s
test/MC/ELF/weakref.s
test/MC/ELF/x86_64-reloc-sizetest.s
test/MC/ELF/zero.s
test/MC/Mips/elf-N64.ll
test/MC/Mips/elf-bigendian.ll
test/MC/Mips/elf-gprel-32-64.ll
test/MC/Mips/elf-reginfo.ll
test/MC/Mips/elf-relsym.ll
test/MC/Mips/elf-tls.ll
test/MC/Mips/elf_basic.s
test/MC/Mips/elf_eflags.ll
test/MC/Mips/elf_st_other.ll
test/MC/Mips/higher_highest.ll
test/MC/Mips/r-mips-got-disp.ll
test/MC/Mips/sym-offset.ll
test/MC/Mips/xgot.ll
test/MC/PowerPC/ppc64-initial-cfa.ll
test/MC/PowerPC/ppc64-relocs-01.ll
test/MC/PowerPC/ppc64-tls-relocs-01.ll
test/Makefile.tests
test/Scripts/README.txt
test/Scripts/coff-dump.py
test/Scripts/coff-dump.py.bat
test/Scripts/common_dump.py
test/Scripts/elf-dump
test/Scripts/elf-dump.bat
test/Scripts/ignore
test/Scripts/macho-dumpx
test/Scripts/macho-dumpx.bat
test/lit.cfg
test/tools/llvm-readobj/Inputs/relocs.obj.coff-i386
test/tools/llvm-readobj/Inputs/relocs.obj.coff-x86_64
test/tools/llvm-readobj/Inputs/relocs.obj.elf-aarch64
test/tools/llvm-readobj/Inputs/relocs.obj.elf-arm
test/tools/llvm-readobj/Inputs/relocs.obj.elf-i386
test/tools/llvm-readobj/Inputs/relocs.obj.elf-mips
test/tools/llvm-readobj/Inputs/relocs.obj.elf-mips64el
test/tools/llvm-readobj/Inputs/relocs.obj.elf-ppc64
test/tools/llvm-readobj/Inputs/relocs.obj.elf-x86_64
test/tools/llvm-readobj/Inputs/relocs.obj.macho-arm
test/tools/llvm-readobj/Inputs/relocs.obj.macho-i386
test/tools/llvm-readobj/Inputs/relocs.obj.macho-x86_64
test/tools/llvm-readobj/Inputs/relocs.py
test/tools/llvm-readobj/reloc-types.test
tools/llvm-readobj/COFFDumper.cpp
tools/llvm-readobj/ELFDumper.cpp
tools/llvm-readobj/MachODumper.cpp
tools/llvm-readobj/llvm-readobj.cpp
tools/llvm-readobj/llvm-readobj.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D661.1.patch
Type: text/x-patch
Size: 581481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130411/e1c01579/attachment.bin>
More information about the llvm-commits
mailing list