llvm-6502/test/MC/ELF
Eric Christopher 76e70f340c Implements low-level object file format specific output for COFF and
ELF with support for:

- File headers
- Section headers + data
- Relocations
- Symbols
- Unwind data (only COFF/Win64)

The output format follows a few rules:
- Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses.
- Hex numbers are output in uppercase, prefixed with "0x".
- Flags are sorted alphabetically.
- Lists and groups are always delimited.

Example output:
---------- snip ----------
Sections [
  Section {
    Index: 1
    Name: .text (5)
    Type: SHT_PROGBITS (0x1)
    Flags [ (0x6)
      SHF_ALLOC (0x2)
      SHF_EXECINSTR (0x4)
    ]
    Address: 0x0
    Offset: 0x40
    Size: 33
    Link: 0
    Info: 0
    AddressAlignment: 16
    EntrySize: 0
    Relocations [
      0x6 R_386_32 .rodata.str1.1 0x0
      0xB R_386_PC32 puts 0x0
      0x12 R_386_32 .rodata.str1.1 0x0
      0x17 R_386_PC32 puts 0x0
    ]
    SectionData (
      0000: 83EC04C7 04240000 0000E8FC FFFFFFC7  |.....$..........|
      0010: 04240600 0000E8FC FFFFFF31 C083C404  |.$.........1....|
      0020: C3                                   |.|
    )
  }
]
---------- snip ----------

Relocations and symbols can be output standalone or together with the section header as displayed in the example.
This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated.

Patch by Nico Rieck!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 18:31:38 +00:00
..
abs.s
alias-reloc.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
alias.s
align-bss.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
align-nops.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
align-size.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
align-text.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
align.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
bad-section.s
basic-elf-32.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
basic-elf-64.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
bracket-exprs.s
bracket.s
bss.ll
call-abs.s
cfi-adjust-cfa-offset.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-advance-loc2.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-def-cfa-offset.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-def-cfa-register.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-def-cfa.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-escape.s Implement .cfi_escape. Patch by Brian Anderson! 2011-12-29 20:24:47 +00:00
cfi-offset.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-reg.s PR13754: llvm-mc/x86 crashes on .cfi directives without the % prefix for registers. 2012-09-07 14:51:35 +00:00
cfi-register.s Add support for .cfi_register now that it is easy to extent the representation 2012-11-25 15:14:49 +00:00
cfi-rel-offset2.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-rel-offset.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-remember.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-restore.s Implement cfi_restore. Patch by Brian Anderson! 2011-12-29 21:43:03 +00:00
cfi-same-value.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-sections.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi-signal-frame.s Add support for .cfi_signal_frame. Fixes pr11762. 2012-01-23 21:51:52 +00:00
cfi-undefined.s Implement .cfi_undefined. Based on a patch from PaX team, updated by 2012-11-23 16:59:41 +00:00
cfi-zero-addr-delta.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
cfi.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
comdat.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
common2.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
common.s
comp-dir.s Now that llvm-dwarfdump supports flags to specify which DWARF section to dump, 2013-01-25 21:44:53 +00:00
debug-line.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
debug-loc.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
diff2.s
diff.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
elf_directive_previous.s
elf_directive_section.s
empty-dwarf-lines.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
empty.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
entsize.ll Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
entsize.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
fde.s Give this test an explicit triple. 2012-08-12 08:21:27 +00:00
file.s
gen-dwarf.s Emit relocations from .debug_aranges to .debug_info for asm files 2012-11-14 09:55:38 +00:00
global-offset.s Handle expressions of the form _GLOBAL_OFFSET_TABLE_-symbol the same way gas 2011-12-10 02:28:43 +00:00
got.s
ident.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
invalid-symver.s
lcomm.s MC: Overhaul handling of .lcomm 2012-09-07 17:25:13 +00:00
leb128.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
lit.local.cfg Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu 2012-03-25 09:02:19 +00:00
local-reloc.s
many-section.s In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), and isWeak(), with a bitset of flags. 2012-02-28 23:47:53 +00:00
many-sections-2.s Implements low-level object file format specific output for COFF and 2013-04-03 18:31:38 +00:00
merge.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
n_bytes.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
no-fixup.s Rewrite a test to check actual output rather than intermediate implementation 2013-03-01 20:54:00 +00:00
noexec.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
norelocation.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
org.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
pic-diff.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
plt.s
pr9292.s
relax-all-flag.s Add a test for explicitly exercising the mc-relax-all flag. 2012-12-10 20:36:01 +00:00
relax-arith.s
relax-crash.s
relax.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
relocation-386.s Handle reloc_signed_4byte in here. Not doing so was a regression from my 2011-12-09 19:57:29 +00:00
relocation-pc.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
relocation.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
rename.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
section-quoting.s
section.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
set.s
sleb.s
symref.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
tls-i386.s For ELF, also call fixSymbolsInTLSFixups() on expressions passed to EmitValue (literal values). Previously only called on expressions in instructions. New test cases added to tls.s, tls-i386.s. Resolves PR11981. 2012-02-15 15:09:06 +00:00
tls.s For ELF, also call fixSymbolsInTLSFixups() on expressions passed to EmitValue (literal values). Previously only called on expressions in instructions. New test cases added to tls.s, tls-i386.s. Resolves PR11981. 2012-02-15 15:09:06 +00:00
type.s Add support for gnu_indirect_function. 2011-12-12 17:34:04 +00:00
uleb.s
undef2.s
undef.s
version.s ELF: Add support for the asm .version directive. 2012-05-12 14:30:47 +00:00
weak-relocation.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
weak.s
weakref-plt.s
weakref-reloc.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
weakref.s
x86_64-reloc-sizetest.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
zero.s Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00