aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNico Rieck <nico.rieck@gmail.com>2013-04-12 04:06:46 +0000
committerNico Rieck <nico.rieck@gmail.com>2013-04-12 04:06:46 +0000
commitf89da7210b09a0a0f7c9ee216cd54dca03c6b64a (patch)
tree8faca43d4b6b9a088e23ed254f116efb0a1c0228 /test
parent8ed205f0a35337089407a57cc8e01de59bc4e26b (diff)
Replace coff-/elf-dump with llvm-readobj
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/AArch64/adrp-relocation.ll22
-rw-r--r--test/CodeGen/AArch64/elf-extern.ll16
-rw-r--r--test/CodeGen/AArch64/jump-table.ll20
-rw-r--r--test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll59
-rw-r--r--test/CodeGen/ARM/2010-11-30-reloc-movt.ll39
-rw-r--r--test/CodeGen/ARM/2010-12-08-tpsoft.ll24
-rw-r--r--test/CodeGen/ARM/2010-12-15-elf-lcomm.ll27
-rw-r--r--test/CodeGen/ARM/ehabi-mc-section-group.ll29
-rw-r--r--test/CodeGen/ARM/ehabi-mc-sh_link.ll63
-rw-r--r--test/CodeGen/PowerPC/mcm-obj-2.ll45
-rw-r--r--test/CodeGen/PowerPC/mcm-obj.ll151
-rw-r--r--test/CodeGen/PowerPC/pr15359.ll12
-rw-r--r--test/CodeGen/PowerPC/tls-gd-obj.ll28
-rw-r--r--test/CodeGen/PowerPC/tls-ie-obj.ll23
-rw-r--r--test/CodeGen/PowerPC/tls-ld-obj.ll38
-rw-r--r--test/MC/AArch64/elf-globaladdress.ll91
-rw-r--r--test/MC/AArch64/elf-reloc-addsubimm.s15
-rw-r--r--test/MC/AArch64/elf-reloc-condbr.s15
-rw-r--r--test/MC/AArch64/elf-reloc-ldrlit.s30
-rw-r--r--test/MC/AArch64/elf-reloc-ldstunsimm.s36
-rw-r--r--test/MC/AArch64/elf-reloc-movw.s94
-rw-r--r--test/MC/AArch64/elf-reloc-pcreladdressing.s30
-rw-r--r--test/MC/AArch64/elf-reloc-tstb.s20
-rw-r--r--test/MC/AArch64/elf-reloc-uncondbrimm.s20
-rw-r--r--test/MC/AArch64/tls-relocs.s451
-rw-r--r--test/MC/ARM/cxx-global-constructor.ll5
-rw-r--r--test/MC/ARM/data-in-code.ll122
-rw-r--r--test/MC/ARM/elf-eflags-eabi-cg.ll5
-rw-r--r--test/MC/ARM/elf-eflags-eabi.s5
-rw-r--r--test/MC/ARM/elf-movt.s45
-rw-r--r--test/MC/ARM/elf-reloc-01.ll15
-rw-r--r--test/MC/ARM/elf-reloc-02.ll14
-rw-r--r--test/MC/ARM/elf-reloc-03.ll14
-rw-r--r--test/MC/ARM/elf-reloc-condcall.s35
-rw-r--r--test/MC/ARM/elf-thumbfunc-reloc.ll28
-rw-r--r--test/MC/ARM/elf-thumbfunc-reloc.s11
-rw-r--r--test/MC/ARM/elf-thumbfunc.s14
-rw-r--r--test/MC/ARM/xscale-attributes.ll33
-rw-r--r--test/MC/AsmParser/section.s144
-rw-r--r--test/MC/AsmParser/section_names.s62
-rw-r--r--test/MC/COFF/align-nops.s64
-rw-r--r--test/MC/COFF/basic-coff-64.s137
-rw-r--r--test/MC/COFF/basic-coff.s220
-rw-r--r--test/MC/COFF/bss.s12
-rw-r--r--test/MC/COFF/diff.s34
-rw-r--r--test/MC/COFF/module-asm.ll32
-rw-r--r--test/MC/COFF/secrel32.s12
-rw-r--r--test/MC/COFF/seh-section.s20
-rw-r--r--test/MC/COFF/seh.s119
-rw-r--r--test/MC/COFF/simple-fixups.s11
-rw-r--r--test/MC/COFF/symbol-alias.s76
-rw-r--r--test/MC/COFF/symbol-fragment-offset-64.s168
-rw-r--r--test/MC/COFF/symbol-fragment-offset.s277
-rw-r--r--test/MC/COFF/weak-symbol-section-specification.ll30
-rw-r--r--test/MC/COFF/weak.s48
-rw-r--r--test/MC/ELF/abs.s19
-rw-r--r--test/MC/ELF/alias-reloc.s62
-rw-r--r--test/MC/ELF/alias.s144
-rw-r--r--test/MC/ELF/align-bss.s27
-rw-r--r--test/MC/ELF/align-nops.s60
-rw-r--r--test/MC/ELF/align-size.s19
-rw-r--r--test/MC/ELF/align-text.s28
-rw-r--r--test/MC/ELF/align.s55
-rw-r--r--test/MC/ELF/basic-elf-32.s82
-rw-r--r--test/MC/ELF/basic-elf-64.s84
-rw-r--r--test/MC/ELF/call-abs.s14
-rw-r--r--test/MC/ELF/cfi-adjust-cfa-offset.s75
-rw-r--r--test/MC/ELF/cfi-advance-loc2.s71
-rw-r--r--test/MC/ELF/cfi-def-cfa-offset.s74
-rw-r--r--test/MC/ELF/cfi-def-cfa-register.s70
-rw-r--r--test/MC/ELF/cfi-def-cfa.s71
-rw-r--r--test/MC/ELF/cfi-escape.s74
-rw-r--r--test/MC/ELF/cfi-offset.s71
-rw-r--r--test/MC/ELF/cfi-register.s74
-rw-r--r--test/MC/ELF/cfi-rel-offset.s75
-rw-r--r--test/MC/ELF/cfi-rel-offset2.s74
-rw-r--r--test/MC/ELF/cfi-remember.s75
-rw-r--r--test/MC/ELF/cfi-restore.s74
-rw-r--r--test/MC/ELF/cfi-same-value.s74
-rw-r--r--test/MC/ELF/cfi-sections.s65
-rw-r--r--test/MC/ELF/cfi-signal-frame.s36
-rw-r--r--test/MC/ELF/cfi-undefined.s75
-rw-r--r--test/MC/ELF/cfi-zero-addr-delta.s70
-rw-r--r--test/MC/ELF/cfi.s679
-rw-r--r--test/MC/ELF/comdat.s134
-rw-r--r--test/MC/ELF/common.s105
-rw-r--r--test/MC/ELF/common2.s25
-rw-r--r--test/MC/ELF/debug-line.s32
-rw-r--r--test/MC/ELF/debug-loc.s28
-rw-r--r--test/MC/ELF/diff.s8
-rw-r--r--test/MC/ELF/empty-dwarf-lines.s28
-rw-r--r--test/MC/ELF/empty.s151
-rw-r--r--test/MC/ELF/entsize.ll56
-rw-r--r--test/MC/ELF/entsize.s87
-rw-r--r--test/MC/ELF/file.s38
-rw-r--r--test/MC/ELF/gen-dwarf.s106
-rw-r--r--test/MC/ELF/global-offset.s30
-rw-r--r--test/MC/ELF/got.s29
-rw-r--r--test/MC/ELF/ident.s31
-rw-r--r--test/MC/ELF/lcomm.s36
-rw-r--r--test/MC/ELF/leb128.s39
-rw-r--r--test/MC/ELF/local-reloc.s30
-rw-r--r--test/MC/ELF/merge.s85
-rw-r--r--test/MC/ELF/n_bytes.s38
-rw-r--r--test/MC/ELF/noexec.s46
-rw-r--r--test/MC/ELF/norelocation.s34
-rw-r--r--test/MC/ELF/org.s16
-rw-r--r--test/MC/ELF/pic-diff.s33
-rw-r--r--test/MC/ELF/plt.s15
-rw-r--r--test/MC/ELF/pr9292.s37
-rw-r--r--test/MC/ELF/relax-arith.s66
-rw-r--r--test/MC/ELF/relax.s36
-rw-r--r--test/MC/ELF/relocation-386.s219
-rw-r--r--test/MC/ELF/relocation-pc.s53
-rw-r--r--test/MC/ELF/relocation.s131
-rw-r--r--test/MC/ELF/rename.s56
-rw-r--r--test/MC/ELF/section.s172
-rw-r--r--test/MC/ELF/set.s36
-rw-r--r--test/MC/ELF/sleb.s16
-rw-r--r--test/MC/ELF/symref.s261
-rw-r--r--test/MC/ELF/tls-i386.s254
-rw-r--r--test/MC/ELF/tls.s127
-rw-r--r--test/MC/ELF/type.s104
-rw-r--r--test/MC/ELF/uleb.s16
-rw-r--r--test/MC/ELF/undef.s45
-rw-r--r--test/MC/ELF/undef2.s18
-rw-r--r--test/MC/ELF/version.s32
-rw-r--r--test/MC/ELF/weak-relocation.s13
-rw-r--r--test/MC/ELF/weak.s40
-rw-r--r--test/MC/ELF/weakref-plt.s14
-rw-r--r--test/MC/ELF/weakref-reloc.s79
-rw-r--r--test/MC/ELF/weakref.s320
-rw-r--r--test/MC/ELF/x86_64-reloc-sizetest.s12
-rw-r--r--test/MC/ELF/zero.s31
-rw-r--r--test/MC/Mips/elf-N64.ll27
-rw-r--r--test/MC/Mips/elf-bigendian.ll39
-rw-r--r--test/MC/Mips/elf-gprel-32-64.ll15
-rw-r--r--test/MC/Mips/elf-reginfo.ll21
-rw-r--r--test/MC/Mips/elf-relsym.ll20
-rw-r--r--test/MC/Mips/elf-tls.ll12
-rw-r--r--test/MC/Mips/elf_basic.s52
-rw-r--r--test/MC/Mips/elf_eflags.ll44
-rw-r--r--test/MC/Mips/elf_st_other.ll7
-rw-r--r--test/MC/Mips/higher_highest.ll12
-rw-r--r--test/MC/Mips/r-mips-got-disp.ll5
-rw-r--r--test/MC/Mips/sym-offset.ll6
-rw-r--r--test/MC/Mips/xgot.ll35
-rw-r--r--test/MC/PowerPC/ppc64-initial-cfa.ll134
-rw-r--r--test/MC/PowerPC/ppc64-relocs-01.ll45
-rw-r--r--test/MC/PowerPC/ppc64-tls-relocs-01.ll21
150 files changed, 4581 insertions, 5043 deletions
diff --git a/test/CodeGen/AArch64/adrp-relocation.ll b/test/CodeGen/AArch64/adrp-relocation.ll
index c33b442624..cf411166a3 100644
--- a/test/CodeGen/AArch64/adrp-relocation.ll
+++ b/test/CodeGen/AArch64/adrp-relocation.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -filetype=obj < %s | elf-dump | FileCheck %s
+; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -filetype=obj < %s | llvm-readobj -s -r | FileCheck %s
define i64 @testfn() nounwind {
entry:
@@ -19,17 +19,9 @@ entry:
; relative offsets of testfn and foo) because its value depends on where this
; object file's .text section gets relocated in memory.
-; CHECK: .rela.text
-
-; CHECK: # Relocation 0
-; CHECK-NEXT: (('r_offset', 0x0000000000000010)
-; CHECK-NEXT: ('r_sym', 0x00000007)
-; CHECK-NEXT: ('r_type', 0x00000113)
-; CHECK-NEXT: ('r_addend', 0x0000000000000000)
-; CHECK-NEXT: ),
-; CHECK-NEXT: Relocation 1
-; CHECK-NEXT: (('r_offset', 0x0000000000000014)
-; CHECK-NEXT: ('r_sym', 0x00000007)
-; CHECK-NEXT: ('r_type', 0x00000115)
-; CHECK-NEXT: ('r_addend', 0x0000000000000000)
-; CHECK-NEXT: ),
+; CHECK: Relocations [
+; CHECK-NEXT: Section (1) .text {
+; CHECK-NEXT: 0x10 R_AARCH64_ADR_PREL_PG_HI21 testfn 0x0
+; CHECK-NEXT: 0x14 R_AARCH64_ADD_ABS_LO12_NC testfn 0x0
+; CHECK-NEXT: }
+; CHECK-NEXT: ]
diff --git a/test/CodeGen/AArch64/elf-extern.ll b/test/CodeGen/AArch64/elf-extern.ll
index ee89d8d94b..8bf1b2ff4f 100644
--- a/test/CodeGen/AArch64/elf-extern.ll
+++ b/test/CodeGen/AArch64/elf-extern.ll
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | elf-dump | FileCheck %s
+; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
; External symbols are a different concept to global variables but should still
; get relocations and so on when used.
@@ -10,12 +10,8 @@ define i32 @check_extern() {
ret i32 0
}
-; CHECK: .rela.text
-; CHECK: ('r_sym', 0x00000009)
-; CHECK-NEXT: ('r_type', 0x0000011b)
-
-; CHECK: .symtab
-; CHECK: Symbol 9
-; CHECK-NEXT: memcpy
-
-
+; CHECK: Relocations [
+; CHECK: Section (1) .text {
+; CHECK: 0x{{[0-9,A-F]+}} R_AARCH64_CALL26 memcpy
+; CHECK: }
+; CHECK: ]
diff --git a/test/CodeGen/AArch64/jump-table.ll b/test/CodeGen/AArch64/jump-table.ll
index dcf9f4ed45..d3299e1f74 100644
--- a/test/CodeGen/AArch64/jump-table.ll
+++ b/test/CodeGen/AArch64/jump-table.ll
@@ -1,5 +1,5 @@
; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
-; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | elf-dump | FileCheck %s -check-prefix=CHECK-ELF
+; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-ELF
define i32 @test_jumptable(i32 %in) {
; CHECK: test_jumptable
@@ -44,13 +44,15 @@ lbl4:
; ELF tests:
; First make sure we get a page/lo12 pair in .text to pick up the jump-table
-; CHECK-ELF: .rela.text
-; CHECK-ELF: ('r_sym', 0x00000008)
-; CHECK-ELF-NEXT: ('r_type', 0x00000113)
-; CHECK-ELF: ('r_sym', 0x00000008)
-; CHECK-ELF-NEXT: ('r_type', 0x00000115)
+
+; CHECK-ELF: Relocations [
+; CHECK-ELF: Section ({{[0-9]+}}) .text {
+; CHECK-ELF-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 .rodata
+; CHECK-ELF-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ADD_ABS_LO12_NC .rodata
+; CHECK-ELF: }
; Also check the targets in .rodata are relocated
-; CHECK-ELF: .rela.rodata
-; CHECK-ELF: ('r_sym', 0x00000005)
-; CHECK-ELF-NEXT: ('r_type', 0x00000101) \ No newline at end of file
+; CHECK-ELF: Section ({{[0-9]+}}) .rodata {
+; CHECK-ELF-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ABS64 .text
+; CHECK-ELF: }
+; CHECK-ELF: ]
diff --git a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
index 36d15757c3..b253fefe87 100644
--- a/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
+++ b/test/CodeGen/ARM/2010-10-19-mc-elf-objheader.ll
@@ -1,36 +1,47 @@
; RUN: llc %s -mtriple=arm-linux-gnueabi -filetype=obj -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=BASIC %s
+; RUN: llvm-readobj -s -sd | FileCheck -check-prefix=BASIC %s
; RUN: llc %s -mtriple=armv7-linux-gnueabi -march=arm -mcpu=cortex-a8 \
; RUN: -mattr=-neon,-vfp3,+vfp2 \
; RUN: -arm-reserve-r9 -filetype=obj -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=CORTEXA8 %s
+; RUN: llvm-readobj -s -sd | FileCheck -check-prefix=CORTEXA8 %s
; This tests that the extpected ARM attributes are emitted.
;
-; BASIC: .ARM.attributes
-; BASIC-NEXT: 0x70000003
-; BASIC-NEXT: 0x00000000
-; BASIC-NEXT: 0x00000000
-; BASIC-NEXT: 0x0000003c
-; BASIC-NEXT: 0x00000022
-; BASIC-NEXT: 0x00000000
-; BASIC-NEXT: 0x00000000
-; BASIC-NEXT: 0x00000001
-; BASIC-NEXT: 0x00000000
-; BASIC-NEXT: '41210000 00616561 62690001 17000000 060a0741 08010902 14011501 17031801 1901'
+; BASIC: Section {
+; BASIC: Name: .ARM.attributes
+; BASIC-NEXT: Type: SHT_ARM_ATTRIBUTES
+; BASIC-NEXT: Flags [ (0x0)
+; BASIC-NEXT: ]
+; BASIC-NEXT: Address: 0x0
+; BASIC-NEXT: Offset: 0x3C
+; BASIC-NEXT: Size: 34
+; BASIC-NEXT: Link: 0
+; BASIC-NEXT: Info: 0
+; BASIC-NEXT: AddressAlignment: 1
+; BASIC-NEXT: EntrySize: 0
+; BASIC-NEXT: SectionData (
+; BASIC-NEXT: 0000: 41210000 00616561 62690001 17000000
+; BASIC-NEXT: 0010: 060A0741 08010902 14011501 17031801
+; BASIC-NEXT: 0020: 1901
+; BASIC-NEXT: )
-; CORTEXA8: .ARM.attributes
-; CORTEXA8-NEXT: 0x70000003
-; CORTEXA8-NEXT: 0x00000000
-; CORTEXA8-NEXT: 0x00000000
-; CORTEXA8-NEXT: 0x0000003c
-; CORTEXA8-NEXT: 0x0000002f
-; CORTEXA8-NEXT: 0x00000000
-; CORTEXA8-NEXT: 0x00000000
-; CORTEXA8-NEXT: 0x00000001
-; CORTEXA8-NEXT: 0x00000000
-; CORTEXA8-NEXT: '412e0000 00616561 62690001 24000000 05434f52 5445582d 41380006 0a074108 0109020a 02140115 01170318 011901'
+; CORTEXA8: Name: .ARM.attributes
+; CORTEXA8-NEXT: Type: SHT_ARM_ATTRIBUTES
+; CORTEXA8-NEXT: Flags [ (0x0)
+; CORTEXA8-NEXT: ]
+; CORTEXA8-NEXT: Address: 0x0
+; CORTEXA8-NEXT: Offset: 0x3C
+; CORTEXA8-NEXT: Size: 47
+; CORTEXA8-NEXT: Link: 0
+; CORTEXA8-NEXT: Info: 0
+; CORTEXA8-NEXT: AddressAlignment: 1
+; CORTEXA8-NEXT: EntrySize: 0
+; CORTEXA8-NEXT: SectionData (
+; CORTEXA8-NEXT: 0000: 412E0000 00616561 62690001 24000000
+; CORTEXA8-NEXT: 0010: 05434F52 5445582D 41380006 0A074108
+; CORTEXA8-NEXT: 0020: 0109020A 02140115 01170318 011901
+; CORTEXA8-NEXT: )
define i32 @f(i64 %z) {
ret i32 0
diff --git a/test/CodeGen/ARM/2010-11-30-reloc-movt.ll b/test/CodeGen/ARM/2010-11-30-reloc-movt.ll
index 94a05412f5..9eecd045bf 100644
--- a/test/CodeGen/ARM/2010-11-30-reloc-movt.ll
+++ b/test/CodeGen/ARM/2010-11-30-reloc-movt.ll
@@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+; RUN: llvm-readobj -s -sr -sd | FileCheck -check-prefix=OBJ %s
target triple = "armv7-none-linux-gnueabi"
@@ -9,32 +9,17 @@ define arm_aapcs_vfpcc i32 @barf() nounwind {
entry:
%0 = tail call arm_aapcs_vfpcc i32 @foo(i8* @a) nounwind
ret i32 %0
-; OBJ: '.text'
-; OBJ-NEXT: 'sh_type'
-; OBJ-NEXT: 'sh_flags'
-; OBJ-NEXT: 'sh_addr'
-; OBJ-NEXT: 'sh_offset'
-; OBJ-NEXT: 'sh_size'
-; OBJ-NEXT: 'sh_link'
-; OBJ-NEXT: 'sh_info'
-; OBJ-NEXT: 'sh_addralign'
-; OBJ-NEXT: 'sh_entsize'
-; OBJ-NEXT: '_section_data', '00482de9 000000e3 000040e3 feffffeb 0088bde8'
-
-; OBJ: Relocation 0
-; OBJ-NEXT: 'r_offset', 0x00000004
-; OBJ-NEXT: 'r_sym', 0x000009
-; OBJ-NEXT: 'r_type', 0x2b
-
-; OBJ: Relocation 1
-; OBJ-NEXT: 'r_offset', 0x00000008
-; OBJ-NEXT: 'r_sym'
-; OBJ-NEXT: 'r_type', 0x2c
-
-; OBJ: # Relocation 2
-; OBJ-NEXT: 'r_offset', 0x0000000c
-; OBJ-NEXT: 'r_sym', 0x00000a
-; OBJ-NEXT: 'r_type', 0x1c
+; OBJ: Section {
+; OBJ: Name: .text
+; OBJ: Relocations [
+; OBJ-NEXT: 0x4 R_ARM_MOVW_ABS_NC a
+; OBJ-NEXT: 0x8 R_ARM_MOVT_ABS
+; OBJ-NEXT: 0xC R_ARM_CALL foo
+; OBJ-NEXT: ]
+; OBJ-NEXT: SectionData (
+; OBJ-NEXT: 0000: 00482DE9 000000E3 000040E3 FEFFFFEB
+; OBJ-NEXT: 0010: 0088BDE8
+; OBJ-NEXT: )
}
diff --git a/test/CodeGen/ARM/2010-12-08-tpsoft.ll b/test/CodeGen/ARM/2010-12-08-tpsoft.ll
index b8ed8199d3..1351a26756 100644
--- a/test/CodeGen/ARM/2010-12-08-tpsoft.ll
+++ b/test/CodeGen/ARM/2010-12-08-tpsoft.ll
@@ -1,9 +1,9 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -o - | \
; RUN: FileCheck -check-prefix=ELFASM %s
; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=ELFOBJ %s
+; RUN: llvm-readobj -s -sd | FileCheck -check-prefix=ELFOBJ %s
-;; Make sure that bl __aeabi_read_tp is materiazlied and fixed up correctly
+;; Make sure that bl __aeabi_read_tp is materialized and fixed up correctly
;; in the obj case.
@i = external thread_local global i32
@@ -24,19 +24,13 @@ bb: ; preds = %entry
; ELFASM: bl __aeabi_read_tp
-; ELFOBJ: '.text'
-; ELFOBJ-NEXT: 'sh_type'
-; ELFOBJ-NEXT: 'sh_flags'
-; ELFOBJ-NEXT: 'sh_addr'
-; ELFOBJ-NEXT: 'sh_offset'
-; ELFOBJ-NEXT: 'sh_size'
-; ELFOBJ-NEXT: 'sh_link'
-; ELFOBJ-NEXT: 'sh_info'
-; ELFOBJ-NEXT: 'sh_addralign'
-; ELFOBJ-NEXT: 'sh_entsize'
-;;; BL __aeabi_read_tp is ---+
-;;; V
-; ELFOBJ-NEXT: 00482de9 3c009fe5 00109fe7 feffffeb
+; ELFOBJ: Sections [
+; ELFOBJ: Section {
+; ELFOBJ: Name: .text
+; ELFOBJ: SectionData (
+;;; BL __aeabi_read_tp is ---------+
+;;; V
+; ELFOBJ-NEXT: 0000: 00482DE9 3C009FE5 00109FE7 FEFFFFEB
bb1: ; preds = %entry
diff --git a/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll b/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
index 1272a25793..f13bc1214a 100644
--- a/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
+++ b/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
@@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+; RUN: llvm-readobj -s -t | FileCheck -check-prefix=OBJ %s
; RUN: llc %s -mtriple=armv7-linux-gnueabi -o - | \
; RUN: FileCheck -check-prefix=ASM %s
@@ -15,17 +15,20 @@
; ASM-NEXT: .type _MergedGlobals,%object @ @_MergedGlobals
-
-; OBJ: Section 4
-; OBJ-NEXT: '.bss'
-
-; OBJ: 'array00'
-; OBJ-NEXT: 'st_value', 0x00000000
-; OBJ-NEXT: 'st_size', 0x00000050
-; OBJ-NEXT: 'st_bind', 0x0
-; OBJ-NEXT: 'st_type', 0x1
-; OBJ-NEXT: 'st_other', 0x00
-; OBJ-NEXT: 'st_shndx', 0x0004
+; OBJ: Sections [
+; OBJ: Section {
+; OBJ: Index: 4
+; OBJ-NEXT: Name: .bss
+
+; OBJ: Symbols [
+; OBJ: Symbol {
+; OBJ: Name: array00
+; OBJ-NEXT: Value: 0x0
+; OBJ-NEXT: Size: 80
+; OBJ-NEXT: Binding: Local
+; OBJ-NEXT: Type: Object
+; OBJ-NEXT: Other: 0
+; OBJ-NEXT: Section: .bss
define i32 @main(i32 %argc) nounwind {
%1 = load i32* @sum, align 4
diff --git a/test/CodeGen/ARM/ehabi-mc-section-group.ll b/test/CodeGen/ARM/ehabi-mc-section-group.ll
index 5e4b5096c4..19bfffd277 100644
--- a/test/CodeGen/ARM/ehabi-mc-section-group.ll
+++ b/test/CodeGen/ARM/ehabi-mc-section-group.ll
@@ -8,7 +8,7 @@
; RUN: llc -mtriple arm-unknown-linux-gnueabi \
; RUN: -arm-enable-ehabi -arm-enable-ehabi-descriptors \
; RUN: -filetype=obj -o - %s \
-; RUN: | elf-dump --dump-section-data \
+; RUN: | llvm-readobj -s -sd \
; RUN: | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
@@ -68,12 +68,21 @@ declare void @__cxa_end_catch()
declare void @_ZSt9terminatev()
-; CHECK: # Section 1
-; CHECK-NEXT: (('sh_name', 0x0000002f) # '.group'
-; CHECK: ('_section_data', '01000000 0a000000 0c000000 0e000000')
-; CHECK: # Section 10
-; CHECK-NEXT: (('sh_name', 0x000000e1) # '.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_'
-; CHECK: # Section 12
-; CHECK-NEXT: (('sh_name', 0x000000d7) # '.ARM.extab.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_'
-; CHECK: # Section 14
-; CHECK-NEXT: (('sh_name', 0x00000065) # '.ARM.exidx.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_'
+; CHECK: Section {
+; CHECK: Index: 1
+; CHECK-NEXT: Name: .group (47)
+; CHECK: SectionData (
+; CHECK-NEXT: 0000: 01000000 0A000000 0C000000 0E000000
+; CHECK-NEXT: )
+
+; CHECK: Section {
+; CHECK: Index: 10
+; CHECK-NEXT: Name: .text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_ (225)
+
+; CHECK: Section {
+; CHECK: Index: 12
+; CHECK-NEXT: Name: .ARM.extab.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_ (215)
+
+; CHECK: Section {
+; CHECK: Index: 14
+; CHECK-NEXT: Name: .ARM.exidx.text._Z4testIidEvT_S0_S0_S0_S0_T0_S1_S1_S1_S1_ (101)
diff --git a/test/CodeGen/ARM/ehabi-mc-sh_link.ll b/test/CodeGen/ARM/ehabi-mc-sh_link.ll
index f90e5f384c..ac0a0fc930 100644
--- a/test/CodeGen/ARM/ehabi-mc-sh_link.ll
+++ b/test/CodeGen/ARM/ehabi-mc-sh_link.ll
@@ -7,7 +7,7 @@
; RUN: llc -mtriple arm-unknown-linux-gnueabi \
; RUN: -arm-enable-ehabi -arm-enable-ehabi-descriptors \
; RUN: -filetype=obj -o - %s \
-; RUN: | elf-dump --dump-section-data \
+; RUN: | llvm-readobj -s \
; RUN: | FileCheck %s
define void @test1() nounwind {
@@ -20,28 +20,39 @@ entry:
ret void
}
-; CHECK: # Section 1
-; CHECK-NEXT: (('sh_name', 0x00000010) # '.text'
-
-; CHECK: (('sh_name', 0x00000005) # '.ARM.exidx'
-; CHECK-NEXT: ('sh_type', 0x70000001)
-; CHECK-NEXT: ('sh_flags', 0x00000082)
-; CHECK-NEXT: ('sh_addr', 0x00000000)
-; CHECK-NEXT: ('sh_offset', 0x0000005c)
-; CHECK-NEXT: ('sh_size', 0x00000008)
-; CHECK-NEXT: ('sh_link', 0x00000001)
-; CHECK-NEXT: ('sh_info', 0x00000000)
-; CHECK-NEXT: ('sh_addralign', 0x00000004)
-
-; CHECK: # Section 7
-; CHECK-NEXT: (('sh_name', 0x00000039) # '.test_section'
-
-; CHECK: (('sh_name', 0x0000002f) # '.ARM.exidx.test_section'
-; CHECK-NEXT: ('sh_type', 0x70000001)
-; CHECK-NEXT: ('sh_flags', 0x00000082)
-; CHECK-NEXT: ('sh_addr', 0x00000000)
-; CHECK-NEXT: ('sh_offset', 0x00000068)
-; CHECK-NEXT: ('sh_size', 0x00000008)
-; CHECK-NEXT: ('sh_link', 0x00000007)
-; CHECK-NEXT: ('sh_info', 0x00000000)
-; CHECK-NEXT: ('sh_addralign', 0x00000004)
+; CHECK: Sections [
+; CHECK: Section {
+; CHECK: Index: 1
+; CHECK-NEXT: Name: .text (16)
+
+; CHECK: Section {
+; CHECK: Name: .ARM.exidx (5)
+; CHECK-NEXT: Type: SHT_ARM_EXIDX
+; CHECK-NEXT: Flags [ (0x82)
+; CHECK-NEXT: SHF_ALLOC
+; CHECK-NEXT: SHF_LINK_ORDER
+; CHECK-NEXT: ]
+; CHECK-NEXT: Address: 0x0
+; CHECK-NEXT: Offset: 0x5C
+; CHECK-NEXT: Size: 8
+; CHECK-NEXT: Link: 1
+; CHECK-NEXT: Info: 0
+; CHECK-NEXT: AddressAlignment: 4
+
+; CHECK: Section {
+; CHECK: Index: 7
+; CHECK-NEXT: Name: .test_section (57)
+
+; CHECK: Section {
+; CHECK: Name: .ARM.exidx.test_section (47)
+; CHECK-NEXT: Type: SHT_ARM_EXIDX
+; CHECK-NEXT: Flags [ (0x82)
+; CHECK-NEXT: SHF_ALLOC
+; CHECK-NEXT: SHF_LINK_ORDER
+; CHECK-NEXT: ]
+; CHECK-NEXT: Address: 0x0
+; CHECK-NEXT: Offset: 0x68
+; CHECK-NEXT: Size: 8
+; CHECK-NEXT: Link: 7
+; CHECK-NEXT: Info: 0
+; CHECK-NEXT: AddressAlignment: 4
diff --git a/test/CodeGen/PowerPC/mcm-obj-2.ll b/test/CodeGen/PowerPC/mcm-obj-2.ll
index 2dd1718ba7..bc60b3baf2 100644
--- a/test/CodeGen/PowerPC/mcm-obj-2.ll
+++ b/test/CodeGen/PowerPC/mcm-obj-2.ll
@@ -1,5 +1,5 @@
; RUN: llc -O1 -mcpu=pwr7 -code-model=medium -filetype=obj %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck %s
+; RUN: llvm-readobj -r | FileCheck %s
; FIXME: When asm-parse is available, could make this an assembly test.
@@ -19,18 +19,11 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing function-scoped variable si.
;
-; CHECK: Relocation 0
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM2:[0-9]+]]
-; CHECK-NEXT: 'r_type', 0x00000032
-; CHECK: Relocation 1
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM2]]
-; CHECK-NEXT: 'r_type', 0x00000030
-; CHECK: Relocation 2
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM2]]
-; CHECK-NEXT: 'r_type', 0x00000030
+; CHECK: Relocations [
+; CHECK: Section (1) .text {
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM2:[^ ]+]]
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM2]]
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM2]]
@gi = global i32 5, align 4
@@ -45,18 +38,9 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing file-scope variable gi.
;
-; CHECK: Relocation 3
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM3:[0-9]+]]
-; CHECK-NEXT: 'r_type', 0x00000032
-; CHECK: Relocation 4
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM3]]
-; CHECK-NEXT: 'r_type', 0x00000030
-; CHECK: Relocation 5
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM3]]
-; CHECK-NEXT: 'r_type', 0x00000030
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM3:[^ ]+]]
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM3]]
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM3]]
define double @test_double_const() nounwind {
entry:
@@ -66,12 +50,5 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing a constant.
;
-; CHECK: Relocation 6
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM4:[0-9]+]]
-; CHECK-NEXT: 'r_type', 0x00000032
-; CHECK: Relocation 7
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM4]]
-; CHECK-NEXT: 'r_type', 0x00000030
-
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM4:[^ ]+]]
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM4]]
diff --git a/test/CodeGen/PowerPC/mcm-obj.ll b/test/CodeGen/PowerPC/mcm-obj.ll
index 117c3b3343..720c5fb6dd 100644
--- a/test/CodeGen/PowerPC/mcm-obj.ll
+++ b/test/CodeGen/PowerPC/mcm-obj.ll
@@ -1,7 +1,7 @@
; RUN: llc -O0 -mcpu=pwr7 -code-model=medium -filetype=obj %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=MEDIUM %s
+; RUN: llvm-readobj -r | FileCheck -check-prefix=MEDIUM %s
; RUN: llc -O0 -mcpu=pwr7 -code-model=large -filetype=obj %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=LARGE %s
+; RUN: llvm-readobj -r | FileCheck -check-prefix=LARGE %s
; FIXME: When asm-parse is available, could make this an assembly test.
@@ -21,25 +21,15 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing external variable ei.
;
-; MEDIUM: '.rela.text'
-; MEDIUM: Relocation 0
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM1:[0-9]+]]
-; MEDIUM-NEXT: 'r_type', 0x00000032
-; MEDIUM: Relocation 1
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM1]]
-; MEDIUM-NEXT: 'r_type', 0x00000040
+; MEDIUM: Relocations [
+; MEDIUM: Section (1) .text {
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM1:[^ ]+]]
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM1]]
;
-; LARGE: '.rela.text'
-; LARGE: Relocation 0
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM1:[0-9]+]]
-; LARGE-NEXT: 'r_type', 0x00000032
-; LARGE: Relocation 1
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM1]]
-; LARGE-NEXT: 'r_type', 0x00000040
+; LARGE: Relocations [
+; LARGE: Section (1) .text {
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM1:[^ ]+]]
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM1]]
@test_fn_static.si = internal global i32 0, align 4
@@ -54,26 +44,14 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing function-scoped variable si.
;
-; MEDIUM: Relocation 2
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM2:[0-9]+]]
-; MEDIUM-NEXT: 'r_type', 0x00000032
-; MEDIUM: Relocation 3
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM2]]
-; MEDIUM-NEXT: 'r_type', 0x00000030
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM2:[^ ]+]]
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM2]]
;
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing function-scoped variable si.
;
-; LARGE: Relocation 2
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM2:[0-9]+]]
-; LARGE-NEXT: 'r_type', 0x00000032
-; LARGE: Relocation 3
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM2]]
-; LARGE-NEXT: 'r_type', 0x00000040
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM2:[^ ]+]]
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM2]]
@gi = global i32 5, align 4
@@ -88,26 +66,14 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing file-scope variable gi.
;
-; MEDIUM: Relocation 4
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM3:[0-9]+]]
-; MEDIUM-NEXT: 'r_type', 0x00000032
-; MEDIUM: Relocation 5
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM3]]
-; MEDIUM-NEXT: 'r_type', 0x00000030
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM3:[^ ]+]]
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM3]]
;
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing file-scope variable gi.
;
-; LARGE: Relocation 4
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM3:[0-9]+]]
-; LARGE-NEXT: 'r_type', 0x00000032
-; LARGE: Relocation 5
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM3]]
-; LARGE-NEXT: 'r_type', 0x00000040
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM3:[^ ]+]]
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM3]]
define double @test_double_const() nounwind {
entry:
@@ -117,26 +83,14 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO for
; accessing a constant.
;
-; MEDIUM: Relocation 6
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM4:[0-9]+]]
-; MEDIUM-NEXT: 'r_type', 0x00000032
-; MEDIUM: Relocation 7
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM4]]
-; MEDIUM-NEXT: 'r_type', 0x00000030
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM4:[^ ]+]]
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO [[SYM4]]
;
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing a constant.
;
-; LARGE: Relocation 6
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM4:[0-9]+]]
-; LARGE-NEXT: 'r_type', 0x00000032
-; LARGE: Relocation 7
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM4]]
-; LARGE-NEXT: 'r_type', 0x00000040
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM4:[^ ]+]]
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM4]]
define signext i32 @test_jump_table(i32 signext %i) nounwind {
entry:
@@ -185,23 +139,11 @@ sw.epilog: ; preds = %sw.bb3, %sw.default
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing a jump table address.
;
-; MEDIUM: Relocation 8
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM5:[0-9]+]]
-; MEDIUM-NEXT: 'r_type', 0x00000032
-; MEDIUM: Relocation 9
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM5]]
-; MEDIUM-NEXT: 'r_type', 0x00000040
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM5:[^ ]+]]
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM5]]
;
-; LARGE: Relocation 8
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM5:[0-9]+]]
-; LARGE-NEXT: 'r_type', 0x00000032
-; LARGE: Relocation 9
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM5]]
-; LARGE-NEXT: 'r_type', 0x00000040
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM5:[^ ]+]]
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM5]]
@ti = common global i32 0, align 4
@@ -216,23 +158,11 @@ entry:
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing tentatively declared variable ti.
;
-; MEDIUM: Relocation 10
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM6:[0-9]+]]
-; MEDIUM-NEXT: 'r_type', 0x00000032
-; MEDIUM: Relocation 11
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM6]]
-; MEDIUM-NEXT: 'r_type', 0x00000040
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM6:[^ ]+]]
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM6]]
;
-; LARGE: Relocation 10
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM6:[0-9]+]]
-; LARGE-NEXT: 'r_type', 0x00000032
-; LARGE: Relocation 11
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM6]]
-; LARGE-NEXT: 'r_type', 0x00000040
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM6:[^ ]+]]
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM6]]
define i8* @test_fnaddr() nounwind {
entry:
@@ -248,21 +178,8 @@ declare signext i32 @foo(i32 signext)
; Verify generation of R_PPC64_TOC16_HA and R_PPC64_TOC16_LO_DS for
; accessing function address foo.
;
-; MEDIUM: Relocation 12
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM7:[0-9]+]]
-; MEDIUM-NEXT: 'r_type', 0x00000032
-; MEDIUM: Relocation 13
-; MEDIUM-NEXT: 'r_offset'
-; MEDIUM-NEXT: 'r_sym', 0x[[SYM7]]
-; MEDIUM-NEXT: 'r_type', 0x00000040
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM7:[^ ]+]]
+; MEDIUM-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM7]]
;
-; LARGE: Relocation 12
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM7:[0-9]+]]
-; LARGE-NEXT: 'r_type', 0x00000032
-; LARGE: Relocation 13
-; LARGE-NEXT: 'r_offset'
-; LARGE-NEXT: 'r_sym', 0x[[SYM7]]
-; LARGE-NEXT: 'r_type', 0x00000040
-
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_HA [[SYM7:[^ ]+]]
+; LARGE-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_LO_DS [[SYM7]]
diff --git a/test/CodeGen/PowerPC/pr15359.ll b/test/CodeGen/PowerPC/pr15359.ll
index 12fa3e5ffb..df02dfcb5c 100644
--- a/test/CodeGen/PowerPC/pr15359.ll
+++ b/test/CodeGen/PowerPC/pr15359.ll
@@ -1,5 +1,5 @@
; RUN: llc -O0 -mcpu=pwr7 -filetype=obj %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck %s
+; RUN: llvm-readobj -t | FileCheck %s
target datalayout = "E-p:64:64:64-S0-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
@@ -14,7 +14,9 @@ entry:
; Verify that nextIdx has symbol type TLS.
;
-; CHECK: '.symtab'
-; CHECK: 'nextIdx'
-; CHECK: 'st_type', 0x6
-
+; CHECK: Symbol {
+; CHECK: Name: nextIdx
+; CHECK-NEXT: Value:
+; CHECK-NEXT: Size:
+; CHECK-NEXT: Binding:
+; CHECK-NEXT: Type: TLS
diff --git a/test/CodeGen/PowerPC/tls-gd-obj.ll b/test/CodeGen/PowerPC/tls-gd-obj.ll
index 00b537d532..ffc0db0d14 100644
--- a/test/CodeGen/PowerPC/tls-gd-obj.ll
+++ b/test/CodeGen/PowerPC/tls-gd-obj.ll
@@ -1,5 +1,5 @@
; RUN: llc -mcpu=pwr7 -O0 -filetype=obj -relocation-model=pic %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck %s
+; RUN: llvm-readobj -r | FileCheck %s
; Test correct relocation generation for thread-local storage using
; the general dynamic model and integrated assembly.
@@ -21,21 +21,11 @@ entry:
; and R_PPC64_TLSGD for accessing external variable a, and R_PPC64_REL24
; for the call to __tls_get_addr.
;
-; CHECK: '.rela.text'
-; CHECK: Relocation 0
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1:[0-9a-f]+]]
-; CHECK-NEXT: 'r_type', 0x00000052
-; CHECK: Relocation 1
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x00000050
-; CHECK: Relocation 2
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x0000006b
-; CHECK: Relocation 3
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x{{[0-9a-f]+}}
-; CHECK-NEXT: 'r_type', 0x0000000a
-
+; CHECK: Relocations [
+; CHECK: Section (1) .text {
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_HA a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSGD16_LO a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLSGD a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_REL24 __tls_get_addr
+; CHECK: }
+; CHECK: ]
diff --git a/test/CodeGen/PowerPC/tls-ie-obj.ll b/test/CodeGen/PowerPC/tls-ie-obj.ll
index 3600cc52ba..0f7a352952 100644
--- a/test/CodeGen/PowerPC/tls-ie-obj.ll
+++ b/test/CodeGen/PowerPC/tls-ie-obj.ll
@@ -1,5 +1,5 @@
; RUN: llc -mcpu=pwr7 -O0 -filetype=obj %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck %s
+; RUN: llvm-readobj -r | FileCheck %s
; Test correct relocation generation for thread-local storage
; using the initial-exec model and integrated assembly.
@@ -20,17 +20,10 @@ entry:
; Verify generation of R_PPC64_GOT_TPREL16_DS and R_PPC64_TLS for
; accessing external variable a.
;
-; CHECK: '.rela.text'
-; CHECK: Relocation 0
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1:[0-9a-f]+]]
-; CHECK-NEXT: 'r_type', 0x0000005a
-; CHECK: Relocation 1
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x00000058
-; CHECK: Relocation 2
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x00000043
-
+; CHECK: Relocations [
+; CHECK: Section (1) .text {
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TPREL16_HA a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TPREL16_LO_DS a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLS a
+; CHECK: }
+; CHECK: ]
diff --git a/test/CodeGen/PowerPC/tls-ld-obj.ll b/test/CodeGen/PowerPC/tls-ld-obj.ll
index c521ae405f..29ee876845 100644
--- a/test/CodeGen/PowerPC/tls-ld-obj.ll
+++ b/test/CodeGen/PowerPC/tls-ld-obj.ll
@@ -1,5 +1,5 @@
; RUN: llc -mcpu=pwr7 -O0 -filetype=obj -relocation-model=pic %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck %s
+; RUN: llvm-readobj -r | FileCheck %s
; Test correct relocation generation for thread-local storage using
; the local dynamic model.
@@ -22,29 +22,13 @@ entry:
; accessing external variable a, and R_PPC64_REL24 for the call to
; __tls_get_addr.
;
-; CHECK: '.rela.text'
-; CHECK: Relocation 0
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1:[0-9a-f]+]]
-; CHECK-NEXT: 'r_type', 0x00000056
-; CHECK: Relocation 1
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x00000054
-; CHECK: Relocation 2
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x0000006c
-; CHECK: Relocation 3
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x{{[0-9a-f]+}}
-; CHECK-NEXT: 'r_type', 0x0000000a
-; CHECK: Relocation 4
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x0000004d
-; CHECK: Relocation 5
-; CHECK-NEXT: 'r_offset'
-; CHECK-NEXT: 'r_sym', 0x[[SYM1]]
-; CHECK-NEXT: 'r_type', 0x0000004b
-
+; CHECK: Relocations [
+; CHECK: Section (1) .text {
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSLD16_HA a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_GOT_TLSLD16_LO a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_TLSLD a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_REL24 __tls_get_addr
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_DTPREL16_HA a
+; CHECK: 0x{{[0-9,A-F]+}} R_PPC64_DTPREL16_LO a
+; CHECK: }
+; CHECK: ]
diff --git a/test/MC/AArch64/elf-globaladdress.ll b/test/MC/AArch64/elf-globaladdress.ll
index 190439d8fe..bae6b5bde3 100644
--- a/test/MC/AArch64/elf-globaladdress.ll
+++ b/test/MC/AArch64/elf-globaladdress.ll
@@ -1,10 +1,10 @@
;; RUN: llc -mtriple=aarch64-none-linux-gnu -filetype=obj %s -o - | \
-;; RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+;; RUN: llvm-readobj -h -r | FileCheck -check-prefix=OBJ %s
; Also take it on a round-trip through llvm-mc to stretch assembly-parsing's legs:
;; RUN: llc -mtriple=aarch64-none-linux-gnu %s -o - | \
;; RUN: llvm-mc -arch=aarch64 -filetype=obj -o - | \
-;; RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+;; RUN: llvm-readobj -h -r | FileCheck -check-prefix=OBJ %s
@var8 = global i8 0
@var16 = global i16 0
@@ -35,77 +35,28 @@ define void @address() {
}
; Check we're using EM_AARCH64
-; OBJ: 'e_machine', 0x00
-
-; OBJ: .rela.text
-
-; var8
-; R_AARCH64_ADR_PREL_PG_HI21 against var8
-; OBJ: 'r_sym', 0x0000000f
-; OBJ-NEXT: 'r_type', 0x00000113
-
-; R_AARCH64_LDST8_ABS_LO12_NC against var8
-; OBJ: 'r_sym', 0x0000000f
-; OBJ-NEXT: 'r_type', 0x00000116
-
-
-; var16
-; R_AARCH64_ADR_PREL_PG_HI21 against var16
-; OBJ: 'r_sym', 0x0000000c
-; OBJ-NEXT: 'r_type', 0x00000113
-
-; R_AARCH64_LDST16_ABS_LO12_NC against var16
-; OBJ: 'r_sym', 0x0000000c
-; OBJ-NEXT: 'r_type', 0x0000011c
-
-
-; var32
-; R_AARCH64_ADR_PREL_PG_HI21 against var32
-; OBJ: 'r_sym', 0x0000000d
-; OBJ-NEXT: 'r_type', 0x00000113
-
-; R_AARCH64_LDST32_ABS_LO12_NC against var32
-; OBJ: 'r_sym', 0x0000000d
-; OBJ-NEXT: 'r_type', 0x0000011d
-
-
-; var64
-; R_AARCH64_ADR_PREL_PG_HI21 against var64
-; OBJ: 'r_sym', 0x0000000e
-; OBJ-NEXT: 'r_type', 0x00000113
-
-; R_AARCH64_LDST64_ABS_LO12_NC against var64
-; OBJ: 'r_sym', 0x0000000e
-; OBJ-NEXT: 'r_type', 0x0000011e
+; OBJ: ElfHeader {
+; OBJ: Machine: EM_AARCH64
+; OBJ: }
+
+; OBJ: Relocations [
+; OBJ: Section (1) .text {
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var8
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST8_ABS_LO12_NC var8
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var16
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST16_ABS_LO12_NC var16
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var32
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST32_ABS_LO12_NC var32
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var64
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST64_ABS_LO12_NC var64
; This is on the store, so not really important, but it stops the next
; match working.
-; R_AARCH64_LDST64_ABS_LO12_NC against var64
-; OBJ: 'r_sym', 0x0000000e
-; OBJ-NEXT: 'r_type', 0x0000011e
-
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_LDST64_ABS_LO12_NC var64
; Pure address-calculation against var64
-; R_AARCH64_ADR_PREL_PG_HI21 against var64
-; OBJ: 'r_sym', 0x0000000e
-; OBJ-NEXT: 'r_type', 0x00000113
-
-; R_AARCH64_ADD_ABS_LO12_NC against var64
-; OBJ: 'r_sym', 0x0000000e
-; OBJ-NEXT: 'r_type', 0x00000115
-
-
-; Make sure the symbols don't move around, otherwise relocation info
-; will be wrong:
-
-; OBJ: Symbol 12
-; OBJ-NEXT: var16
-
-; OBJ: Symbol 13
-; OBJ-NEXT: var32
-
-; OBJ: Symbol 14
-; OBJ-NEXT: var64
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 var64
+; OBJ: 0x{{[0-9,A-F]+}} R_AARCH64_ADD_ABS_LO12_NC var64
-; OBJ: Symbol 15
-; OBJ-NEXT: var8
+; OBJ: }
+; OBJ: ]
diff --git a/test/MC/AArch64/elf-reloc-addsubimm.s b/test/MC/AArch64/elf-reloc-addsubimm.s
index 7fa6e90b5d..30490be7e1 100644
--- a/test/MC/AArch64/elf-reloc-addsubimm.s
+++ b/test/MC/AArch64/elf-reloc-addsubimm.s
@@ -1,13 +1,10 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
add x2, x3, #:lo12:some_label
-// OBJ: .rela.text
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000115
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: some_label \ No newline at end of file
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_ADD_ABS_LO12_NC some_label 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/elf-reloc-condbr.s b/test/MC/AArch64/elf-reloc-condbr.s
index 283d3b95d0..f55ba86bf3 100644
--- a/test/MC/AArch64/elf-reloc-condbr.s
+++ b/test/MC/AArch64/elf-reloc-condbr.s
@@ -1,13 +1,10 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
b.eq somewhere
-// OBJ: .rela.text
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000118
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: somewhere \ No newline at end of file
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_CONDBR19 somewhere 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/elf-reloc-ldrlit.s b/test/MC/AArch64/elf-reloc-ldrlit.s
index ce9ff49db4..fa318df1c9 100644
--- a/test/MC/AArch64/elf-reloc-ldrlit.s
+++ b/test/MC/AArch64/elf-reloc-ldrlit.s
@@ -1,28 +1,16 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
ldr x0, some_label
ldr w3, some_label
ldrsw x9, some_label
prfm pldl3keep, some_label
-// OBJ: .rela.text
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000111
-
-// OBJ: 'r_offset', 0x0000000000000004
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000111
-
-// OBJ: 'r_offset', 0x0000000000000008
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000111
-
-// OBJ: 'r_offset', 0x000000000000000c
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000111
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: some_label \ No newline at end of file
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_LD_PREL_LO19 some_label 0x0
+// OBJ-NEXT: 0x4 R_AARCH64_LD_PREL_LO19 some_label 0x0
+// OBJ-NEXT: 0x8 R_AARCH64_LD_PREL_LO19 some_label 0x0
+// OBJ-NEXT: 0xC R_AARCH64_LD_PREL_LO19 some_label 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/elf-reloc-ldstunsimm.s b/test/MC/AArch64/elf-reloc-ldstunsimm.s
index 345fc8247d..6ad5c1f634 100644
--- a/test/MC/AArch64/elf-reloc-ldstunsimm.s
+++ b/test/MC/AArch64/elf-reloc-ldstunsimm.s
@@ -1,5 +1,5 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
ldrb w0, [sp, #:lo12:some_label]
ldrh w0, [sp, #:lo12:some_label]
@@ -7,28 +7,12 @@
ldr x0, [sp, #:lo12:some_label]
str q0, [sp, #:lo12:some_label]
-// OBJ: .rela.text
-
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000116
-
-// OBJ: 'r_offset', 0x0000000000000004
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000011c
-
-// OBJ: 'r_offset', 0x0000000000000008
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000011d
-
-// OBJ: 'r_offset', 0x000000000000000c
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000011e
-
-// OBJ: 'r_offset', 0x0000000000000010
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000012b
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: some_label
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_LDST8_ABS_LO12_NC some_label 0x0
+// OBJ-NEXT: 0x4 R_AARCH64_LDST16_ABS_LO12_NC some_label 0x0
+// OBJ-NEXT: 0x8 R_AARCH64_LDST32_ABS_LO12_NC some_label 0x0
+// OBJ-NEXT: 0xC R_AARCH64_LDST64_ABS_LO12_NC some_label 0x0
+// OBJ-NEXT: 0x10 R_AARCH64_LDST128_ABS_LO12_NC some_label 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/elf-reloc-movw.s b/test/MC/AArch64/elf-reloc-movw.s
index cb7dc6768e..1538d5dd1e 100644
--- a/test/MC/AArch64/elf-reloc-movw.s
+++ b/test/MC/AArch64/elf-reloc-movw.s
@@ -1,5 +1,5 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
movz x0, #:abs_g0:some_label
movk x0, #:abs_g0_nc:some_label
@@ -21,78 +21,22 @@
movz x19, #:abs_g2_s:some_label
movn x19, #:abs_g2_s:some_label
-// OBJ: .rela.text
-// :abs_g0: => R_AARCH64_MOVW_UABS_G0
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000107
-
-// :abs_g0_nc: => R_AARCH64_MOVW_UABS_G0_NC
-// OBJ: 'r_offset', 0x0000000000000004
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000108
-
-// :abs_g1: => R_AARCH64_MOVW_UABS_G1
-// OBJ: 'r_offset', 0x0000000000000008
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000109
-
-// :abs_g1_nc: => R_AARCH64_MOVW_UABS_G1_NC
-// OBJ: 'r_offset', 0x000000000000000c
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010a
-
-// :abs_g2: => R_AARCH64_MOVW_UABS_G2
-// OBJ: 'r_offset', 0x0000000000000010
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010b
-
-// :abs_g2_nc: => R_AARCH64_MOVW_UABS_G2_NC
-// OBJ: 'r_offset', 0x0000000000000014
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010c
-
-// :abs_g3: => R_AARCH64_MOVW_UABS_G3
-// OBJ: 'r_offset', 0x0000000000000018
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010d
-
-// :abs_g3: => R_AARCH64_MOVW_UABS_G3
-// OBJ: 'r_offset', 0x000000000000001c
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010d
-
-// :abs_g0_s: => R_AARCH64_MOVW_SABS_G0
-// OBJ: 'r_offset', 0x0000000000000020
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010e
-
-// :abs_g0_s: => R_AARCH64_MOVW_SABS_G0
-// OBJ: 'r_offset', 0x0000000000000024
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010e
-
-// :abs_g1_s: => R_AARCH64_MOVW_SABS_G1
-// OBJ: 'r_offset', 0x0000000000000028
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010f
-
-// :abs_g1_s: => R_AARCH64_MOVW_SABS_G1
-// OBJ: 'r_offset', 0x000000000000002c
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000010f
-
-// :abs_g2_s: => R_AARCH64_MOVW_SABS_G2
-// OBJ: 'r_offset', 0x0000000000000030
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000110
-
-// :abs_g2_s: => R_AARCH64_MOVW_SABS_G2
-// OBJ: 'r_offset', 0x0000000000000034
-// OBJ: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000110
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: some_label
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_MOVW_UABS_G0 some_label 0x0
+// OBJ-NEXT: 0x4 R_AARCH64_MOVW_UABS_G0_NC some_label 0x0
+// OBJ-NEXT: 0x8 R_AARCH64_MOVW_UABS_G1 some_label 0x0
+// OBJ-NEXT: 0xC R_AARCH64_MOVW_UABS_G1_NC some_label 0x0
+// OBJ-NEXT: 0x10 R_AARCH64_MOVW_UABS_G2 some_label 0x0
+// OBJ-NEXT: 0x14 R_AARCH64_MOVW_UABS_G2_NC some_label 0x0
+// OBJ-NEXT: 0x18 R_AARCH64_MOVW_UABS_G3 some_label 0x0
+// OBJ-NEXT: 0x1C R_AARCH64_MOVW_UABS_G3 some_label 0x0
+// OBJ-NEXT: 0x20 R_AARCH64_MOVW_SABS_G0 some_label 0x0
+// OBJ-NEXT: 0x24 R_AARCH64_MOVW_SABS_G0 some_label 0x0
+// OBJ-NEXT: 0x28 R_AARCH64_MOVW_SABS_G1 some_label 0x0
+// OBJ-NEXT: 0x2C R_AARCH64_MOVW_SABS_G1 some_label 0x0
+// OBJ-NEXT: 0x30 R_AARCH64_MOVW_SABS_G2 some_label 0x0
+// OBJ-NEXT: 0x34 R_AARCH64_MOVW_SABS_G2 some_label 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/elf-reloc-pcreladdressing.s b/test/MC/AArch64/elf-reloc-pcreladdressing.s
index 39a8ba9402..52b75a136f 100644
--- a/test/MC/AArch64/elf-reloc-pcreladdressing.s
+++ b/test/MC/AArch64/elf-reloc-pcreladdressing.s
@@ -1,29 +1,17 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
adr x2, some_label
adrp x5, some_label
adrp x5, :got:some_label
ldr x0, [x5, #:got_lo12:some_label]
-// OBJ: .rela.text
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000112
-
-// OBJ: 'r_offset', 0x0000000000000004
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000113
-
-// OBJ: 'r_offset', 0x0000000000000008
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000137
-
-// OBJ: 'r_offset', 0x000000000000000c
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000138
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: some_label \ No newline at end of file
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_ADR_PREL_LO21 some_label 0x0
+// OBJ-NEXT: 0x4 R_AARCH64_ADR_PREL_PG_HI21 some_label 0x0
+// OBJ-NEXT: 0x8 R_AARCH64_ADR_GOT_PAGE some_label 0x0
+// OBJ-NEXT: 0xC R_AARCH64_LD64_GOT_LO12_NC some_label 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/elf-reloc-tstb.s b/test/MC/AArch64/elf-reloc-tstb.s
index c5e2981a22..aecd65bd8a 100644
--- a/test/MC/AArch64/elf-reloc-tstb.s
+++ b/test/MC/AArch64/elf-reloc-tstb.s
@@ -1,18 +1,12 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
tbz x6, #45, somewhere
tbnz w3, #15, somewhere
-// OBJ: .rela.text
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000117
-
-// OBJ: 'r_offset', 0x0000000000000004
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x00000117
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: somewhere
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_TSTBR14 somewhere 0x0
+// OBJ-NEXT: 0x4 R_AARCH64_TSTBR14 somewhere 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/elf-reloc-uncondbrimm.s b/test/MC/AArch64/elf-reloc-uncondbrimm.s
index 0e97bc6669..7a7238f038 100644
--- a/test/MC/AArch64/elf-reloc-uncondbrimm.s
+++ b/test/MC/AArch64/elf-reloc-uncondbrimm.s
@@ -1,18 +1,12 @@
// RUN: llvm-mc -arch=aarch64 -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
b somewhere
bl somewhere
-// OBJ: .rela.text
-// OBJ: 'r_offset', 0x0000000000000000
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000011a
-
-// OBJ: 'r_offset', 0x0000000000000004
-// OBJ-NEXT: 'r_sym', 0x00000005
-// OBJ-NEXT: 'r_type', 0x0000011b
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: somewhere \ No newline at end of file
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_AARCH64_JUMP26 somewhere 0x0
+// OBJ-NEXT: 0x4 R_AARCH64_CALL26 somewhere 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/AArch64/tls-relocs.s b/test/MC/AArch64/tls-relocs.s
index 690fa8c009..7697db20aa 100644
--- a/test/MC/AArch64/tls-relocs.s
+++ b/test/MC/AArch64/tls-relocs.s
@@ -1,9 +1,6 @@
// RUN: llvm-mc -arch=aarch64 -show-encoding < %s | FileCheck %s
-// RUN: llvm-mc -arch=aarch64 -filetype=obj < %s -o %t
-// RUN: elf-dump %t | FileCheck --check-prefix=CHECK-ELF %s
-// RUN: llvm-objdump -r %t | FileCheck --check-prefix=CHECK-ELF-NAMES %s
-
-// CHECK-ELF: .rela.text
+// RUN: llvm-mc -arch=aarch64 -filetype=obj < %s -o - | \
+// RUN: llvm-readobj -r -t | FileCheck --check-prefix=CHECK-ELF %s
// TLS local-dynamic forms
movz x1, #:dtprel_g2:var
@@ -19,27 +16,13 @@
// CHECK-NEXT: movn x4, #:dtprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g2:var, kind: fixup_a64_movw_dtprel_g2
-// CHECK-ELF: # Relocation 0
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000000)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM:0x[0-9a-f]+]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
-// CHECK-ELF: # Relocation 1
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000004)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
-// CHECK-ELF: # Relocation 2
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000008)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
-// CHECK-ELF: # Relocation 3
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000000c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020b)
-
-// CHECK-ELF-NAMES: 0 R_AARCH64_TLSLD_MOVW_DTPREL_G2
-// CHECK-ELF-NAMES: 4 R_AARCH64_TLSLD_MOVW_DTPREL_G2
-// CHECK-ELF-NAMES: 8 R_AARCH64_TLSLD_MOVW_DTPREL_G2
-// CHECK-ELF-NAMES: 12 R_AARCH64_TLSLD_MOVW_DTPREL_G2
+// CHECK-ELF: Relocations [
+// CHECK-ELF-NEXT: Section (1) .text {
+// CHECK-ELF-NEXT: 0x0 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM:[^ ]+]]
+// CHECK-ELF-NEXT: 0x4 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x8 R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xC R_AARCH64_TLSLD_MOVW_DTPREL_G2 [[VARSYM]]
+
movz x5, #:dtprel_g1:var
movn x6, #:dtprel_g1:var
@@ -54,27 +37,11 @@
// CHECK-NEXT: movn w8, #:dtprel_g1:var // encoding: [0x08'A',A,0xa0'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g1:var, kind: fixup_a64_movw_dtprel_g1
-// CHECK-ELF: # Relocation 4
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000010)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
-// CHECK-ELF: # Relocation 5
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000014)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
-// CHECK-ELF: # Relocation 6
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000018)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
-// CHECK-ELF: # Relocation 7
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000001c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020c)
-
-// CHECK-ELF-NAMES: 16 R_AARCH64_TLSLD_MOVW_DTPREL_G1
-// CHECK-ELF-NAMES: 20 R_AARCH64_TLSLD_MOVW_DTPREL_G1
-// CHECK-ELF-NAMES: 24 R_AARCH64_TLSLD_MOVW_DTPREL_G1
-// CHECK-ELF-NAMES: 28 R_AARCH64_TLSLD_MOVW_DTPREL_G1
+// CHECK-ELF-NEXT: 0x10 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x14 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x18 R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x1C R_AARCH64_TLSLD_MOVW_DTPREL_G1 [[VARSYM]]
+
movk x9, #:dtprel_g1_nc:var
movk w10, #:dtprel_g1_nc:var
@@ -83,17 +50,9 @@
// CHECK-NEXT: movk w10, #:dtprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g1_nc:var, kind: fixup_a64_movw_dtprel_g1_nc
-// CHECK-ELF: # Relocation 8
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020d)
-// CHECK-ELF: # Relocation 9
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000024)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020d)
+// CHECK-ELF-NEXT: 0x20 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0x24 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 32 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
-// CHECK-ELF-NAMES: 36 R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
movz x11, #:dtprel_g0:var
movn x12, #:dtprel_g0:var
@@ -107,28 +66,10 @@
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0:var, kind: fixup_a64_movw_dtprel_g0
// CHECK-NEXT: movn w14, #:dtprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A']
-
-// CHECK-ELF: # Relocation 10
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000028)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
-// CHECK-ELF: # Relocation 11
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000002c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
-// CHECK-ELF: # Relocation 12
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000030)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
-// CHECK-ELF: # Relocation 13
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000034)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020e)
-
-// CHECK-ELF-NAMES: 40 R_AARCH64_TLSLD_MOVW_DTPREL_G0
-// CHECK-ELF-NAMES: 44 R_AARCH64_TLSLD_MOVW_DTPREL_G0
-// CHECK-ELF-NAMES: 48 R_AARCH64_TLSLD_MOVW_DTPREL_G0
-// CHECK-ELF-NAMES: 52 R_AARCH64_TLSLD_MOVW_DTPREL_G0
+// CHECK-ELF-NEXT: 0x28 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x2C R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x30 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x34 R_AARCH64_TLSLD_MOVW_DTPREL_G0 [[VARSYM]]
movk x15, #:dtprel_g0_nc:var
@@ -138,17 +79,9 @@
// CHECK-NEXT: movk w16, #:dtprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_g0_nc:var, kind: fixup_a64_movw_dtprel_g0_nc
-// CHECK-ELF: # Relocation 14
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000038)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020f)
-// CHECK-ELF: # Relocation 15
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000003c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000020f)
+// CHECK-ELF-NEXT: 0x38 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0x3C R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 56 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
-// CHECK-ELF-NAMES: 60 R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
add x17, x18, #:dtprel_hi12:var, lsl #12
add w19, w20, #:dtprel_hi12:var, lsl #12
@@ -157,17 +90,8 @@
// CHECK-NEXT: add w19, w20, #:dtprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_hi12:var, kind: fixup_a64_add_dtprel_hi12
-// CHECK-ELF: # Relocation 16
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000040)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000210)
-// CHECK-ELF: # Relocation 17
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000044)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000210)
-
-// CHECK-ELF-NAMES: 64 R_AARCH64_TLSLD_ADD_DTPREL_HI12
-// CHECK-ELF-NAMES: 68 R_AARCH64_TLSLD_ADD_DTPREL_HI12
+// CHECK-ELF-NEXT: 0x40 R_AARCH64_TLSLD_ADD_DTPREL_HI12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x44 R_AARCH64_TLSLD_ADD_DTPREL_HI12 [[VARSYM]]
add x21, x22, #:dtprel_lo12:var
@@ -177,17 +101,9 @@
// CHECK-NEXT: add w23, w24, #:dtprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12:var, kind: fixup_a64_add_dtprel_lo12
-// CHECK-ELF: # Relocation 18
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000048)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000211)
-// CHECK-ELF: # Relocation 19
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000004c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000211)
+// CHECK-ELF-NEXT: 0x48 R_AARCH64_TLSLD_ADD_DTPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x4C R_AARCH64_TLSLD_ADD_DTPREL_LO12 [[VARSYM]]
-// CHECK-ELF-NAMES: 72 R_AARCH64_TLSLD_ADD_DTPREL_LO12
-// CHECK-ELF-NAMES: 76 R_AARCH64_TLSLD_ADD_DTPREL_LO12
add x25, x26, #:dtprel_lo12_nc:var
add w27, w28, #:dtprel_lo12_nc:var
@@ -196,17 +112,9 @@
// CHECK-NEXT: add w27, w28, #:dtprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_add_dtprel_lo12_nc
-// CHECK-ELF: # Relocation 20
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000050)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000212)
-// CHECK-ELF: # Relocation 21
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000054)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000212)
+// CHECK-ELF-NEXT: 0x50 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0x54 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 80 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
-// CHECK-ELF-NAMES: 84 R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
ldrb w29, [x30, #:dtprel_lo12:var]
ldrsb x29, [x28, #:dtprel_lo12_nc:var]
@@ -215,17 +123,9 @@
// CHECK-NEXT: ldrsb x29, [x28, #:dtprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst8_dtprel_lo12_nc
-// CHECK-ELF: # Relocation 22
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000058)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000213)
-// CHECK-ELF: # Relocation 23
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000005c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000214)
+// CHECK-ELF-NEXT: 0x58 R_AARCH64_TLSLD_LDST8_DTPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x5C R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 88 R_AARCH64_TLSLD_LDST8_DTPREL_LO12
-// CHECK-ELF-NAMES: 92 R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC
strh w27, [x26, #:dtprel_lo12:var]
ldrsh x25, [x24, #:dtprel_lo12_nc:var]
@@ -234,17 +134,9 @@
// CHECK-NEXT: ldrsh x25, [x24, #:dtprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst16_dtprel_lo12_n
-// CHECK-ELF: # Relocation 24
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000060)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000215)
-// CHECK-ELF: # Relocation 25
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000064)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000216)
+// CHECK-ELF-NEXT: 0x60 R_AARCH64_TLSLD_LDST16_DTPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x64 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 96 R_AARCH64_TLSLD_LDST16_DTPREL_LO12
-// CHECK-ELF-NAMES: 100 R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC
ldr w23, [x22, #:dtprel_lo12:var]
ldrsw x21, [x20, #:dtprel_lo12_nc:var]
@@ -253,17 +145,9 @@
// CHECK-NEXT: ldrsw x21, [x20, #:dtprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst32_dtprel_lo12_n
-// CHECK-ELF: # Relocation 26
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000068)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000217)
-// CHECK-ELF: # Relocation 27
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000006c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000218)
+// CHECK-ELF-NEXT: 0x68 R_AARCH64_TLSLD_LDST32_DTPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x6C R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 104 R_AARCH64_TLSLD_LDST32_DTPREL_LO12
-// CHECK-ELF-NAMES: 108 R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC
ldr x19, [x18, #:dtprel_lo12:var]
str x17, [x16, #:dtprel_lo12_nc:var]
@@ -273,17 +157,9 @@
// CHECK-NEXT: // fixup A - offset: 0, value: :dtprel_lo12_nc:var, kind: fixup_a64_ldst64_dtprel_lo12_nc
-// CHECK-ELF: # Relocation 28
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000070)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000219)
-// CHECK-ELF: # Relocation 29
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000074)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021a)
+// CHECK-ELF-NEXT: 0x70 R_AARCH64_TLSLD_LDST64_DTPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x74 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 112 R_AARCH64_TLSLD_LDST64_DTPREL_LO12
-// CHECK-ELF-NAMES: 116 R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC
// TLS initial-exec forms
movz x15, #:gottprel_g1:var
@@ -293,17 +169,9 @@
// CHECK-NEXT: movz w14, #:gottprel_g1:var // encoding: [0x0e'A',A,0xa0'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g1:var, kind: fixup_a64_movw_gottprel_g1
-// CHECK-ELF: # Relocation 30
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000078)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021b)
-// CHECK-ELF: # Relocation 31
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000007c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021b)
+// CHECK-ELF-NEXT: 0x78 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x7C R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 [[VARSYM]]
-// CHECK-ELF-NAMES: 120 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1
-// CHECK-ELF-NAMES: 124 R_AARCH64_TLSIE_MOVW_GOTTPREL_G1
movk x13, #:gottprel_g0_nc:var
movk w12, #:gottprel_g0_nc:var
@@ -312,17 +180,9 @@
// CHECK-NEXT: movk w12, #:gottprel_g0_nc:var // encoding: [0x0c'A',A,0x80'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :gottprel_g0_nc:var, kind: fixup_a64_movw_gottprel_g0_nc
-// CHECK-ELF: # Relocation 32
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000080)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021c)
-// CHECK-ELF: # Relocation 33
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000084)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021c)
+// CHECK-ELF-NEXT: 0x80 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0x84 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 128 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
-// CHECK-ELF-NAMES: 132 R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
adrp x11, :gottprel:var
ldr x10, [x0, #:gottprel_lo12:var]
@@ -334,22 +194,10 @@
// CHECK-NEXT: ldr x9, :gottprel:var // encoding: [0x09'A',A,A,0x58'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :gottprel:var, kind: fixup_a64_ld_gottprel_prel19
-// CHECK-ELF: # Relocation 34
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000088)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021d)
-// CHECK-ELF: # Relocation 35
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000008c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021e)
-// CHECK-ELF: # Relocation 36
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000090)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000021f)
-
-// CHECK-ELF-NAMES: 136 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE
-// CHECK-ELF-NAMES: 140 R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC
-// CHECK-ELF-NAMES: 144 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19
+// CHECK-ELF-NEXT: 0x88 R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x8C R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0x90 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 [[VARSYM]]
+
// TLS local-exec forms
movz x3, #:tprel_g2:var
@@ -359,17 +207,9 @@
// CHECK-NEXT: movn x4, #:tprel_g2:var // encoding: [0x04'A',A,0xc0'A',0x92'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g2:var, kind: fixup_a64_movw_tprel_g2
-// CHECK-ELF: # Relocation 37
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000094)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000220)
-// CHECK-ELF: # Relocation 38
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000098)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000220)
+// CHECK-ELF-NEXT: 0x94 R_AARCH64_TLSLE_MOVW_TPREL_G2 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x98 R_AARCH64_TLSLE_MOVW_TPREL_G2 [[VARSYM]]
-// CHECK-ELF-NAMES: 148 R_AARCH64_TLSLE_MOVW_TPREL_G2
-// CHECK-ELF-NAMES: 152 R_AARCH64_TLSLE_MOVW_TPREL_G2
movz x5, #:tprel_g1:var
movn x6, #:tprel_g1:var
@@ -384,27 +224,11 @@
// CHECK-NEXT: movn w8, #:tprel_g1:var // encoding: [0x08'A',A,0xa0'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1:var, kind: fixup_a64_movw_tprel_g1
-// CHECK-ELF: # Relocation 39
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000009c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000221)
-// CHECK-ELF: # Relocation 40
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a0)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000221)
-// CHECK-ELF: # Relocation 41
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a4)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000221)
-// CHECK-ELF: # Relocation 42
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000a8)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000221)
-
-// CHECK-ELF-NAMES: 156 R_AARCH64_TLSLE_MOVW_TPREL_G1
-// CHECK-ELF-NAMES: 160 R_AARCH64_TLSLE_MOVW_TPREL_G1
-// CHECK-ELF-NAMES: 164 R_AARCH64_TLSLE_MOVW_TPREL_G1
-// CHECK-ELF-NAMES: 168 R_AARCH64_TLSLE_MOVW_TPREL_G1
+// CHECK-ELF-NEXT: 0x9C R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xA0 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xA4 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xA8 R_AARCH64_TLSLE_MOVW_TPREL_G1 [[VARSYM]]
+
movk x9, #:tprel_g1_nc:var
movk w10, #:tprel_g1_nc:var
@@ -413,17 +237,9 @@
// CHECK-NEXT: movk w10, #:tprel_g1_nc:var // encoding: [0x0a'A',A,0xa0'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g1_nc:var, kind: fixup_a64_movw_tprel_g1_nc
-// CHECK-ELF: # Relocation 43
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000ac)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000222)
-// CHECK-ELF: # Relocation 44
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b0)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000222)
+// CHECK-ELF-NEXT: 0xAC R_AARCH64_TLSLE_MOVW_TPREL_G1_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0xB0 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 172 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
-// CHECK-ELF-NAMES: 176 R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
movz x11, #:tprel_g0:var
movn x12, #:tprel_g0:var
@@ -438,27 +254,11 @@
// CHECK-NEXT: movn w14, #:tprel_g0:var // encoding: [0x0e'A',A,0x80'A',0x12'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0:var, kind: fixup_a64_movw_tprel_g0
-// CHECK-ELF: # Relocation 45
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b4)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000223)
-// CHECK-ELF: # Relocation 46
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000b8)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000223)
-// CHECK-ELF: # Relocation 47
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000bc)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000223)
-// CHECK-ELF: # Relocation 48
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c0)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000223)
-
-// CHECK-ELF-NAMES: 180 R_AARCH64_TLSLE_MOVW_TPREL_G0
-// CHECK-ELF-NAMES: 184 R_AARCH64_TLSLE_MOVW_TPREL_G0
-// CHECK-ELF-NAMES: 188 R_AARCH64_TLSLE_MOVW_TPREL_G0
-// CHECK-ELF-NAMES: 192 R_AARCH64_TLSLE_MOVW_TPREL_G0
+// CHECK-ELF-NEXT: 0xB4 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xB8 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xBC R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xC0 R_AARCH64_TLSLE_MOVW_TPREL_G0 [[VARSYM]]
+
movk x15, #:tprel_g0_nc:var
movk w16, #:tprel_g0_nc:var
@@ -467,17 +267,9 @@
// CHECK-NEXT: movk w16, #:tprel_g0_nc:var // encoding: [0x10'A',A,0x80'A',0x72'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_g0_nc:var, kind: fixup_a64_movw_tprel_g0_nc
-// CHECK-ELF: # Relocation 49
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c4)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000224)
-// CHECK-ELF: # Relocation 50
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000c8)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000224)
+// CHECK-ELF-NEXT: 0xC4 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0xC8 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 196 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC
-// CHECK-ELF-NAMES: 200 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC
add x17, x18, #:tprel_hi12:var, lsl #12
add w19, w20, #:tprel_hi12:var, lsl #12
@@ -486,17 +278,9 @@
// CHECK-NEXT: add w19, w20, #:tprel_hi12:var, lsl #12 // encoding: [0x93'A',0x02'A',0x40'A',0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_hi12:var, kind: fixup_a64_add_tprel_hi12
-// CHECK-ELF: # Relocation 51
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000cc)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000225)
-// CHECK-ELF: # Relocation 52
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d0)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000225)
+// CHECK-ELF-NEXT: 0xCC R_AARCH64_TLSLE_ADD_TPREL_HI12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xD0 R_AARCH64_TLSLE_ADD_TPREL_HI12 [[VARSYM]]
-// CHECK-ELF-NAMES: 204 R_AARCH64_TLSLE_ADD_TPREL_HI12
-// CHECK-ELF-NAMES: 208 R_AARCH64_TLSLE_ADD_TPREL_HI12
add x21, x22, #:tprel_lo12:var
add w23, w24, #:tprel_lo12:var
@@ -505,17 +289,9 @@
// CHECK-NEXT: add w23, w24, #:tprel_lo12:var // encoding: [0x17'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12:var, kind: fixup_a64_add_tprel_lo12
-// CHECK-ELF: # Relocation 53
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d4)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000226)
-// CHECK-ELF: # Relocation 54
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000d8)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000226)
+// CHECK-ELF-NEXT: 0xD4 R_AARCH64_TLSLE_ADD_TPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xD8 R_AARCH64_TLSLE_ADD_TPREL_LO12 [[VARSYM]]
-// CHECK-ELF-NAMES: 212 R_AARCH64_TLSLE_ADD_TPREL_LO12
-// CHECK-ELF-NAMES: 216 R_AARCH64_TLSLE_ADD_TPREL_LO12
add x25, x26, #:tprel_lo12_nc:var
add w27, w28, #:tprel_lo12_nc:var
@@ -524,18 +300,9 @@
// CHECK-NEXT: add w27, w28, #:tprel_lo12_nc:var // encoding: [0x9b'A',0x03'A',A,0x11'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_add_tprel_lo12_nc
-// CHECK-ELF: # Relocation 55
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000dc)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000227)
-// CHECK-ELF: # Relocation 56
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e0)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000227)
-
+// CHECK-ELF-NEXT: 0xDC R_AARCH64_TLSLE_ADD_TPREL_LO12_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0xE0 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 220 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC
-// CHECK-ELF-NAMES: 224 R_AARCH64_TLSLE_ADD_TPREL_LO12_NC
ldrb w29, [x30, #:tprel_lo12:var]
ldrsb x29, [x28, #:tprel_lo12_nc:var]
@@ -544,17 +311,9 @@
// CHECK-NEXT: ldrsb x29, [x28, #:tprel_lo12_nc:var] // encoding: [0x9d'A',0x03'A',0x80'A',0x39'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst8_tprel_lo12_nc
-// CHECK-ELF: # Relocation 57
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e4)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000228)
-// CHECK-ELF: # Relocation 58
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000e8)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000229)
+// CHECK-ELF-NEXT: 0xE4 R_AARCH64_TLSLE_LDST8_TPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xE8 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 228 R_AARCH64_TLSLE_LDST8_TPREL_LO12
-// CHECK-ELF-NAMES: 232 R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC
strh w27, [x26, #:tprel_lo12:var]
ldrsh x25, [x24, #:tprel_lo12_nc:var]
@@ -563,17 +322,9 @@
// CHECK-NEXT: ldrsh x25, [x24, #:tprel_lo12_nc:var] // encoding: [0x19'A',0x03'A',0x80'A',0x79'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst16_tprel_lo12_n
-// CHECK-ELF: # Relocation 59
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000ec)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000022a)
-// CHECK-ELF: # Relocation 60
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f0)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000022b)
+// CHECK-ELF-NEXT: 0xEC R_AARCH64_TLSLE_LDST16_TPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xF0 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC [[VARSYM]]
-// CHECK-ELF-NAMES: 236 R_AARCH64_TLSLE_LDST16_TPREL_LO12
-// CHECK-ELF-NAMES: 240 R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC
ldr w23, [x22, #:tprel_lo12:var]
ldrsw x21, [x20, #:tprel_lo12_nc:var]
@@ -582,17 +333,8 @@
// CHECK-NEXT: ldrsw x21, [x20, #:tprel_lo12_nc:var] // encoding: [0x95'A',0x02'A',0x80'A',0xb9'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst32_tprel_lo12_n
-// CHECK-ELF: # Relocation 61
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f4)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000022c)
-// CHECK-ELF: # Relocation 62
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000f8)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000022d)
-
-// CHECK-ELF-NAMES: 244 R_AARCH64_TLSLE_LDST32_TPREL_LO12
-// CHECK-ELF-NAMES: 248 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC
+// CHECK-ELF-NEXT: 0xF4 R_AARCH64_TLSLE_LDST32_TPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0xF8 R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC [[VARSYM]]
ldr x19, [x18, #:tprel_lo12:var]
str x17, [x16, #:tprel_lo12_nc:var]
@@ -601,17 +343,8 @@
// CHECK-NEXT: str x17, [x16, #:tprel_lo12_nc:var] // encoding: [0x11'A',0x02'A',A,0xf9'A']
// CHECK-NEXT: // fixup A - offset: 0, value: :tprel_lo12_nc:var, kind: fixup_a64_ldst64_tprel_lo12_nc
-// CHECK-ELF: # Relocation 63
-// CHECK-ELF-NEXT: (('r_offset', 0x00000000000000fc)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000022e)
-// CHECK-ELF: # Relocation 64
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000100)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x0000022f)
-
-// CHECK-ELF-NAMES: 252 R_AARCH64_TLSLE_LDST64_TPREL_LO12
-// CHECK-ELF-NAMES: 256 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC
+// CHECK-ELF-NEXT: 0xFC R_AARCH64_TLSLE_LDST64_TPREL_LO12 [[VARSYM]]
+// CHECK-ELF-NEXT: 0x100 R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC [[VARSYM]]
// TLS descriptor forms
adrp x8, :tlsdesc:var
@@ -631,32 +364,18 @@
// CHECK: blr x3 // encoding: [0x60,0x00,0x3f,0xd6]
-// CHECK-ELF: # Relocation 65
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000104)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000232)
-// CHECK-ELF: # Relocation 66
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000108)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000233)
-// CHECK-ELF: # Relocation 67
-// CHECK-ELF-NEXT: (('r_offset', 0x000000000000010c)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000234)
-// CHECK-ELF: # Relocation 68
-// CHECK-ELF-NEXT: (('r_offset', 0x0000000000000110)
-// CHECK-ELF-NEXT: ('r_sym', [[VARSYM]])
-// CHECK-ELF-NEXT: ('r_type', 0x00000239)
-
-// CHECK-ELF-NAMES: 260 R_AARCH64_TLSDESC_ADR_PAGE
-// CHECK-ELF-NAMES: 264 R_AARCH64_TLSDESC_LD64_LO12_NC
-// CHECK-ELF-NAMES: 268 R_AARCH64_TLSDESC_ADD_LO12_NC
-// CHECK-ELF-NAMES: 272 R_AARCH64_TLSDESC_CALL
+// CHECK-ELF-NEXT: 0x104 R_AARCH64_TLSDESC_ADR_PAGE [[VARSYM]]
+// CHECK-ELF-NEXT: 0x108 R_AARCH64_TLSDESC_LD64_LO12_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0x10C R_AARCH64_TLSDESC_ADD_LO12_NC [[VARSYM]]
+// CHECK-ELF-NEXT: 0x110 R_AARCH64_TLSDESC_CALL [[VARSYM]]
// Make sure symbol 5 has type STT_TLS:
-// CHECK-ELF: # Symbol 5
-// CHECK-ELF-NEXT: (('st_name', 0x00000006) # 'var'
-// CHECK-ELF-NEXT: ('st_bind', 0x1)
-// CHECK-ELF-NEXT: ('st_type', 0x6)
+// CHECK-ELF: Symbols [
+// CHECK-ELF: Symbol {
+// CHECK-ELF: Name: var (6)
+// CHECK-ELF-NEXT: Value:
+// CHECK-ELF-NEXT: Size:
+// CHECK-ELF-NEXT: Binding: Global
+// CHECK-ELF-NEXT: Type: TLS
diff --git a/test/MC/ARM/cxx-global-constructor.ll b/test/MC/ARM/cxx-global-constructor.ll
index e06d2c73ed..4afd1e19ad 100644
--- a/test/MC/ARM/cxx-global-constructor.ll
+++ b/test/MC/ARM/cxx-global-constructor.ll
@@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=armv7-linux-gnueabi -relocation-model=pic \
-; RUN: -filetype=obj -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: -filetype=obj -o - | llvm-readobj -r | FileCheck %s
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @f }]
@@ -9,4 +9,5 @@ define void @f() {
}
; Check for a relocation of type R_ARM_TARGET1.
-; CHECK: ('r_type', 0x26)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_ARM_TARGET1
diff --git a/test/MC/ARM/data-in-code.ll b/test/MC/ARM/data-in-code.ll
index c2feec5303..e3325b6bf6 100644
--- a/test/MC/ARM/data-in-code.ll
+++ b/test/MC/ARM/data-in-code.ll
@@ -1,8 +1,8 @@
;; RUN: llc -O0 -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \
-;; RUN: elf-dump | FileCheck -check-prefix=ARM %s
+;; RUN: llvm-readobj -t | FileCheck -check-prefix=ARM %s
;; RUN: llc -O0 -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \
-;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=TMB %s
+;; RUN: llvm-readobj -t | FileCheck -check-prefix=TMB %s
;; Ensure that if a jump table is generated that it has Mapping Symbols
;; marking the data-in-code region.
@@ -108,68 +108,68 @@ exit:
ret void
}
-;; ARM: # Symbol 2
-;; ARM-NEXT: $a
-;; ARM-NEXT: 'st_value', 0x00000000
-;; ARM-NEXT: 'st_size', 0x00000000
-;; ARM-NEXT: 'st_bind', 0x0
-;; ARM-NEXT: 'st_type', 0x0
-;; ARM-NEXT: 'st_other'
-;; ARM-NEXT: 'st_shndx', [[MIXED_SECT:0x[0-9a-f]+]]
-
-;; ARM: # Symbol 3
-;; ARM-NEXT: $a
-;; ARM-NEXT: 'st_value', 0x000000ac
-;; ARM-NEXT: 'st_size', 0x00000000
-;; ARM-NEXT: 'st_bind', 0x0
-;; ARM-NEXT: 'st_type', 0x0
-;; ARM-NEXT: 'st_other'
-;; ARM-NEXT: 'st_shndx', [[MIXED_SECT]]
-
-;; ARM: # Symbol 4
-;; ARM-NEXT: $d
-;; ARM-NEXT: 'st_value', 0x00000000
-;; ARM-NEXT: 'st_size', 0x00000000
-;; ARM-NEXT: 'st_bind', 0x0
-;; ARM-NEXT: 'st_type', 0x0
-
-;; ARM: # Symbol 5
-;; ARM-NEXT: $d
-;; ARM-NEXT: 'st_value', 0x00000030
-;; ARM-NEXT: 'st_size', 0x00000000
-;; ARM-NEXT: 'st_bind', 0x0
-;; ARM-NEXT: 'st_type', 0x0
-;; ARM-NEXT: 'st_other'
-;; ARM-NEXT: 'st_shndx', [[MIXED_SECT]]
+;; ARM: Symbol {
+;; ARM: Name: $a
+;; ARM-NEXT: Value: 0x0
+;; ARM-NEXT: Size: 0
+;; ARM-NEXT: Binding: Local
+;; ARM-NEXT: Type: None
+;; ARM-NEXT: Other:
+;; ARM-NEXT: Section: [[MIXED_SECT:[^ ]+]]
+
+;; ARM: Symbol {
+;; ARM: Name: $a
+;; ARM-NEXT: Value: 0xAC
+;; ARM-NEXT: Size: 0
+;; ARM-NEXT: Binding: Local
+;; ARM-NEXT: Type: None
+;; ARM-NEXT: Other:
+;; ARM-NEXT: Section: [[MIXED_SECT]]
+
+;; ARM: Symbol {
+;; ARM: Name: $d
+;; ARM-NEXT: Value: 0
+;; ARM-NEXT: Size: 0
+;; ARM-NEXT: Binding: Local
+;; ARM-NEXT: Type: None
+
+;; ARM: Symbol {
+;; ARM: Name: $d
+;; ARM-NEXT: Value: 0x30
+;; ARM-NEXT: Size: 0
+;; ARM-NEXT: Binding: Local
+;; ARM-NEXT: Type: None
+;; ARM-NEXT: Other:
+;; ARM-NEXT: Section: [[MIXED_SECT]]
;; ARM-NOT: ${{[atd]}}
-;; TMB: # Symbol 3
-;; TMB-NEXT: $d
-;; TMB-NEXT: 'st_value', 0x00000016
-;; TMB-NEXT: 'st_size', 0x00000000
-;; TMB-NEXT: 'st_bind', 0x0
-;; TMB-NEXT: 'st_type', 0x0
-;; TMB-NEXT: 'st_other'
-;; TMB-NEXT: 'st_shndx', [[MIXED_SECT:0x[0-9a-f]+]]
-
-;; TMB: # Symbol 4
-;; TMB-NEXT: $t
-;; TMB-NEXT: 'st_value', 0x00000000
-;; TMB-NEXT: 'st_size', 0x00000000
-;; TMB-NEXT: 'st_bind', 0x0
-;; TMB-NEXT: 'st_type', 0x0
-;; TMB-NEXT: 'st_other'
-;; TMB-NEXT: 'st_shndx', [[MIXED_SECT]]
-
-;; TMB: # Symbol 5
-;; TMB-NEXT: $t
-;; TMB-NEXT: 'st_value', 0x00000036
-;; TMB-NEXT: 'st_size', 0x00000000
-;; TMB-NEXT: 'st_bind', 0x0
-;; TMB-NEXT: 'st_type', 0x0
-;; TMB-NEXT: 'st_other'
-;; TMB-NEXT: 'st_shndx', [[MIXED_SECT]]
+;; TMB: Symbol {
+;; TMB: Name: $d.2
+;; TMB-NEXT: Value: 0x16
+;; TMB-NEXT: Size: 0
+;; TMB-NEXT: Binding: Local
+;; TMB-NEXT: Type: None
+;; TMB-NEXT: Other:
+;; TMB-NEXT: Section: [[MIXED_SECT:[^ ]+]]
+
+;; TMB: Symbol {
+;; TMB: Name: $t
+;; TMB-NEXT: Value: 0x0
+;; TMB-NEXT: Size: 0
+;; TMB-NEXT: Binding: Local
+;; TMB-NEXT: Type: None
+;; TMB-NEXT: Other:
+;; TMB-NEXT: Section: [[MIXED_SECT]]
+
+;; TMB: Symbol {
+;; TMB: Name: $t
+;; TMB-NEXT: Value: 0x36
+;; TMB-NEXT: Size: 0
+;; TMB-NEXT: Binding: Local
+;; TMB-NEXT: Type: None
+;; TMB-NEXT: Other:
+;; TMB-NEXT: Section: [[MIXED_SECT]]
;; TMB-NOT: ${{[atd]}}
diff --git a/test/MC/ARM/elf-eflags-eabi-cg.ll b/test/MC/ARM/elf-eflags-eabi-cg.ll
index 2e86a0f360..0b9de7f2a6 100644
--- a/test/MC/ARM/elf-eflags-eabi-cg.ll
+++ b/test/MC/ARM/elf-eflags-eabi-cg.ll
@@ -1,7 +1,7 @@
; Codegen version to check for ELF header flags.
;
; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \
-; RUN: -filetype=obj -o - | elf-dump --dump-section-data | \
+; RUN: -filetype=obj -o - | llvm-readobj -h | \
; RUN: FileCheck %s
define void @bar() nounwind {
@@ -10,4 +10,5 @@ entry:
}
; For now the only e_flag set is EF_ARM_EABI_VER5
-;CHECK: 'e_flags', 0x05000000
+; CHECK: ElfHeader {
+; CHECK: Flags [ (0x5000000)
diff --git a/test/MC/ARM/elf-eflags-eabi.s b/test/MC/ARM/elf-eflags-eabi.s
index ea89eacf74..fe0b6c071e 100644
--- a/test/MC/ARM/elf-eflags-eabi.s
+++ b/test/MC/ARM/elf-eflags-eabi.s
@@ -1,5 +1,5 @@
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \
-@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+@ RUN: llvm-readobj -h | FileCheck -check-prefix=OBJ %s
.syntax unified
.text
.globl barf
@@ -10,4 +10,5 @@ barf: @ @barf
b foo
@@@ make sure the EF_ARM_EABIMASK comes out OK
-@OBJ: 'e_flags', 0x05000000
+@OBJ: ElfHeader {
+@OBJ: Flags [ (0x5000000)
diff --git a/test/MC/ARM/elf-movt.s b/test/MC/ARM/elf-movt.s
index 02bb5a6907..74b3c9f2f5 100644
--- a/test/MC/ARM/elf-movt.s
+++ b/test/MC/ARM/elf-movt.s
@@ -1,6 +1,6 @@
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi | FileCheck -check-prefix=ASM %s
@ RUN: llvm-mc %s -triple=armv7-linux-gnueabi -filetype=obj -o - | \
-@ RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+@ RUN: llvm-readobj -s -sd -sr | FileCheck -check-prefix=OBJ %s
.syntax unified
.text
.globl barf
@@ -15,25 +15,24 @@ barf: @ @barf
@ ASM-NEXT: movt r0, :upper16:(GOT-(.LPC0_2+8))
@@ make sure that the text section fixups are sane too
-@ OBJ: '.text'
-@ OBJ-NEXT: 'sh_type', 0x00000001
-@ OBJ-NEXT: 'sh_flags', 0x00000006
-@ OBJ-NEXT: 'sh_addr', 0x00000000
-@ OBJ-NEXT: 'sh_offset', 0x00000034
-@ OBJ-NEXT: 'sh_size', 0x00000008
-@ OBJ-NEXT: 'sh_link', 0x00000000
-@ OBJ-NEXT: 'sh_info', 0x00000000
-@ OBJ-NEXT: 'sh_addralign', 0x00000004
-@ OBJ-NEXT: 'sh_entsize', 0x00000000
-@ OBJ-NEXT: '_section_data', 'f00f0fe3 f40f4fe3'
-
-@ OBJ: Relocation 0
-@ OBJ-NEXT: 'r_offset', 0x00000000
-@ OBJ-NEXT: 'r_sym'
-@ OBJ-NEXT: 'r_type', 0x2d
-
-@ OBJ: Relocation 1
-@ OBJ-NEXT: 'r_offset', 0x00000004
-@ OBJ-NEXT: 'r_sym'
-@ OBJ-NEXT: 'r_type', 0x2e
-
+@ OBJ: Section {
+@ OBJ: Name: .text
+@ OBJ-NEXT: Type: SHT_PROGBITS
+@ OBJ-NEXT: Flags [ (0x6)
+@ OBJ-NEXT: SHF_ALLOC
+@ OBJ-NEXT: SHF_EXECINSTR
+@ OBJ-NEXT: ]
+@ OBJ-NEXT: Address: 0x0
+@ OBJ-NEXT: Offset: 0x34
+@ OBJ-NEXT: Size: 8
+@ OBJ-NEXT: Link: 0
+@ OBJ-NEXT: Info: 0
+@ OBJ-NEXT: AddressAlignment: 4
+@ OBJ-NEXT: EntrySize: 0
+@ OBJ-NEXT: Relocations [
+@ OBJ-NEXT: 0x0 R_ARM_MOVW_PREL_NC
+@ OBJ-NEXT: 0x4 R_ARM_MOVT_PREL
+@ OBJ-NEXT: ]
+@ OBJ-NEXT: SectionData (
+@ OBJ-NEXT: 0000: F00F0FE3 F40F4FE3
+@ OBJ-NEXT: )
diff --git a/test/MC/ARM/elf-reloc-01.ll b/test/MC/ARM/elf-reloc-01.ll
index 3ebd7c641b..9b5dbd9e99 100644
--- a/test/MC/ARM/elf-reloc-01.ll
+++ b/test/MC/ARM/elf-reloc-01.ll
@@ -1,7 +1,7 @@
;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \
;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \
;; RUN: -filetype=obj %s -o - | \
-;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
;; FIXME: This file needs to be in .s form!
;; The args to llc are there to constrain the codegen only.
@@ -60,11 +60,8 @@ bb3: ; preds = %bb, %entry
declare void @exit(i32) noreturn nounwind
-;; OBJ: Relocation 1
-;; OBJ-NEXT: 'r_offset',
-;; OBJ-NEXT: 'r_sym', 0x000007
-;; OBJ-NEXT: 'r_type', 0x2b
-
-;; OBJ: Symbol 7
-;; OBJ-NEXT: '_MergedGlobals'
-;; OBJ-NEXT: 'st_value', 0x00000010
+; OBJ: Relocations [
+; OBJ: Section (1) .text {
+; OBJ: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC _MergedGlobals
+; OBJ: }
+; OBJ: ]
diff --git a/test/MC/ARM/elf-reloc-02.ll b/test/MC/ARM/elf-reloc-02.ll
index 6b6b03c388..f0217644ca 100644
--- a/test/MC/ARM/elf-reloc-02.ll
+++ b/test/MC/ARM/elf-reloc-02.ll
@@ -1,7 +1,7 @@
;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \
;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \
;; RUN: -filetype=obj %s -o - | \
-;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
;; FIXME: This file needs to be in .s form!
;; The args to llc are there to constrain the codegen only.
@@ -41,10 +41,8 @@ declare i32 @write(...)
declare void @exit(i32) noreturn nounwind
-;; OBJ: Relocation 0
-;; OBJ-NEXT: 'r_offset',
-;; OBJ-NEXT: 'r_sym', 0x000005
-;; OBJ-NEXT: 'r_type', 0x2b
-
-;; OBJ: Symbol 5
-;; OBJ-NEXT: '.L.str'
+;; OBJ: Relocations [
+;; OBJ: Section (1) .text {
+;; OBJ-NEXT: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC .L.str
+;; OBJ: }
+;; OBJ: ]
diff --git a/test/MC/ARM/elf-reloc-03.ll b/test/MC/ARM/elf-reloc-03.ll
index 87f91c1121..ac46e697c1 100644
--- a/test/MC/ARM/elf-reloc-03.ll
+++ b/test/MC/ARM/elf-reloc-03.ll
@@ -1,7 +1,7 @@
;; RUN: llc -mtriple=armv7-linux-gnueabi -O3 \
;; RUN: -mcpu=cortex-a8 -mattr=-neon -mattr=+vfp2 -arm-reserve-r9 \
;; RUN: -filetype=obj %s -o - | \
-;; RUN: elf-dump --dump-section-data | FileCheck -check-prefix=OBJ %s
+;; RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
;; FIXME: This file needs to be in .s form!
;; The args to llc are there to constrain the codegen only.
@@ -88,10 +88,8 @@ entry:
declare void @exit(i32) noreturn nounwind
-;; OBJ: Relocation 1
-;; OBJ-NEXT: 'r_offset',
-;; OBJ-NEXT: 'r_sym', 0x000010
-;; OBJ-NEXT: 'r_type', 0x2b
-
-;; OBJ: Symbol 16
-;; OBJ-NEXT: 'vtable'
+;; OBJ: Relocations [
+;; OBJ: Section (1) .text {
+;; OBJ: 0x{{[0-9,A-F]+}} R_ARM_MOVW_ABS_NC vtable
+;; OBJ: }
+;; OBJ: ]
diff --git a/test/MC/ARM/elf-reloc-condcall.s b/test/MC/ARM/elf-reloc-condcall.s
index 3fafb43eb0..612942f2c5 100644
--- a/test/MC/ARM/elf-reloc-condcall.s
+++ b/test/MC/ARM/elf-reloc-condcall.s
@@ -1,33 +1,18 @@
// RUN: llvm-mc -triple=armv7-linux-gnueabi -filetype=obj %s -o - | \
-// RUN: elf-dump | FileCheck -check-prefix=OBJ %s
+// RUN: llvm-readobj -r | FileCheck -check-prefix=OBJ %s
bleq some_label
bl some_label
blx some_label
beq some_label
b some_label
-// OBJ: .rel.text
-// OBJ: 'r_offset', 0x00000000
-// OBJ-NEXT: 'r_sym', 0x000005
-// OBJ-NEXT: 'r_type', 0x1d
-
-// OBJ: 'r_offset', 0x00000004
-// OBJ-NEXT: 'r_sym', 0x000005
-// OBJ-NEXT: 'r_type', 0x1c
-
-// OBJ: 'r_offset', 0x00000008
-// OBJ-NEXT: 'r_sym', 0x000005
-// OBJ-NEXT: 'r_type', 0x1c
-
-// OBJ: 'r_offset', 0x0000000c
-// OBJ-NEXT: 'r_sym', 0x000005
-// OBJ-NEXT: 'r_type', 0x1d
-
-// OBJ: 'r_offset', 0x00000010
-// OBJ-NEXT: 'r_sym', 0x000005
-// OBJ-NEXT: 'r_type', 0x1d
-
-// OBJ: .symtab
-// OBJ: Symbol 5
-// OBJ-NEXT: some_label
+// OBJ: Relocations [
+// OBJ-NEXT: Section (1) .text {
+// OBJ-NEXT: 0x0 R_ARM_JUMP24 some_label 0x0
+// OBJ-NEXT: 0x4 R_ARM_CALL some_label 0x0
+// OBJ-NEXT: 0x8 R_ARM_CALL some_label 0x0
+// OBJ-NEXT: 0xC R_ARM_JUMP24 some_label 0x0
+// OBJ-NEXT: 0x10 R_ARM_JUMP24 some_label 0x0
+// OBJ-NEXT: }
+// OBJ-NEXT: ]
diff --git a/test/MC/ARM/elf-thumbfunc-reloc.ll b/test/MC/ARM/elf-thumbfunc-reloc.ll
index b2f253d2fa..e7d2c340d4 100644
--- a/test/MC/ARM/elf-thumbfunc-reloc.ll
+++ b/test/MC/ARM/elf-thumbfunc-reloc.ll
@@ -1,5 +1,5 @@
; RUN: llc %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic \
-; RUN: -filetype=obj -o - | elf-dump --dump-section-data | \
+; RUN: -filetype=obj -o - | llvm-readobj -s -sd -r -t | \
; RUN: FileCheck %s
; FIXME: This file needs to be in .s form!
@@ -22,16 +22,20 @@ entry:
; make sure that bl 0 <foo> (fff7feff) is correctly encoded
-; CHECK: '_section_data', '704700bf 2de90048 fff7feff bde80088'
-
-; Offset Info Type Sym.Value Sym. Name
-; 00000008 0000070a R_ARM_THM_CALL 00000001 foo
-; CHECK: Relocation 0
-; CHECK-NEXT: 'r_offset', 0x00000008
-; CHECK-NEXT: 'r_sym', 0x000009
-; CHECK-NEXT: 'r_type', 0x0a
+; CHECK: Sections [
+; CHECK: SectionData (
+; CHECK: 0000: 704700BF 2DE90048 FFF7FEFF BDE80088
+; CHECK: )
+; CHECK: ]
+
+; CHECK: Relocations [
+; CHECK-NEXT: Section (1) .text {
+; CHECK-NEXT: 0x8 R_ARM_THM_CALL foo 0x0
+; CHECK-NEXT: }
+; CHECK-NEXT: ]
; make sure foo is thumb function: bit 0 = 1
-; CHECK: Symbol 9
-; CHECK-NEXT: 'foo'
-; CHECK-NEXT: 'st_value', 0x00000001
+; CHECK: Symbols [
+; CHECK: Symbol {
+; CHECK: Name: foo
+; CHECK-NEXT: Value: 0x1
diff --git a/test/MC/ARM/elf-thumbfunc-reloc.s b/test/MC/ARM/elf-thumbfunc-reloc.s
index 4a311dd511..87a26d8df8 100644
--- a/test/MC/ARM/elf-thumbfunc-reloc.s
+++ b/test/MC/ARM/elf-thumbfunc-reloc.s
@@ -1,6 +1,6 @@
@@ test st_value bit 0 of thumb function
@ RUN: llvm-mc %s -triple=arm-freebsd-eabi -filetype=obj -o - | \
-@ RUN: elf-dump | FileCheck %s
+@ RUN: llvm-readobj -r | FileCheck %s
.syntax unified
@@ -17,7 +17,8 @@ f:
pop {r7, pc}
@@ make sure an R_ARM_THM_CALL relocation is generated for the call to g
-@CHECK: ('_relocations', [
-@CHECK: (('r_offset', 0x00000004)
-@CHECK-NEXT: ('r_sym', 0x{{[0-9a-fA-F]+}})
-@CHECK-NEXT: ('r_type', 0x0a)
+@CHECK: Relocations [
+@CHECK-NEXT: Section (1) .text {
+@CHECK-NEXT: 0x4 R_ARM_THM_CALL g 0x0
+@CHECK-NEXT: }
+@CHECK-NEXT: ]
diff --git a/test/MC/ARM/elf-thumbfunc.s b/test/MC/ARM/elf-thumbfunc.s
index 91b2eee759..26f5f0b159 100644
--- a/test/MC/ARM/elf-thumbfunc.s
+++ b/test/MC/ARM/elf-thumbfunc.s
@@ -1,6 +1,6 @@
@@ test st_value bit 0 of thumb function
@ RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi -filetype=obj -o - | \
-@ RUN: elf-dump | FileCheck %s
+@ RUN: llvm-readobj -t | FileCheck %s
.syntax unified
.text
.globl foo
@@ -12,9 +12,9 @@ foo:
bx lr
@@ make sure foo is thumb function: bit 0 = 1 (st_value)
-@CHECK: Symbol 5
-@CHECK-NEXT: 'st_name', 0x00000001
-@CHECK-NEXT: 'st_value', 0x00000001
-@CHECK-NEXT: 'st_size', 0x00000000
-@CHECK-NEXT: 'st_bind', 0x1
-@CHECK-NEXT: 'st_type', 0x2
+@CHECK: Symbol {
+@CHECK: Name: foo
+@CHECK-NEXT: Value: 0x1
+@CHECK-NEXT: Size: 0
+@CHECK-NEXT: Binding: Global
+@CHECK-NEXT: Type: Function
diff --git a/test/MC/ARM/xscale-attributes.ll b/test/MC/ARM/xscale-attributes.ll
index 3ccf02b95e..d1e9931e14 100644
--- a/test/MC/ARM/xscale-attributes.ll
+++ b/test/MC/ARM/xscale-attributes.ll
@@ -2,7 +2,7 @@
; RUN: FileCheck -check-prefix=ASM %s
; RUN: llc %s -mtriple=thumbv5-linux-gnueabi -filetype=obj \
-; RUN: -mcpu=xscale -o - | elf-dump --dump-section-data | \
+; RUN: -mcpu=xscale -o - | llvm-readobj -s -sd | \
; RUN: FileCheck -check-prefix=OBJ %s
; FIXME: The OBJ test should be a .s to .o test and the ASM test should
@@ -17,15 +17,22 @@ entry:
; ASM-NEXT: .eabi_attribute 8, 1
; ASM-NEXT: .eabi_attribute 9, 1
-; OBJ: Section 4
-; OBJ-NEXT: 'sh_name', 0x0000000c
-; OBJ-NEXT: 'sh_type', 0x70000003
-; OBJ-NEXT: 'sh_flags', 0x00000000
-; OBJ-NEXT: 'sh_addr', 0x00000000
-; OBJ-NEXT: 'sh_offset', 0x00000038
-; OBJ-NEXT: 'sh_size', 0x00000020
-; OBJ-NEXT: 'sh_link', 0x00000000
-; OBJ-NEXT: 'sh_info', 0x00000000
-; OBJ-NEXT: 'sh_addralign', 0x00000001
-; OBJ-NEXT: 'sh_entsize', 0x00000000
-; OBJ-NEXT: '_section_data', '411f0000 00616561 62690001 15000000 06050801 09011401 15011703 18011901'
+; OBJ: Sections [
+; OBJ: Section {
+; OBJ: Index: 4
+; OBJ-NEXT: Name: .ARM.attributes (12)
+; OBJ-NEXT: Type: SHT_ARM_ATTRIBUTES
+; OBJ-NEXT: Flags [ (0x0)
+; OBJ-NEXT: ]
+; OBJ-NEXT: Address: 0x0
+; OBJ-NEXT: Offset: 0x38
+; OBJ-NEXT: Size: 32
+; OBJ-NEXT: Link: 0
+; OBJ-NEXT: Info: 0
+; OBJ-NEXT: AddressAlignment: 1
+; OBJ-NEXT: EntrySize: 0
+; OBJ-NEXT: SectionData (
+; OBJ-NEXT: 0000: 411F0000 00616561 62690001 15000000
+; OBJ-NEXT: 0010: 06050801 09011401 15011703 18011901
+; OBJ-NEXT: )
+; OBJ-NEXT: }
diff --git a/test/MC/AsmParser/section.s b/test/MC/AsmParser/section.s
index 5abacc7013..0c3828d714 100644
--- a/test/MC/AsmParser/section.s
+++ b/test/MC/AsmParser/section.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s
-# RUN: elf-dump --dump-section-data < %t | FileCheck %s
+# RUN: llvm-readobj -s -sd < %t | FileCheck %s
.section test1
.byte 1
.section test2
@@ -45,63 +45,85 @@
.previous
.byte 1
.previous
-# CHECK: (('sh_name', 0x00000044) # 'test1'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK-NEXT: ('sh_flags', 0x00000000)
-# CHECK-NEXT: ('sh_addr', 0x00000000)
-# CHECK-NEXT: ('sh_offset', 0x00000034)
-# CHECK-NEXT: ('sh_size', 0x00000007)
-# CHECK-NEXT: ('sh_link', 0x00000000)
-# CHECK-NEXT: ('sh_info', 0x00000000)
-# CHECK-NEXT: ('sh_addralign', 0x00000001)
-# CHECK-NEXT: ('sh_entsize', 0x00000000)
-# CHECK-NEXT: ('_section_data', '01010101 010101')
-# CHECK-NEXT: ),
-# CHECK: (('sh_name', 0x0000003e) # 'test2'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK-NEXT: ('sh_flags', 0x00000000)
-# CHECK-NEXT: ('sh_addr', 0x00000000)
-# CHECK-NEXT: ('sh_offset', 0x0000003b)
-# CHECK-NEXT: ('sh_size', 0x00000006)
-# CHECK-NEXT: ('sh_link', 0x00000000)
-# CHECK-NEXT: ('sh_info', 0x00000000)
-# CHECK-NEXT: ('sh_addralign', 0x00000001)
-# CHECK-NEXT: ('sh_entsize', 0x00000000)
-# CHECK-NEXT: ('_section_data', '02020202 0202')
-# CHECK-NEXT: ),
-# CHECK: (('sh_name', 0x00000038) # 'test3'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK-NEXT: ('sh_flags', 0x00000000)
-# CHECK-NEXT: ('sh_addr', 0x00000000)
-# CHECK-NEXT: ('sh_offset', 0x00000041)
-# CHECK-NEXT: ('sh_size', 0x00000005)
-# CHECK-NEXT: ('sh_link', 0x00000000)
-# CHECK-NEXT: ('sh_info', 0x00000000)
-# CHECK-NEXT: ('sh_addralign', 0x00000001)
-# CHECK-NEXT: ('sh_entsize', 0x00000000)
-# CHECK-NEXT: ('_section_data', '03030303 03')
-# CHECK-NEXT: ),
-# CHECK: (('sh_name', 0x00000032) # 'test4'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK-NEXT: ('sh_flags', 0x00000000)
-# CHECK-NEXT: ('sh_addr', 0x00000000)
-# CHECK-NEXT: ('sh_offset', 0x00000046)
-# CHECK-NEXT: ('sh_size', 0x00000003)
-# CHECK-NEXT: ('sh_link', 0x00000000)
-# CHECK-NEXT: ('sh_info', 0x00000000)
-# CHECK-NEXT: ('sh_addralign', 0x00000001)
-# CHECK-NEXT: ('sh_entsize', 0x00000000)
-# CHECK-NEXT: ('_section_data', '040404')
-# CHECK-NEXT: ),
-# CHECK: (('sh_name', 0x0000002c) # 'test5'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK-NEXT: ('sh_flags', 0x00000000)
-# CHECK-NEXT: ('sh_addr', 0x00000000)
-# CHECK-NEXT: ('sh_offset', 0x00000049)
-# CHECK-NEXT: ('sh_size', 0x00000001)
-# CHECK-NEXT: ('sh_link', 0x00000000)
-# CHECK-NEXT: ('sh_info', 0x00000000)
-# CHECK-NEXT: ('sh_addralign', 0x00000001)
-# CHECK-NEXT: ('sh_entsize', 0x00000000)
-# CHECK-NEXT: ('_section_data', '05')
-# CHECK-NEXT: ),
+
+# CHECK: Sections [
+# CHECK: Section {
+# CHECK: Name: test1 (68)
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK-NEXT: Flags [ (0x0)
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: 0x0
+# CHECK-NEXT: Offset: 0x34
+# CHECK-NEXT: Size: 7
+# CHECK-NEXT: Link: 0
+# CHECK-NEXT: Info: 0
+# CHECK-NEXT: AddressAlignment: 1
+# CHECK-NEXT: EntrySize: 0
+# CHECK-NEXT: SectionData (
+# CHECK-NEXT: 0000: 01010101 010101
+# CHECK-NEXT: )
+# CHECK-NEXT: }
+# CHECK: Section {
+# CHECK: Name: test2 (62)
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK-NEXT: Flags [ (0x0)
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: 0x0
+# CHECK-NEXT: Offset: 0x3B
+# CHECK-NEXT: Size: 6
+# CHECK-NEXT: Link: 0
+# CHECK-NEXT: Info: 0
+# CHECK-NEXT: AddressAlignment: 1
+# CHECK-NEXT: EntrySize: 0
+# CHECK-NEXT: SectionData (
+# CHECK-NEXT: 0000: 02020202 0202
+# CHECK-NEXT: )
+# CHECK-NEXT: }
+# CHECK: Section {
+# CHECK: Name: test3 (56)
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK-NEXT: Flags [ (0x0)
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: 0x0
+# CHECK-NEXT: Offset: 0x41
+# CHECK-NEXT: Size: 5
+# CHECK-NEXT: Link: 0
+# CHECK-NEXT: Info: 0
+# CHECK-NEXT: AddressAlignment: 1
+# CHECK-NEXT: EntrySize: 0
+# CHECK-NEXT: SectionData (
+# CHECK-NEXT: 0000: 03030303 03
+# CHECK-NEXT: )
+# CHECK-NEXT: }
+# CHECK: Section {
+# CHECK: Name: test4 (50)
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK-NEXT: Flags [ (0x0)
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: 0x0
+# CHECK-NEXT: Offset: 0x46
+# CHECK-NEXT: Size: 3
+# CHECK-NEXT: Link: 0
+# CHECK-NEXT: Info: 0
+# CHECK-NEXT: AddressAlignment: 1
+# CHECK-NEXT: EntrySize: 0
+# CHECK-NEXT: SectionData (
+# CHECK-NEXT: 0000: 040404
+# CHECK-NEXT: )
+# CHECK-NEXT: }
+# CHECK: Section {
+# CHECK: Name: test5 (44)
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK-NEXT: Flags [ (0x0)
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address: 0x0
+# CHECK-NEXT: Offset: 0x49
+# CHECK-NEXT: Size: 1
+# CHECK-NEXT: Link: 0
+# CHECK-NEXT: Info: 0
+# CHECK-NEXT: AddressAlignment: 1
+# CHECK-NEXT: EntrySize: 0
+# CHECK-NEXT: SectionData (
+# CHECK-NEXT: 0000: 05
+# CHECK-NEXT: )
+# CHECK-NEXT: }
diff --git a/test/MC/AsmParser/section_names.s b/test/MC/AsmParser/section_names.s
index 332cdbe3fe..3883e15880 100644
--- a/test/MC/AsmParser/section_names.s
+++ b/test/MC/AsmParser/section_names.s
@@ -1,5 +1,5 @@
# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s
-# RUN: elf-dump --dump-section-data < %t | FileCheck %s
+# RUN: llvm-readobj -s < %t | FileCheck %s
.section .nobits
.byte 1
.section .nobits2
@@ -30,33 +30,33 @@
.byte 1
.section .notefoo
.byte 1
-# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.nobits2'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.nobitsfoo'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array'
-# CHECK-NEXT: ('sh_type', 0x0000000e)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.init_array2'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.init_arrayfoo'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array'
-# CHECK-NEXT: ('sh_type', 0x0000000f)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_array2'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.fini_arrayfoo'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array'
-# CHECK-NEXT: ('sh_type', 0x00000010)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_array2'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.preinit_arrayfoo'
-# CHECK-NEXT: ('sh_type', 0x00000001)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.note'
-# CHECK-NEXT: ('sh_type', 0x00000007)
-# CHECK: (('sh_name', 0x00000{{...}}) # '.note2'
-# CHECK-NEXT: ('sh_type', 0x00000007)
-#CHECK: (('sh_name', 0x00000{{...}}) # '.notefoo'
-# CHECK-NEXT: ('sh_type', 0x00000007)
+# CHECK: Name: .nobits
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .nobits2
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .nobitsfoo
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .init_array
+# CHECK-NEXT: Type: SHT_INIT_ARRAY
+# CHECK: Name: .init_array2
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .init_arrayfoo
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .fini_array
+# CHECK-NEXT: Type: SHT_FINI_ARRAY
+# CHECK: Name: .fini_array2
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .fini_arrayfoo
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .preinit_array
+# CHECK-NEXT: Type: SHT_PREINIT_ARRAY
+# CHECK: Name: .preinit_array2
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .preinit_arrayfoo
+# CHECK-NEXT: Type: SHT_PROGBITS
+# CHECK: Name: .note
+# CHECK-NEXT: Type: SHT_NOTE
+# CHECK: Name: .note2
+# CHECK-NEXT: Type: SHT_NOTE
+# CHECK: Name: .notefoo
+# CHECK-NEXT: Type: SHT_NOTE
diff --git a/test/MC/COFF/align-nops.s b/test/MC/COFF/align-nops.s
index 2971ec6779..02b488475e 100644
--- a/test/MC/COFF/align-nops.s
+++ b/test/MC/COFF/align-nops.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s
// Test that we get optimal nops in text
.text
@@ -15,36 +15,40 @@ f0:
.long 0
.align 8
-//CHECK: Name = .text
-//CHECK-NEXT: VirtualSize
-//CHECK-NEXT: VirtualAddress
-//CHECK-NEXT: SizeOfRawData = 16
-//CHECK-NEXT: PointerToRawData
-//CHECK-NEXT: PointerToRelocations
-//CHECK-NEXT: PointerToLineNumbers
-//CHECK-NEXT: NumberOfRelocations
-//CHECK-NEXT: NumberOfLineNumbers
-//CHECK-NEXT: Charateristics = 0x60400020
-//CHECK-NEXT: IMAGE_SCN_CNT_CODE
+//CHECK: Name: .text
+//CHECK-NEXT: VirtualSize
+//CHECK-NEXT: VirtualAddress
+//CHECK-NEXT: RawDataSize: 16
+//CHECK-NEXT: PointerToRawData
+//CHECK-NEXT: PointerToRelocations
+//CHECK-NEXT: PointerToLineNumbers
+//CHECK-NEXT: RelocationCount
+//CHECK-NEXT: LineNumberCount
+//CHECK-NEXT: Characteristics [ (0x60400020)
//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
+//CHECK-NEXT: IMAGE_SCN_CNT_CODE
//CHECK-NEXT: IMAGE_SCN_MEM_EXECUTE
//CHECK-NEXT: IMAGE_SCN_MEM_READ
-//CHECK-NEXT: SectionData =
-//CHECK-NEXT: 00 00 00 00 0F 1F 40 00 - 00 00 00 00 0F 1F 40 00
+//CHECK-NEXT: ]
+//CHECK-NEXT: SectionData (
+//CHECK-NEXT: 0000: 00000000 0F1F4000 00000000 0F1F4000
+//CHECK-NEXT: )
-//CHECK: Name = .data
-//CHECK-NEXT: VirtualSize
-//CHECK-NEXT: VirtualAddress
-//CHECK-NEXT: SizeOfRawData = 16
-//CHECK-NEXT: PointerToRawData
-//CHECK-NEXT: PointerToRelocations
-//CHECK-NEXT: PointerToLineNumbers
-//CHECK-NEXT: NumberOfRelocations
-//CHECK-NEXT: NumberOfLineNumbers
-//CHECK-NEXT: Charateristics = 0xC0400040
-//CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
-//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
-//CHECK-NEXT: IMAGE_SCN_MEM_READ
-//CHECK-NEXT: IMAGE_SCN_MEM_WRITE
-//CHECK-NEXT: SectionData =
-//CHECK-NEXT: 00 00 00 00 90 90 90 90 - 00 00 00 00 00 00 00 00
+//CHECK: Name: .data
+//CHECK-NEXT: VirtualSize:
+//CHECK-NEXT: VirtualAddress:
+//CHECK-NEXT: RawDataSize: 16
+//CHECK-NEXT: PointerToRawData:
+//CHECK-NEXT: PointerToRelocations:
+//CHECK-NEXT: PointerToLineNumbers:
+//CHECK-NEXT: RelocationCount:
+//CHECK-NEXT: LineNumberCount:
+//CHECK-NEXT: Characteristics [ (0xC0400040)
+//CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
+//CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+//CHECK-NEXT: IMAGE_SCN_MEM_READ
+//CHECK-NEXT: IMAGE_SCN_MEM_WRITE
+//CHECK-NEXT: ]
+//CHECK-NEXT: SectionData (
+//CHECK-NEXT: 0000: 00000000 90909090 00000000 00000000
+//CHECK-NEXT: )
diff --git a/test/MC/COFF/basic-coff-64.s b/test/MC/COFF/basic-coff-64.s
new file mode 100644
index 0000000000..89d17452d0
--- /dev/null
+++ b/test/MC/COFF/basic-coff-64.s
@@ -0,0 +1,137 @@
+// This test checks that the COFF object emitter works for the most basic
+// programs.
+
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
+
+.def _main;
+ .scl 2;
+ .type 32;
+ .endef
+ .text
+ .globl _main
+ .align 16, 0x90
+_main: # @main
+# BB#0: # %entry
+ subl $4, %esp
+ movl $.L_.str, (%esp)
+ call _printf
+ xorl %eax, %eax
+ addl $4, %esp
+ ret
+
+ .data
+.L_.str: # @.str
+ .asciz "Hello World"
+
+// CHECK: ImageFileHeader {
+// CHECK: Machine: IMAGE_FILE_MACHINE_AMD64
+// CHECK: SectionCount: 2
+// CHECK: TimeDateStamp: {{[0-9]+}}
+// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
+// CHECK: SymbolCount: 6
+// CHECK: OptionalHeaderSize: 0
+// CHECK: Characteristics [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Number: [[TextNum:[0-9]+]]
+// CHECK: Name: .text
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: [[TextSize:[0-9]+]]
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 2
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0x60500020)
+// CHECK: IMAGE_SCN_ALIGN_16BYTES
+// CHECK: IMAGE_SCN_CNT_CODE
+// CHECK: IMAGE_SCN_MEM_EXECUTE
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_AMD64_ADDR32 .data
+// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_AMD64_REL32 _printf
+// CHECK: ]
+// CHECK: }
+// CHECK: Section {
+// CHECK: Number: [[DataNum:[0-9]+]]
+// CHECK: Name: .data
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: [[DataSize:[0-9]+]]
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x0
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0xC0300040)
+// CHECK: IMAGE_SCN_ALIGN_4BYTES
+// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: IMAGE_SCN_MEM_WRITE
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: SectionData (
+// CHECK: 0000: 48656C6C 6F20576F 726C6400 |Hello World.|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: .text
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: [[TextSize]]
+// CHECK: RelocationCount: 2
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: [[TextNum]]
+// CHECK: Selection: 0x0
+// CHECK: }
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: .data
+// CHECK: Value: 0
+// CHECK: Section: .data
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: [[DataSize]]
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: [[DataNum]]
+// CHECK: Selection: 0x0
+// CHECK: Unused: (00 00 00)
+// CHECK: }
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _main
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Function
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _printf
+// CHECK: Value: 0
+// CHECK: Section: (0)
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: ]
diff --git a/test/MC/COFF/basic-coff.s b/test/MC/COFF/basic-coff.s
index 23156b82d2..9b299707a1 100644
--- a/test/MC/COFF/basic-coff.s
+++ b/test/MC/COFF/basic-coff.s
@@ -1,8 +1,7 @@
// This test checks that the COFF object emitter works for the most basic
// programs.
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
-// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
.def _main;
.scl 2;
@@ -15,119 +14,124 @@ _main: # @main
# BB#0: # %entry
subl $4, %esp
movl $L_.str, (%esp)
- calll _printf
+ call _printf
xorl %eax, %eax
addl $4, %esp
ret
.data
L_.str: # @.str
- .asciz "Hello World"
+ .asciz "Hello World"
-// CHECK: {
-// CHECK: MachineType = IMAGE_FILE_MACHINE_I386 (0x14C)
-// CHECK: NumberOfSections = 2
-// CHECK: TimeDateStamp = {{[0-9]+}}
-// CHECK: PointerToSymbolTable = 0x{{[0-9A-F]+}}
-// CHECK: NumberOfSymbols = 6
-// CHECK: SizeOfOptionalHeader = 0
-// CHECK: Characteristics = 0x0
-// CHECK: Sections = [
-// CHECK: 1 = {
-// CHECK: Name = .text
-// CHECK: VirtualSize = 0
-// CHECK: VirtualAddress = 0
-// CHECK: SizeOfRawData = {{[0-9]+}}
-// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
-// CHECK: PointerToRelocations = 0x{{[0-9A-F]+}}
-// CHECK: PointerToLineNumbers = 0x0
-// CHECK: NumberOfRelocations = 2
-// CHECK: NumberOfLineNumbers = 0
-// CHECK: Charateristics = 0x60500020
-// CHECK: IMAGE_SCN_CNT_CODE
-// CHECK: IMAGE_SCN_ALIGN_16BYTES
-// CHECK: IMAGE_SCN_MEM_EXECUTE
-// CHECK: IMAGE_SCN_MEM_READ
-// CHECK: SectionData =
-// CHECK: Relocations = [
-// CHECK: 0 = {
-// CHECK: VirtualAddress = 0x{{[0-9A-F]+}}
-// CHECK: SymbolTableIndex = 2
-// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
-// CHECK: SymbolName = .data
-// CHECK: }
-// CHECK: 1 = {
-// CHECK: VirtualAddress = 0x{{[0-9A-F]+}}
-// CHECK: SymbolTableIndex = 5
-// CHECK: Type = IMAGE_REL_I386_REL32 (20)
-// CHECK: SymbolName = _printf
-// CHECK: }
-// CHECK: ]
-// CHECK: }
-// CHECK: 2 = {
-// CHECK: Name = .data
-// CHECK: VirtualSize = 0
-// CHECK: VirtualAddress = 0
-// CHECK: SizeOfRawData = {{[0-9]+}}
-// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
-// CHECK: PointerToRelocations = 0x0
-// CHECK: PointerToLineNumbers = 0x0
-// CHECK: NumberOfRelocations = 0
-// CHECK: NumberOfLineNumbers = 0
-// CHECK: Charateristics = 0xC0300040
-// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
-// CHECK: IMAGE_SCN_ALIGN_4BYTES
-// CHECK: IMAGE_SCN_MEM_READ
-// CHECK: IMAGE_SCN_MEM_WRITE
-// CHECK: SectionData =
-// CHECK: 48 65 6C 6C 6F 20 57 6F - 72 6C 64 00 |Hello World.|
-// CHECK: Relocations = None
-// CHECK: }
+// CHECK: ImageFileHeader {
+// CHECK: Machine: IMAGE_FILE_MACHINE_I386
+// CHECK: SectionCount: 2
+// CHECK: TimeDateStamp: {{[0-9]+}}
+// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
+// CHECK: SymbolCount: 6
+// CHECK: OptionalHeaderSize: 0
+// CHECK: Characteristics [ (0x0)
// CHECK: ]
-// CHECK: Symbols = [
-// CHECK: 0 = {
-// CHECK: Name = .text
-// CHECK: Value = 0
-// CHECK: SectionNumber = 1
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
-// CHECK: NumberOfAuxSymbols = 1
-// CHECK: AuxillaryData =
-// CHECK: 15 00 00 00 02 00 00 00 - 00 00 00 00 01 00 00 00 |................|
-// CHECK: 00 00 |..|
-// CHECK: }
-// CHECK: 2 = {
-// CHECK: Name = .data
-// CHECK: Value = 0
-// CHECK: SectionNumber = 2
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
-// CHECK: NumberOfAuxSymbols = 1
-// CHECK: AuxillaryData =
-// CHECK: 0C 00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |................|
-// CHECK: 00 00 |..|
-// CHECK: }
-// CHECK: 4 = {
-// CHECK: Name = _main
-// CHECK: Value = 0
-// CHECK: SectionNumber = 1
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_FUNCTION (2)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
-// CHECK: NumberOfAuxSymbols = 0
-// CHECK: AuxillaryData =
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Number: [[TextNum:[0-9]+]]
+// CHECK: Name: .text
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: {{[0-9]+}}
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 2
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0x60500020)
+// CHECK: IMAGE_SCN_ALIGN_16BYTES
+// CHECK: IMAGE_SCN_CNT_CODE
+// CHECK: IMAGE_SCN_MEM_EXECUTE
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_I386_DIR32 .data
+// CHECK: 0x{{[0-9A-F]+}} IMAGE_REL_I386_REL32 _printf
+// CHECK: ]
+// CHECK: }
+// CHECK: Section {
+// CHECK: Number: [[DataNum:[0-9]+]]
+// CHECK: Name: .data
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: {{[0-9]+}}
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x0
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0xC0300040)
+// CHECK: IMAGE_SCN_ALIGN_4BYTES
+// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: IMAGE_SCN_MEM_WRITE
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: SectionData (
+// CHECK: 0000: 48656C6C 6F20576F 726C6400 |Hello World.|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: .text
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: 21
+// CHECK: RelocationCount: 2
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: 1
+// CHECK: Selection: 0x0
// CHECK: }
-// CHECK: 5 = {
-// CHECK: Name = _printf
-// CHECK: Value = 0
-// CHECK: SectionNumber = 0
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
-// CHECK: NumberOfAuxSymbols = 0
-// CHECK: AuxillaryData =
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: .data
+// CHECK: Value: 0
+// CHECK: Section: .data
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: 12
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: 2
+// CHECK: Selection: 0x0
+// CHECK: Unused: (00 00 00)
// CHECK: }
-// CHECK: ]
-// CHECK: }
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _main
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Function
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _printf
+// CHECK: Value: 0
+// CHECK: Section: (0)
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: ]
diff --git a/test/MC/COFF/bss.s b/test/MC/COFF/bss.s
index 3bed13d4aa..86294c1868 100644
--- a/test/MC/COFF/bss.s
+++ b/test/MC/COFF/bss.s
@@ -1,7 +1,7 @@
// The purpose of this test is to verify that bss sections are emited correctly.
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s
.bss
.globl _g0
@@ -9,7 +9,7 @@
_g0:
.long 0
-// CHECK: Name = .bss
-// CHECK-NEXT: VirtualSize = 0
-// CHECK-NEXT: VirtualAddress = 0
-// CHECK-NEXT: SizeOfRawData = 4
+// CHECK: Name: .bss
+// CHECK-NEXT: VirtualSize: 0
+// CHECK-NEXT: VirtualAddress: 0
+// CHECK-NEXT: RawDataSize: 4
diff --git a/test/MC/COFF/diff.s b/test/MC/COFF/diff.s
index aa683f26a7..820272a40b 100644
--- a/test/MC/COFF/diff.s
+++ b/test/MC/COFF/diff.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-mingw32 %s | llvm-readobj -s -sr -sd | FileCheck %s
.def _foobar;
.scl 2;
@@ -21,26 +21,12 @@ _rust_crate:
.long _foobar-_rust_crate
.long _foobar-_rust_crate
-// CHECK: Name = .data
-// CHECK: SectionData =
-// CHECK-NEXT: 00 00 00 00 00 00 00 00 - 1C 00 00 00 20 00 00 00 |............ ...|
-// CHECK: Relocations = [
-// CHECK-NEXT: 0 = {
-// CHECK-NEXT: VirtualAddress = 0x4
-// CHECK-NEXT: SymbolTableIndex =
-// CHECK-NEXT: Type = IMAGE_REL_I386_DIR32 (6)
-// CHECK-NEXT: SymbolName = _foobar
-// CHECK-NEXT: }
-// CHECK-NEXT: 1 = {
-// CHECK-NEXT: VirtualAddress = 0x8
-// CHECK-NEXT: SymbolTableIndex = 0
-// CHECK-NEXT: Type = IMAGE_REL_I386_REL32 (20)
-// CHECK-NEXT: SymbolName = .text
-// CHECK-NEXT: }
-// CHECK-NEXT: 2 = {
-// CHECK-NEXT: VirtualAddress = 0xC
-// CHECK-NEXT: SymbolTableIndex = 0
-// CHECK-NEXT: Type = IMAGE_REL_I386_REL32 (20)
-// CHECK-NEXT: SymbolName = .text
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
+// CHECK: Name: .data
+// CHECK: Relocations [
+// CHECK-NEXT: 0x4 IMAGE_REL_I386_DIR32 _foobar
+// CHECK-NEXT: 0x8 IMAGE_REL_I386_REL32 .text
+// CHECK-NEXT: 0xC IMAGE_REL_I386_REL32 .text
+// CHECK-NEXT: ]
+// CHECK: SectionData (
+// CHECK-NEXT: 0000: 00000000 00000000 1C000000 20000000
+// CHECK-NEXT: )
diff --git a/test/MC/COFF/module-asm.ll b/test/MC/COFF/module-asm.ll
index 9c6d00d2f5..bf14dc695b 100644
--- a/test/MC/COFF/module-asm.ll
+++ b/test/MC/COFF/module-asm.ll
@@ -1,26 +1,28 @@
; The purpose of this test is to verify that various module level assembly
; constructs work.
-; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
-; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | coff-dump.py | FileCheck %s
+; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s
+; RUN: llc -filetype=obj -mtriple x86_64-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s
module asm ".text"
module asm "_foo:"
module asm " ret"
-; CHECK: Name = .text
-; CHECK-NEXT: VirtualSize = 0
-; CHECK-NEXT: VirtualAddress = 0
-; CHECK-NEXT: SizeOfRawData = {{[0-9]+}}
-; CHECK-NEXT: PointerToRawData = 0x{{[0-9A-F]+}}
-; CHECK-NEXT: PointerToRelocations = 0x{{[0-9A-F]+}}
-; CHECK-NEXT: PointerToLineNumbers = 0x0
-; CHECK-NEXT: NumberOfRelocations = 0
-; CHECK-NEXT: NumberOfLineNumbers = 0
-; CHECK-NEXT: Charateristics = 0x60300020
-; CHECK-NEXT: IMAGE_SCN_CNT_CODE
+; CHECK: Name: .text
+; CHECK-NEXT: VirtualSize: 0
+; CHECK-NEXT: VirtualAddress: 0
+; CHECK-NEXT: RawDataSize: {{[0-9]+}}
+; CHECK-NEXT: PointerToRawData: 0x{{[0-9A-F]+}}
+; CHECK-NEXT: PointerToRelocations: 0x{{[0-9A-F]+}}
+; CHECK-NEXT: PointerToLineNumbers: 0x0
+; CHECK-NEXT: RelocationCount: 0
+; CHECK-NEXT: LineNumberCount: 0
+; CHECK-NEXT: Characteristics [ (0x60300020)
; CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
+; CHECK-NEXT: IMAGE_SCN_CNT_CODE
; CHECK-NEXT: IMAGE_SCN_MEM_EXECUTE
; CHECK-NEXT: IMAGE_SCN_MEM_READ
-; CHECK-NEXT: SectionData =
-; CHECK-NEXT: C3
+; CHECK-NEXT: ]
+; CHECK-NEXT: SectionData (
+; CHECK-NEXT: 0000: C3
+; CHECK-NEXT: )
diff --git a/test/MC/COFF/secrel32.s b/test/MC/COFF/secrel32.s
index ce148db900..deadfe09e0 100644
--- a/test/MC/COFF/secrel32.s
+++ b/test/MC/COFF/secrel32.s
@@ -1,14 +1,10 @@
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s -sr | FileCheck %s
// check that we produce the correct relocation for .secrel32
Lfoo:
.secrel32 Lfoo
-// CHECK: Relocations = [
-// CHECK-NEXT: 0 = {
-// CHECK-NEXT: VirtualAddress = 0x0
-// CHECK-NEXT: SymbolTableIndex = 0
-// CHECK-NEXT: Type = IMAGE_REL_I386_SECREL (11)
-// CHECK-NEXT: SymbolName = .text
-// CHECK-NEXT: }
+// CHECK: Relocations [
+// CHECK-NEXT: 0x0 IMAGE_REL_I386_SECREL .text
+// CHECK-NEXT: ]
diff --git a/test/MC/COFF/seh-section.s b/test/MC/COFF/seh-section.s
index 802cba5e6b..7f05cc372e 100644
--- a/test/MC/COFF/seh-section.s
+++ b/test/MC/COFF/seh-section.s
@@ -1,24 +1,26 @@
// This test ensures that, if the section containing a function has a suffix
// (e.g. .text$foo), its unwind info section also has a suffix (.xdata$foo).
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s -sd | FileCheck %s
// XFAIL: *
-// CHECK: Name = .xdata$foo
+// CHECK: Name: .xdata$foo
// CHECK-NEXT: VirtualSize
// CHECK-NEXT: VirtualAddress
-// CHECK-NEXT: SizeOfRawData = 8
+// CHECK-NEXT: RawDataSize: 8
// CHECK-NEXT: PointerToRawData
// CHECK-NEXT: PointerToRelocations
// CHECK-NEXT: PointerToLineNumbers
-// CHECK-NEXT: NumberOfRelocations = 0
-// CHECK-NEXT: NumberOfLineNumbers = 0
-// CHECK-NEXT: Charateristics
-// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+// CHECK-NEXT: RelocationCount: 0
+// CHECK-NEXT: LineNumberCount: 0
+// CHECK-NEXT: Characteristics [
// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
+// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
// CHECK-NEXT: IMAGE_SCN_MEM_READ
// CHECK-NEXT: IMAGE_SCN_MEM_WRITE
-// CHECK-NEXT: SectionData
-// CHECK-NEXT: 01 05 02 00 05 50 04 02
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 01050200 05500402
+// CHECK-NEXT: )
.section .text$foo,"x"
.globl foo
diff --git a/test/MC/COFF/seh.s b/test/MC/COFF/seh.s
index 3f72805600..bef425efb4 100644
--- a/test/MC/COFF/seh.s
+++ b/test/MC/COFF/seh.s
@@ -1,24 +1,105 @@
// This test checks that the SEH directives emit the correct unwind data.
-// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | coff-dump.py | FileCheck %s
-// CHECK: Name = .xdata
-// CHECK-NEXT: VirtualSize
-// CHECK-NEXT: VirtualAddress
-// CHECK-NEXT: SizeOfRawData = 52
-// CHECK-NEXT: PointerToRawData
-// CHECK-NEXT: PointerToRelocations
-// CHECK-NEXT: PointerToLineNumbers
-// CHECK-NEXT: NumberOfRelocations = 4
-// CHECK-NEXT: NumberOfLineNumbers = 0
-// CHECK-NEXT: Charateristics
-// CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
-// CHECK-NEXT: IMAGE_SCN_ALIGN_4BYTES
-// CHECK-NEXT: IMAGE_SCN_MEM_READ
-// CHECK-NEXT: SectionData
-// CHECK-NEXT: 09 12 08 03 00 03 0F 30 - 0E 88 00 00 09 64 02 00
-// CHECK-NEXT: 04 22 00 1A 00 00 00 00 - 00 00 00 00 21 00 00 00
-// CHECK-NEXT: 00 00 00 00 1B 00 00 00 - 00 00 00 00 01 00 00 00
-// CHECK-NEXT: 00 00 00 00
+// TODO: Expected fail because SET_FPREG has a wrong offset.
+// XFAIL: *
+// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -s -u | FileCheck %s
+
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK: RelocationCount: 0
+// CHECK: Characteristics [
+// CHECK-NEXT: ALIGN_4BYTES
+// CHECK-NEXT: CNT_CODE
+// CHECK-NEXT: MEM_EXECUTE
+// CHECK-NEXT: MEM_READ
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Name: .xdata
+// CHECK: RawDataSize: 52
+// CHECK: RelocationCount: 4
+// CHECK: Characteristics [
+// CHECK-NEXT: ALIGN_4BYTES
+// CHECK-NEXT: CNT_INITIALIZED_DATA
+// CHECK-NEXT: MEM_READ
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Name: .pdata
+// CHECK: RelocationCount: 9
+// CHECK: Characteristics [
+// CHECK-NEXT: ALIGN_4BYTES
+// CHECK-NEXT: CNT_INITIALIZED_DATA
+// CHECK-NEXT: MEM_READ
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+
+// CHECK: UnwindInformation [
+// CHECK-NEXT: RuntimeFunction {
+// CHECK-NEXT: StartAddress: [[CodeSect1:[^ ]+]] [[BeginDisp1:(\+0x[A-F0-9]+)?]]
+// CHECK-NEXT: EndAddress: [[CodeSect1]] [[EndDisp1:(\+0x[A-F0-9]+)?]]
+// CHECK-NEXT: UnwindInfoAddress:
+// CHECK-NEXT: UnwindInfo {
+// CHECK-NEXT: Version: 1
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ExceptionHandler
+// CHECK-NEXT: ]
+// CHECK-NEXT: PrologSize: 18
+// CHECK-NEXT: FrameRegister: RBX
+// CHECK-NEXT: FrameOffset: 0x0
+// CHECK-NEXT: UnwindCodeCount: 8
+// CHECK-NEXT: UnwindCodes [
+// CHECK-NEXT: 0x12: SET_FPREG reg=RBX, offset=0x0
+// CHECK-NEXT: 0x0F: PUSH_NONVOL reg=RBX
+// CHECK-NEXT: 0x0E: SAVE_XMM128 reg=XMM8, offset=0x0
+// CHECK-NEXT: 0x09: SAVE_NONVOL reg=RSI, offset=0x10
+// CHECK-NEXT: 0x04: ALLOC_SMALL size=24
+// CHECK-NEXT: 0x00: PUSH_MACHFRAME errcode=yes
+// CHECK-NEXT: ]
+// CHECK-NEXT: Handler: __C_specific_handler
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+// CHECK-NEXT: RuntimeFunction {
+// CHECK-NEXT: StartAddress: [[CodeSect2:[^ ]+]] [[BeginDisp2:(\+0x[A-F0-9]+)?]]
+// CHECK-NEXT: EndAddress: [[CodeSect2]] [[BeginDisp2:(\+0x[A-F0-9]+)?]]
+// CHECK-NEXT: UnwindInfoAddress:
+// CHECK-NEXT: UnwindInfo {
+// CHECK-NEXT: Version: 1
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ChainInfo
+// CHECK-NEXT: ]
+// CHECK-NEXT: PrologSize: 0
+// CHECK-NEXT: FrameRegister: -
+// CHECK-NEXT: FrameOffset: -
+// CHECK-NEXT: UnwindCodeCount: 0
+// CHECK-NEXT: UnwindCodes [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Chained {
+// CHECK-NEXT: StartAddress: [[CodeSect1]] [[BeginDisp1]]
+// CHECK-NEXT: EndAddress: [[CodeSect1]] [[EndDisp1]]
+// CHECK-NEXT: UnwindInfoAddress:
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+// CHECK-NEXT: RuntimeFunction {
+// CHECK-NEXT: StartAddress: [[CodeSect3:[^ ]+]] [[BeginDisp3:(\+0x[A-F0-9]+)?]]
+// CHECK-NEXT: EndAddress: [[CodeSect3]] [[BeginDisp3:(\+0x[A-F0-9]+)?]]
+// CHECK-NEXT: UnwindInfoAddress:
+// CHECK-NEXT: UnwindInfo {
+// CHECK-NEXT: Version: 1
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: PrologSize: 0
+// CHECK-NEXT: FrameRegister: -
+// CHECK-NEXT: FrameOffset: -
+// CHECK-NEXT: UnwindCodeCount: 0
+// CHECK-NEXT: UnwindCodes [
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
.text
.globl func
diff --git a/test/MC/COFF/simple-fixups.s b/test/MC/COFF/simple-fixups.s
index 4c9b4d4452..2a74f21f12 100644
--- a/test/MC/COFF/simple-fixups.s
+++ b/test/MC/COFF/simple-fixups.s
@@ -1,8 +1,8 @@
// The purpose of this test is to verify that we do not produce unneeded
// relocations when symbols are in the same section and we know their offset.
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
-// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -s | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -s | FileCheck %s
.def _foo;
.scl 2;
@@ -41,10 +41,9 @@ _baz: # @baz
# BB#0: # %e
subl $4, %esp
Ltmp0:
- calll _baz
+ call _baz
addl $4, %esp
ret
-// CHECK: Sections = [
-// CHECK-NOT: NumberOfRelocations = {{[^0]}}
-// CHECK: Symbols = [
+// CHECK: Sections [
+// CHECK-NOT: RelocationCount: {{[^0]}}
diff --git a/test/MC/COFF/symbol-alias.s b/test/MC/COFF/symbol-alias.s
index 4b1772ce71..ccada3793c 100644
--- a/test/MC/COFF/symbol-alias.s
+++ b/test/MC/COFF/symbol-alias.s
@@ -1,9 +1,9 @@
// The purpose of this test is to verify that symbol aliases
-// (@foo = alias <type> @bar) generate the correct entries in the symbol table.
+// (@foo: alias <type> @bar) generate the correct entries in the symbol table.
// They should be identical except for the name.
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s
.def _foo;
.scl 2;
@@ -31,43 +31,43 @@ _bar_alias_alias = _bar_alias
.globl _bar_alias
_bar_alias = _bar
-// CHECK: Name = {{_?}}foo
-// CHECK-NEXT: Value = [[FOO_VALUE:.*$]]
-// CHECK-NEXT: SectionNumber = [[FOO_SECTION_NUMBER:.*$]]
-// CHECK-NEXT: SimpleType = [[FOO_SIMPLE_TYPE:.*$]]
-// CHECK-NEXT: ComplexType = [[FOO_COMPLEX_TYPE:.*$]]
-// CHECK-NEXT: StorageClass = [[FOO_STORAGE_CLASS:.*$]]
-// CHECK-NEXT: NumberOfAuxSymbols = [[FOO_NUMBER_OF_AUX_SYMBOLS:.*$]]
+// CHECK: Name: {{_?}}foo
+// CHECK-NEXT: Value: [[FOO_VALUE:.*$]]
+// CHECK-NEXT: Section: [[FOO_SECTION_NUMBER:.*$]]
+// CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE:.*$]]
+// CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE:.*$]]
+// CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS:.*$]]
+// CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS:.*$]]
-// CHECK: Name = {{_?}}bar
-// CHECK-NEXT: Value = [[BAR_VALUE:.*$]]
-// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER:.*$]]
-// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE:.*$]]
-// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE:.*$]]
-// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS:.*$]]
-// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS:.*$]]
+// CHECK: Name: {{_?}}bar
+// CHECK-NEXT: Value: [[BAR_VALUE:.*$]]
+// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER:.*$]]
+// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE:.*$]]
+// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE:.*$]]
+// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS:.*$]]
+// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS:.*$]]
-// CHECK: Name = {{_?}}foo_alias
-// CHECK-NEXT: Value = [[FOO_VALUE]]
-// CHECK-NEXT: SectionNumber = [[FOO_SECTION_NUMBER]]
-// CHECK-NEXT: SimpleType = [[FOO_SIMPLE_TYPE]]
-// CHECK-NEXT: ComplexType = [[FOO_COMPLEX_TYPE]]
-// CHECK-NEXT: StorageClass = [[FOO_STORAGE_CLASS]]
-// CHECK-NEXT: NumberOfAuxSymbols = [[FOO_NUMBER_OF_AUX_SYMBOLS]]
+// CHECK: Name: {{_?}}foo_alias
+// CHECK-NEXT: Value: [[FOO_VALUE]]
+// CHECK-NEXT: Section: [[FOO_SECTION_NUMBER]]
+// CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE]]
+// CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE]]
+// CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS]]
+// CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS]]
-// CHECK: Name = {{_?}}bar_alias_alias
-// CHECK-NEXT: Value = [[BAR_VALUE]]
-// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER]]
-// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE]]
-// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE]]
-// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS]]
-// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS]]
+// CHECK: Name: {{_?}}bar_alias_alias
+// CHECK-NEXT: Value: [[BAR_VALUE]]
+// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]]
+// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]]
+// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]]
+// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]]
+// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]]
-// CHECK: Name = {{_?}}bar_alias
-// CHECK-NEXT: Value = [[BAR_VALUE]]
-// CHECK-NEXT: SectionNumber = [[BAR_SECTION_NUMBER]]
-// CHECK-NEXT: SimpleType = [[BAR_SIMPLE_TYPE]]
-// CHECK-NEXT: ComplexType = [[BAR_COMPLEX_TYPE]]
-// CHECK-NEXT: StorageClass = [[BAR_STORAGE_CLASS]]
-// CHECK-NEXT: NumberOfAuxSymbols = [[BAR_NUMBER_OF_AUX_SYMBOLS]]
+// CHECK: Name: {{_?}}bar_alias
+// CHECK-NEXT: Value: [[BAR_VALUE]]
+// CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]]
+// CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]]
+// CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]]
+// CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]]
+// CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]]
diff --git a/test/MC/COFF/symbol-fragment-offset-64.s b/test/MC/COFF/symbol-fragment-offset-64.s
new file mode 100644
index 0000000000..b8244709aa
--- /dev/null
+++ b/test/MC/COFF/symbol-fragment-offset-64.s
@@ -0,0 +1,168 @@
+// The purpose of this test is to see if the COFF object writer is emitting the
+// proper relocations for multiple pieces of data in a single data fragment.
+
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
+
+.def _main;
+ .scl 2;
+ .type 32;
+ .endef
+ .text
+ .globl _main
+ .align 16, 0x90
+_main: # @main
+# BB#0: # %entry
+ subl $4, %esp
+ movl $.L_.str0, (%esp)
+ callq _printf
+ movl $.L_.str1, (%esp)
+ callq _puts
+ movl $.L_.str2, (%esp)
+ callq _puts
+ xorl %eax, %eax
+ addl $4, %esp
+ ret
+
+ .data
+.L_.str0: # @.str0
+ .asciz "Hello "
+
+.L_.str1: # @.str1
+ .asciz "World!"
+
+ .align 16 # @.str2
+.L_.str2:
+ .asciz "I'm The Last Line."
+
+// CHECK: {
+// CHECK: Machine: IMAGE_FILE_MACHINE_AMD64
+// CHECK: SectionCount: 2
+// CHECK: TimeDateStamp: {{[0-9]+}}
+// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
+// CHECK: SymbolCount: 7
+// CHECK: OptionalHeaderSize: 0
+// CHECK: Characteristics [ (0x0)
+// CHECK: ]
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Number: 1
+// CHECK: Name: .text
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: {{[0-9]+}}
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 6
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0x60500020)
+// CHECK: IMAGE_SCN_ALIGN_16BYTES
+// CHECK: IMAGE_SCN_CNT_CODE
+// CHECK: IMAGE_SCN_MEM_EXECUTE
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: 0x7 IMAGE_REL_AMD64_ADDR32 .data
+// CHECK: 0xC IMAGE_REL_AMD64_REL32 _printf
+// CHECK: 0x14 IMAGE_REL_AMD64_ADDR32 .data
+// CHECK: 0x19 IMAGE_REL_AMD64_REL32 _puts
+// CHECK: 0x21 IMAGE_REL_AMD64_ADDR32 .data
+// CHECK: 0x26 IMAGE_REL_AMD64_REL32 _puts
+// CHECK: ]
+// CHECK: SectionData (
+// CHECK: 0000: 83EC0467 C7042400 000000E8 00000000
+// CHECK: 0010: 67C70424 07000000 E8000000 0067C704
+// CHECK: 0020: 24100000 00E80000 000031C0 83C404C3
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Number: 2
+// CHECK: Name: .data
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: {{[0-9]+}}
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x0
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0xC0500040)
+// CHECK: IMAGE_SCN_ALIGN_16BYTES
+// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: IMAGE_SCN_MEM_WRITE
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: SectionData (
+// CHECK: 0000: 48656C6C 6F200057 6F726C64 21000000 |Hello .World!...|
+// CHECK: 0010: 49276D20 54686520 4C617374 204C696E |I'm The Last Lin|
+// CHECK: 0020: 652E00 |e..|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: .text
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: 48
+// CHECK: RelocationCount: 6
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: 1
+// CHECK: Selection: 0x0
+// CHECK: Unused: (00 00 00)
+// CHECK: }
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: .data
+// CHECK: Value: 0
+// CHECK: Section: .data
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: 35
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: 2
+// CHECK: Selection: 0x0
+// CHECK: Unused: (00 00 00)
+// CHECK: }
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _main
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Function
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _printf
+// CHECK: Value: 0
+// CHECK: Section: (0)
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _puts
+// CHECK: Value: 0
+// CHECK: Section: (0)
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: ]
diff --git a/test/MC/COFF/symbol-fragment-offset.s b/test/MC/COFF/symbol-fragment-offset.s
index 1df8baacaf..71b1703972 100644
--- a/test/MC/COFF/symbol-fragment-offset.s
+++ b/test/MC/COFF/symbol-fragment-offset.s
@@ -1,8 +1,7 @@
// The purpose of this test is to see if the COFF object writer is emitting the
// proper relocations for multiple pieces of data in a single data fragment.
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s
-// I WOULD RUN, BUT THIS FAILS: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -s -sr -sd -t | FileCheck %s
.def _main;
.scl 2;
@@ -36,152 +35,134 @@ L_.str2:
.asciz "I'm The Last Line."
// CHECK: {
-// CHECK: MachineType = IMAGE_FILE_MACHINE_I386 (0x14C)
-// CHECK: NumberOfSections = 2
-// CHECK: TimeDateStamp = {{[0-9]+}}
-// CHECK: PointerToSymbolTable = 0x{{[0-9A-F]+}}
-// CHECK: NumberOfSymbols = 7
-// CHECK: SizeOfOptionalHeader = 0
-// CHECK: Characteristics = 0x0
-// CHECK: Sections = [
-// CHECK: 1 = {
-// CHECK: Name = .text
-// CHECK: VirtualSize = 0
-// CHECK: VirtualAddress = 0
-// CHECK: SizeOfRawData = {{[0-9]+}}
-// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
-// CHECK: PointerToRelocations = 0x{{[0-9A-F]+}}
-// CHECK: PointerToLineNumbers = 0x0
-// CHECK: NumberOfRelocations = 6
-// CHECK: NumberOfLineNumbers = 0
-// CHECK: Charateristics = 0x60500020
-// CHECK: IMAGE_SCN_CNT_CODE
-// CHECK: IMAGE_SCN_ALIGN_16BYTES
-// CHECK: IMAGE_SCN_MEM_EXECUTE
-// CHECK: IMAGE_SCN_MEM_READ
-// CHECK: SectionData =
-// CHECK: 83 EC 04 C7 04 24 00 00 - 00 00 E8 00 00 00 00 C7 |.....$..........|
-// CHECK: 04 24 07 00 00 00 E8 00 - 00 00 00 C7 04 24 10 00 |.$...........$..|
-// CHECK: 00 00 E8 00 00 00 00 31 - C0 83 C4 04 C3 |.......1.....|
-// CHECK: Relocations = [
-// CHECK: 0 = {
-// CHECK: VirtualAddress = 0x6
-// CHECK: SymbolTableIndex = 2
-// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
-// CHECK: SymbolName = .data
-// CHECK: }
-// CHECK: 1 = {
-// CHECK: VirtualAddress = 0xB
-// CHECK: SymbolTableIndex = 5
-// CHECK: Type = IMAGE_REL_I386_REL32 (20)
-// CHECK: SymbolName = _printf
-// CHECK: }
-// CHECK: 2 = {
-// CHECK: VirtualAddress = 0x12
-// CHECK: SymbolTableIndex = 2
-// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
-// CHECK: SymbolName = .data
-// CHECK: }
-// CHECK: 3 = {
-// CHECK: VirtualAddress = 0x17
-// CHECK: SymbolTableIndex = 6
-// CHECK: Type = IMAGE_REL_I386_REL32 (20)
-// CHECK: SymbolName = _puts
-// CHECK: }
-// CHECK: 4 = {
-// CHECK: VirtualAddress = 0x1E
-// CHECK: SymbolTableIndex = 2
-// CHECK: Type = IMAGE_REL_I386_DIR32 (6)
-// CHECK: SymbolName = .data
-// CHECK: }
-// CHECK: 5 = {
-// CHECK: VirtualAddress = 0x23
-// CHECK: SymbolTableIndex = 6
-// CHECK: Type = IMAGE_REL_I386_REL32 (20)
-// CHECK: SymbolName = _puts
-// CHECK: }
-// CHECK: ]
-// CHECK: }
-// CHECK: 2 = {
-// CHECK: Name = .data
-// CHECK: VirtualSize = 0
-// CHECK: VirtualAddress = 0
-// CHECK: SizeOfRawData = {{[0-9]+}}
-// CHECK: PointerToRawData = 0x{{[0-9A-F]+}}
-// CHECK: PointerToRelocations = 0x0
-// CHECK: PointerToLineNumbers = 0x0
-// CHECK: NumberOfRelocations = 0
-// CHECK: NumberOfLineNumbers = 0
-// CHECK: Charateristics = 0xC0500040
-// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
-// CHECK: IMAGE_SCN_ALIGN_16BYTES
-// CHECK: IMAGE_SCN_MEM_READ
-// CHECK: IMAGE_SCN_MEM_WRITE
-// CHECK: SectionData =
-// CHECK: 48 65 6C 6C 6F 20 00 57 - 6F 72 6C 64 21 00 00 00 |Hello .World!...|
-// CHECK: 49 27 6D 20 54 68 65 20 - 4C 61 73 74 20 4C 69 6E |I'm The Last Lin|
-// CHECK: 65 2E 00 |e..|
-// CHECK: Relocations = None
-// CHECK: }
+// CHECK: Machine: IMAGE_FILE_MACHINE_I386 (0x14C)
+// CHECK: SectionCount: 2
+// CHECK: TimeDateStamp: {{[0-9]+}}
+// CHECK: PointerToSymbolTable: 0x{{[0-9A-F]+}}
+// CHECK: SymbolCount: 7
+// CHECK: OptionalHeaderSize: 0
+// CHECK: Characteristics [ (0x0)
// CHECK: ]
-// CHECK: Symbols = [
-// CHECK: 0 = {
-// CHECK: Name = .text
-// CHECK: Value = 0
-// CHECK: SectionNumber = 1
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
-// CHECK: NumberOfAuxSymbols = 1
-// CHECK: AuxillaryData =
-// CHECK: 2D 00 00 00 06 00 00 00 - 00 00 00 00 01 00 00 00 |-...............|
-// CHECK: 00 00 |..|
-
-// CHECK: }
-// CHECK: 2 = {
-// CHECK: Name = .data
-// CHECK: Value = 0
-// CHECK: SectionNumber = 2
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_STATIC (3)
-// CHECK: NumberOfAuxSymbols = 1
-// CHECK: AuxillaryData =
-// CHECK: 23 00 00 00 00 00 00 00 - 00 00 00 00 02 00 00 00 |#...............|
-// CHECK: 00 00 |..|
-
-// CHECK: }
-// CHECK: 4 = {
-// CHECK: Name = _main
-// CHECK: Value = 0
-// CHECK: SectionNumber = 1
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_FUNCTION (2)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
-// CHECK: NumberOfAuxSymbols = 0
-// CHECK: AuxillaryData =
-
-// CHECK: 5 = {
-// CHECK: Name = _printf
-// CHECK: Value = 0
-// CHECK: SectionNumber = 0
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
-// CHECK: NumberOfAuxSymbols = 0
-// CHECK: AuxillaryData =
-
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Number: 1
+// CHECK: Name: .text
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: {{[0-9]+}}
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x{{[0-9A-F]+}}
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 6
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0x60500020)
+// CHECK: IMAGE_SCN_ALIGN_16BYTES
+// CHECK: IMAGE_SCN_CNT_CODE
+// CHECK: IMAGE_SCN_MEM_EXECUTE
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: ]
+// CHECK: Relocations [
+// CHECK: 0x6 IMAGE_REL_I386_DIR32 .data
+// CHECK: 0xB IMAGE_REL_I386_REL32 _printf
+// CHECK: 0x12 IMAGE_REL_I386_DIR32 .data
+// CHECK: 0x17 IMAGE_REL_I386_REL32 _puts
+// CHECK: 0x1E IMAGE_REL_I386_DIR32 .data
+// CHECK: 0x23 IMAGE_REL_I386_REL32 _puts
+// CHECK: ]
+// CHECK: SectionData (
+// CHECK: 0000: 83EC04C7 04240000 0000E800 000000C7 |.....$..........|
+// CHECK: 0010: 04240700 0000E800 000000C7 04241000 |.$...........$..|
+// CHECK: 0020: 0000E800 00000031 C083C404 C3 |.......1.....|
+// CHECK: )
+// CHECK: }
+// CHECK: Section {
+// CHECK: Number: 2
+// CHECK: Name: .data
+// CHECK: VirtualSize: 0
+// CHECK: VirtualAddress: 0
+// CHECK: RawDataSize: {{[0-9]+}}
+// CHECK: PointerToRawData: 0x{{[0-9A-F]+}}
+// CHECK: PointerToRelocations: 0x0
+// CHECK: PointerToLineNumbers: 0x0
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Characteristics [ (0xC0500040)
+// CHECK: IMAGE_SCN_ALIGN_16BYTES
+// CHECK: IMAGE_SCN_CNT_INITIALIZED_DATA
+// CHECK: IMAGE_SCN_MEM_READ
+// CHECK: IMAGE_SCN_MEM_WRITE
+// CHECK: Relocations [
+// CHECK: ]
+// CHECK: SectionData (
+// CHECK: 0000: 48656C6C 6F200057 6F726C64 21000000 |Hello .World!...|
+// CHECK: 0010: 49276D20 54686520 4C617374 204C696E |I'm The Last Lin|
+// CHECK: 0020: 652E00 |e..|
+// CHECK: )
+// CHECK: }
+// CHECK: ]
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: .text
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: 45
+// CHECK: RelocationCount: 6
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: 1
+// CHECK: Selection: 0x0
+// CHECK: Unused: (00 00 00)
// CHECK: }
-// CHECK: 6 = {
-// CHECK: Name = _puts
-// CHECK: Value = 0
-// CHECK: SectionNumber = 0
-// CHECK: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
-// CHECK: NumberOfAuxSymbols = 0
-// CHECK: AuxillaryData =
-
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: .data
+// CHECK: Value: 0
+// CHECK: Section: .data
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: Static
+// CHECK: AuxSymbolCount: 1
+// CHECK: AuxSectionDef {
+// CHECK: Length: 35
+// CHECK: RelocationCount: 0
+// CHECK: LineNumberCount: 0
+// CHECK: Checksum: 0x0
+// CHECK: Number: 2
+// CHECK: Selection: 0x0
+// CHECK: Unused: (00 00 00)
// CHECK: }
-// CHECK: ]
-// CHECK: }
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _main
+// CHECK: Value: 0
+// CHECK: Section: .text
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Function
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _printf
+// CHECK: Value: 0
+// CHECK: Section: (0)
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: Symbol {
+// CHECK: Name: _puts
+// CHECK: Value: 0
+// CHECK: Section: (0)
+// CHECK: BaseType: Null
+// CHECK: ComplexType: Null
+// CHECK: StorageClass: External
+// CHECK: AuxSymbolCount: 0
+// CHECK: }
+// CHECK: ]
diff --git a/test/MC/COFF/weak-symbol-section-specification.ll b/test/MC/COFF/weak-symbol-section-specification.ll
index 5049372959..4772c929f2 100644
--- a/test/MC/COFF/weak-symbol-section-specification.ll
+++ b/test/MC/COFF/weak-symbol-section-specification.ll
@@ -1,23 +1,25 @@
; The purpose of this test is to verify that weak linkage type is not ignored by backend,
; if section was specialized.
-; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | coff-dump.py | FileCheck %s
+; RUN: llc -filetype=obj -mtriple i686-pc-win32 %s -o - | llvm-readobj -s -sd | FileCheck %s
@a = weak unnamed_addr constant { i32, i32, i32 } { i32 0, i32 0, i32 0}, section ".data"
-; CHECK: Name = .data$a
-; CHECK-NEXT: VirtualSize = 0
-; CHECK-NEXT: VirtualAddress = 0
-; CHECK-NEXT: SizeOfRawData = {{[0-9]+}}
-; CHECK-NEXT: PointerToRawData = 0x{{[0-9A-F]+}}
-; CHECK-NEXT: PointerToRelocations = 0x0
-; CHECK-NEXT: PointerToLineNumbers = 0x0
-; CHECK-NEXT: NumberOfRelocations = 0
-; CHECK-NEXT: NumberOfLineNumbers = 0
-; CHECK-NEXT: Charateristics = 0x40401040
+; CHECK: Name: .data$a
+; CHECK-NEXT: VirtualSize: 0
+; CHECK-NEXT: VirtualAddress: 0
+; CHECK-NEXT: RawDataSize: {{[0-9]+}}
+; CHECK-NEXT: PointerToRawData: 0x{{[0-9A-F]+}}
+; CHECK-NEXT: PointerToRelocations: 0x0
+; CHECK-NEXT: PointerToLineNumbers: 0x0
+; CHECK-NEXT: RelocationCount: 0
+; CHECK-NEXT: LineNumberCount: 0
+; CHECK-NEXT: Characteristics [ (0x40401040)
+; CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
; CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
; CHECK-NEXT: IMAGE_SCN_LNK_COMDAT
-; CHECK-NEXT: IMAGE_SCN_ALIGN_8BYTES
; CHECK-NEXT: IMAGE_SCN_MEM_READ
-; CHECK-NEXT: SectionData =
-; CHECK-NEXT: 00 00 00 00 00 00 00 00 - 00 00 00 00
+; CHECK-NEXT: ]
+; CHECK-NEXT: SectionData (
+; CHECK-NEXT: 0000: 00000000 00000000 00000000
+; CHECK-NEXT: )
diff --git a/test/MC/COFF/weak.s b/test/MC/COFF/weak.s
index 0f99313c9c..14f7c6564a 100644
--- a/test/MC/COFF/weak.s
+++ b/test/MC/COFF/weak.s
@@ -1,7 +1,8 @@
// This tests that default-null weak symbols (a GNU extension) are created
// properly via the .weak directive.
-// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 < %s | coff-dump.py | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s
.def _main;
.scl 2;
@@ -17,7 +18,7 @@ _main: # @main
testl %eax, %eax
je LBB0_2
# BB#1: # %if.then
- calll _test_weak
+ call _test_weak
movl $1, %eax
addl $4, %esp
ret
@@ -28,24 +29,29 @@ LBB0_2: # %return
.weak _test_weak
-// CHECK: Symbols = [
+// CHECK: Symbols [
-// CHECK: Name = _test_weak
-// CHECK-NEXT: Value = 0
-// CHECK-NEXT: SectionNumber = 0
-// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_WEAK_EXTERNAL (105)
-// CHECK-NEXT: NumberOfAuxSymbols = 1
-// CHECK-NEXT: AuxillaryData =
-// CHECK-NEXT: 05 00 00 00 02 00 00 00 - 00 00 00 00 00 00 00 00 |................|
-// CHECK-NEXT: 00 00 |..|
+// CHECK: Symbol {
+// CHECK: Name: _test_weak
+// CHECK-NEXT: Value: 0
+// CHECK-NEXT: Section: (0)
+// CHECK-NEXT: BaseType: Null
+// CHECK-NEXT: ComplexType: Null
+// CHECK-NEXT: StorageClass: WeakExternal
+// CHECK-NEXT: AuxSymbolCount: 1
+// CHECK-NEXT: AuxWeakExternal {
+// CHECK-NEXT: Linked: .weak._test_weak.default
+// CHECK-NEXT: Search: Library
+// CHECK-NEXT: Unused: (00 00 00 00 00 00 00 00 00 00)
+// CHECK-NEXT: }
+// CHECK-NEXT: }
-// CHECK: Name = .weak._test_weak.default
-// CHECK-NEXT: Value = 0
-// CHECK-NEXT: SectionNumber = 65535
-// CHECK-NEXT: SimpleType = IMAGE_SYM_TYPE_NULL (0)
-// CHECK-NEXT: ComplexType = IMAGE_SYM_DTYPE_NULL (0)
-// CHECK-NEXT: StorageClass = IMAGE_SYM_CLASS_EXTERNAL (2)
-// CHECK-NEXT: NumberOfAuxSymbols = 0
-// CHECK-NEXT: AuxillaryData =
+// CHECK: Symbol {
+// CHECK: Name: .weak._test_weak.default
+// CHECK-NEXT: Value: 0
+// CHECK-NEXT: Section: (-1)
+// CHECK-NEXT: BaseType: Null
+// CHECK-NEXT: ComplexType: Null
+// CHECK-NEXT: StorageClass: External
+// CHECK-NEXT: AuxSymbolCount: 0
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/abs.s b/test/MC/ELF/abs.s
index 48dbe3dffc..1836f40059 100644
--- a/test/MC/ELF/abs.s
+++ b/test/MC/ELF/abs.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that zed will be an ABS symbol
@@ -6,11 +6,12 @@
.Lbar:
zed = .Lfoo - .Lbar
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000001) # 'zed'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0xfff1)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
+// CHECK: Symbol {
+// CHECK: Name: zed
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0xFFF1)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/alias-reloc.s b/test/MC/ELF/alias-reloc.s
index f0db81592e..c25c25932f 100644
--- a/test/MC/ELF/alias-reloc.s
+++ b/test/MC/ELF/alias-reloc.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
// Test that this produces a R_X86_64_PLT32 with bar.
@@ -17,36 +17,30 @@ foo2:
.set bar2,foo2
.quad bar2
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000001)
-// CHECK-NEXT: ('r_sym', 0x00000001)
-// CHECK-NEXT: ('r_type', 0x00000004)
-// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-// CHECK-NEXT: ),
-
-// CHECK: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x0000000000000005)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-
-// CHECK: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x0000000e) # 'bar2'
-// CHECK-NEXT: ('st_bind', 0x2)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0004)
-// CHECK-NEXT: ('st_value', 0x0000000000000005)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Relocations [
+// CHECK-NEXT: Section ({{[0-9]+}}) zed {
+// CHECK-NEXT: 0x1 R_X86_64_PLT32 bar 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: 0x5 R_X86_64_64 bar2 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK-NEXT: Name: bar
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+
+// CHECK: Symbol {
+// CHECK: Name: bar2
+// CHECK-NEXT: Value: 0x5
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Weak
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: zed
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/alias.s b/test/MC/ELF/alias.s
index f382628013..0575f41fc8 100644
--- a/test/MC/ELF/alias.s
+++ b/test/MC/ELF/alias.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
foo:
bar = foo
@@ -16,70 +16,78 @@ foo4:
bar4 = foo4
.long foo2
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x0000001d) # 'bar4'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x2)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 3
-// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x0000000e) # 'foo3'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000018) # 'foo4'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x2)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 7
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 8
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 9
-// CHECK-NEXT: (('st_name', 0x00000013) # 'bar3'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK: # Symbol 10
-// CHECK-NEXT: (('st_name', 0x00000009) # 'bar2'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
+
+// CHECK: Symbols [
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar4
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Function
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo3
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo4
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Function
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .text (0)
+// CHECK: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .data (0)
+// CHECK: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .bss (0)
+// CHECK: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar3
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar2
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/align-bss.s b/test/MC/ELF/align-bss.s
index a59232b812..776eef3846 100644
--- a/test/MC/ELF/align-bss.s
+++ b/test/MC/ELF/align-bss.s
@@ -1,17 +1,22 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the bss section is correctly aligned
.local foo
.comm foo,2048,16
-// CHECK: ('sh_name', 0x00000007) # '.bss'
-// CHECK-NEXT: ('sh_type', 0x00000008)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000800)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000010)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
+// CHECK: Section {
+// CHECK: Name: .bss
+// CHECK-NEXT: Type: SHT_NOBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_WRITE
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 2048
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 16
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/align-nops.s b/test/MC/ELF/align-nops.s
index 3bf96e956a..5e3386823f 100644
--- a/test/MC/ELF/align-nops.s
+++ b/test/MC/ELF/align-nops.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// Test that we get optimal nops in text
.text
@@ -15,26 +15,40 @@ f0:
.long 0
.align 8
-// CHECK: (('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x0000000000000010)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '00000000 0f1f4000 00000000 0f1f4000')
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 16
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 00000000 0F1F4000 00000000 0F1F4000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
-// CHECK: (('sh_name', 0x00000026) # '.data'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x0000000000000010)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '00000000 90909090 00000000 00000000')
+// CHECK: Section {
+// CHECK: Name: .data
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_WRITE
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 16
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 00000000 90909090 00000000 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/align-size.s b/test/MC/ELF/align-size.s
index f6282910db..84a6e99814 100644
--- a/test/MC/ELF/align-size.s
+++ b/test/MC/ELF/align-size.s
@@ -1,13 +1,18 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the alignment does contribute to the size of the section.
.zero 4
.align 8
-// CHECK: (('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000008)
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 8
+// CHECK: }
diff --git a/test/MC/ELF/align-text.s b/test/MC/ELF/align-text.s
index 2fd3cba502..b00af4a34b 100644
--- a/test/MC/ELF/align-text.s
+++ b/test/MC/ELF/align-text.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the .text directive doesn't cause alignment.
@@ -6,14 +6,18 @@
.text
.zero 1
-// CHECK: (('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000002)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 2
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/align.s b/test/MC/ELF/align.s
index 3142ffb553..46be3df62f 100644
--- a/test/MC/ELF/align.s
+++ b/test/MC/ELF/align.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the alignment of rodata doesn't force a alignment of the
// previous section (.bss)
@@ -7,26 +7,33 @@
.section .rodata,"a",@progbits
.align 8
-// CHECK: # Section 3
-// CHECK-NEXT: (('sh_name', 0x00000007) # '.bss'
-// CHECK-NEXT: ('sh_type', 0x00000008)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000026) # '.rodata'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
+// CHECK: Section {
+// CHECK: Name: .bss
+// CHECK-NEXT: Type: SHT_NOBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_WRITE
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x44
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 4
+// CHECK-NEXT: Name: .rodata
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/basic-elf-32.s b/test/MC/ELF/basic-elf-32.s
index 2c6a984195..3ddb53981a 100644
--- a/test/MC/ELF/basic-elf-32.s
+++ b/test/MC/ELF/basic-elf-32.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -h -s -r -t | FileCheck %s
.text
.globl main
@@ -30,49 +30,53 @@ main: # @main
.section .note.GNU-stack,"",@progbits
-// CHECK: ('e_indent[EI_CLASS]', 0x01)
-// CHECK: ('e_indent[EI_DATA]', 0x01)
-// CHECK: ('e_indent[EI_VERSION]', 0x01)
-// CHECK: ('_sections', [
-// CHECK: # Section 0
-// CHECK: (('sh_name', 0x00000000) # ''
+// CHECK: ElfHeader {
+// CHECK: Class: 32-bit
+// CHECK: DataEncoding: LittleEndian
+// CHECK: FileVersion: 1
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: (0)
-// CHECK: # '.text'
+// CHECK: Name: .text
-// CHECK: # '.rel.text'
+// CHECK: Name: .rel.text
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('r_offset', 0x00000006)
-// CHECK: ('r_type', 0x01)
-// CHECK: ),
-// CHECK: # Relocation 1
-// CHECK: (('r_offset', 0x0000000b)
-// CHECK: ('r_type', 0x02)
-// CHECK: ),
-// CHECK: # Relocation 2
-// CHECK: (('r_offset', 0x00000012)
-// CHECK: ('r_type', 0x01)
-// CHECK: ),
-// CHECK: # Relocation 3
-// CHECK: (('r_offset', 0x00000017)
-// CHECK: ('r_type', 0x02)
-// CHECK: ),
-// CHECK: ])
+// CHECK: Relocations [
+// CHECK: Section (1) .text {
+// CHECK: 0x6 R_386_32 .rodata.str1.1
+// CHECK: 0xB R_386_PC32 puts
+// CHECK: 0x12 R_386_32 .rodata.str1.1
+// CHECK: 0x17 R_386_PC32 puts
+// CHECK: }
+// CHECK: ]
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x3)
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Binding: Local
+// CHECK: Type: Section
+// CHECK: }
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x3)
+// CHECK: Symbol {
+// CHECK: Binding: Local
+// CHECK: Type: Section
+// CHECK: }
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x3)
+// CHECK: Symbol {
+// CHECK: Binding: Local
+// CHECK: Type: Section
+// CHECK: }
-// CHECK: # 'main'
-// CHECK: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x2)
+// CHECK: Symbol {
+// CHECK: Name: main
+// CHECK: Binding: Global
+// CHECK: Type: Function
+// CHECK: }
-// CHECK: # 'puts'
-// CHECK: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
+// CHECK: Symbol {
+// CHECK: Name: puts
+// CHECK: Binding: Global
+// CHECK: Type: None
+// CHECK: }
diff --git a/test/MC/ELF/basic-elf-64.s b/test/MC/ELF/basic-elf-64.s
index 38ffaa724a..f98623ad1e 100644
--- a/test/MC/ELF/basic-elf-64.s
+++ b/test/MC/ELF/basic-elf-64.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -h -s -r -t | FileCheck %s
.text
.globl main
@@ -30,53 +30,51 @@ main: # @main
.section .note.GNU-stack,"",@progbits
-// CHECK: ('e_indent[EI_CLASS]', 0x02)
-// CHECK: ('e_indent[EI_DATA]', 0x01)
-// CHECK: ('e_indent[EI_VERSION]', 0x01)
-// CHECK: ('_sections', [
-// CHECK: # Section 0
-// CHECK: (('sh_name', 0x00000000) # ''
+// CHECK: ElfHeader {
+// CHECK: Class: 64-bit
+// CHECK: DataEncoding: LittleEndian
+// CHECK: FileVersion: 1
+// CHECK: }
+// CHECK: Sections [
+// CHECK: Section {
+// CHECK: Index: 0
+// CHECK: Name: (0)
-// CHECK: # '.text'
+// CHECK: Name: .text
-// CHECK: # '.rela.text'
+// CHECK: Name: .rela.text
-// CHECK: ('_relocations', [
-// CHECK: # Relocation 0
-// CHECK: (('r_offset', 0x0000000000000005)
-// CHECK: ('r_type', 0x0000000a)
-// CHECK: ('r_addend', 0x0000000000000000)
-// CHECK: ),
-// CHECK: # Relocation 1
-// CHECK: (('r_offset', 0x000000000000000a)
-// CHECK: ('r_type', 0x00000002)
-// CHECK: ('r_addend', 0xfffffffffffffffc)
-// CHECK: ),
-// CHECK: # Relocation 2
-// CHECK: (('r_offset', 0x000000000000000f)
-// CHECK: ('r_type', 0x0000000a)
-// CHECK: ('r_addend', 0x0000000000000006)
-// CHECK: ),
-// CHECK: # Relocation 3
-// CHECK: (('r_offset', 0x0000000000000014)
-// CHECK: ('r_type', 0x00000002)
-// CHECK: ('r_addend', 0xfffffffffffffffc)
-// CHECK: ),
-// CHECK: ])
+// CHECK: Relocations [
+// CHECK: Section (1) .text {
+// CHECK: 0x5 R_X86_64_32 .rodata.str1.1 0x0
+// CHECK: 0xA R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC
+// CHECK: 0xF R_X86_64_32 .rodata.str1.1 0x6
+// CHECK: 0x14 R_X86_64_PC32 puts 0xFFFFFFFFFFFFFFFC
+// CHECK: }
+// CHECK: ]
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x3)
+// CHECK: Symbol {
+// CHECK: Binding: Local
+// CHECK: Type: Section
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x3)
+// CHECK: Symbol {
+// CHECK: Binding: Local
+// CHECK: Type: Section
+// CHECK: }
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x3)
+// CHECK: Symbol {
+// CHECK: Binding: Local
+// CHECK: Type: Section
+// CHECK: }
-// CHECK: # 'main'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x2)
+// CHECK: Symbol {
+// CHECK: Name: main
+// CHECK: Binding: Global
+// CHECK: Type: Function
+// CHECK: }
-// CHECK: # 'puts'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
+// CHECK: Symbol {
+// CHECK: Name: puts
+// CHECK: Binding: Global
+// CHECK: Type: None
+// CHECK: }
diff --git a/test/MC/ELF/call-abs.s b/test/MC/ELF/call-abs.s
index 795a65993c..81265a1b07 100644
--- a/test/MC/ELF/call-abs.s
+++ b/test/MC/ELF/call-abs.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
.text
.globl f
@@ -15,10 +15,8 @@ f: # @f
.section .note.GNU-stack,"",@progbits
-// CHECK: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x00000004)
-// CHECK-NEXT: ('r_sym', 0x000000)
-// CHECK-NEXT: ('r_type', 0x02)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: Relocations [
+// CHECK: Section ({{[^ ]+}}) {{[^ ]+}} {
+// CHECK-NEXT: 0x4 R_386_PC32 -
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/cfi-adjust-cfa-offset.s b/test/MC/ELF/cfi-adjust-cfa-offset.s
index f0d9c5fe23..137b8b6f84 100644
--- a/test/MC/ELF/cfi-adjust-cfa-offset.s
+++ b/test/MC/ELF/cfi-adjust-cfa-offset.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -11,36 +11,43 @@ f:
ret
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000038)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 1c000000 1c000000 00000000 0a000000 00440e10 410e1444 0e080000 00000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x00000000000003a0)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 56
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 1C000000 1C000000
+// CHECK-NEXT: 0020: 00000000 0A000000 00440E10 410E1444
+// CHECK-NEXT: 0030: 0E080000 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x3A0
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-advance-loc2.s b/test/MC/ELF/cfi-advance-loc2.s
index b3c08e0a0e..1cad32507c 100644
--- a/test/MC/ELF/cfi-advance-loc2.s
+++ b/test/MC/ELF/cfi-advance-loc2.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
// test that this produces a correctly encoded cfi_advance_loc2
@@ -10,36 +10,41 @@ f:
nop
.cfi_endproc
-// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000148)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 01010000 00030001 0e080000')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x148
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 01010000 00030001 0E080000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
-
-// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000490)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x490
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-def-cfa-offset.s b/test/MC/ELF/cfi-def-cfa-offset.s
index 0ed2be057e..f1a54a810e 100644
--- a/test/MC/ELF/cfi-def-cfa-offset.s
+++ b/test/MC/ELF/cfi-def-cfa-offset.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -10,37 +10,43 @@ f:
ret
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 0a000000 00440e10 450e0800')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 0A000000 00440E10 450E0800
+// CHECK-NEXT: )
+// CHECK-NEXT: }
-// CHECK: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000398)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x398
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-def-cfa-register.s b/test/MC/ELF/cfi-def-cfa-register.s
index e87b4f67d4..b1e74ea098 100644
--- a/test/MC/ELF/cfi-def-cfa-register.s
+++ b/test/MC/ELF/cfi-def-cfa-register.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -7,35 +7,41 @@ f:
nop
.cfi_endproc
-// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410d06 00000000')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 00410D06 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
-// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-def-cfa.s b/test/MC/ELF/cfi-def-cfa.s
index e25bf5c8e3..abde0de4fa 100644
--- a/test/MC/ELF/cfi-def-cfa.s
+++ b/test/MC/ELF/cfi-def-cfa.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -7,36 +7,41 @@ f:
nop
.cfi_endproc
-// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410c07 08000000')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 00410C07 08000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
-
-// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-escape.s b/test/MC/ELF/cfi-escape.s
index 3a5af00901..a910faba64 100644
--- a/test/MC/ELF/cfi-escape.s
+++ b/test/MC/ELF/cfi-escape.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00411507 7f000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 00411507 7F000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-offset.s b/test/MC/ELF/cfi-offset.s
index 9acb76c24d..f7f95fbc5f 100644
--- a/test/MC/ELF/cfi-offset.s
+++ b/test/MC/ELF/cfi-offset.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -7,36 +7,41 @@ f:
nop
.cfi_endproc
-// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00418602 00000000')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 00418602 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
-
-// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-register.s b/test/MC/ELF/cfi-register.s
index 3772309703..f7a07e45d8 100644
--- a/test/MC/ELF/cfi-register.s
+++ b/test/MC/ELF/cfi-register.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410906 00000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 00410906 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-rel-offset.s b/test/MC/ELF/cfi-rel-offset.s
index 82bbd8d6ce..35a73efb0f 100644
--- a/test/MC/ELF/cfi-rel-offset.s
+++ b/test/MC/ELF/cfi-rel-offset.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -14,36 +14,43 @@ f:
.cfi_rel_offset 6,0
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000040)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 24000000 1c000000 00000000 05000000 00410e08 410d0641 11067f41 0e104186 02000000 00000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x00000000000003a0)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 64
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 24000000 1C000000
+// CHECK-NEXT: 0020: 00000000 05000000 00410E08 410D0641
+// CHECK-NEXT: 0030: 11067F41 0E104186 02000000 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x3A0
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-rel-offset2.s b/test/MC/ELF/cfi-rel-offset2.s
index 7726adbe38..5817d1f4af 100644
--- a/test/MC/ELF/cfi-rel-offset2.s
+++ b/test/MC/ELF/cfi-rel-offset2.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -6,36 +6,42 @@ f:
.cfi_rel_offset 6,16
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 01000000 00411106 7f000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 01000000 00411106 7F000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-remember.s b/test/MC/ELF/cfi-remember.s
index 1717662c10..932a1828eb 100644
--- a/test/MC/ELF/cfi-remember.s
+++ b/test/MC/ELF/cfi-remember.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -9,37 +9,42 @@ f:
nop
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 03000000 00410a41 0b000000')
-// CHECK-NEXT: ),
-
-// CHECK: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 03000000 00410A41 0B000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-restore.s b/test/MC/ELF/cfi-restore.s
index 0fc3129c71..6c25d5b471 100644
--- a/test/MC/ELF/cfi-restore.s
+++ b/test/MC/ELF/cfi-restore.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 0041c600 00000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 0041C600 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-same-value.s b/test/MC/ELF/cfi-same-value.s
index 4c80a0a066..075c6b9b84 100644
--- a/test/MC/ELF/cfi-same-value.s
+++ b/test/MC/ELF/cfi-same-value.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -7,36 +7,42 @@ f:
nop
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410806 00000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 00410806 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-sections.s b/test/MC/ELF/cfi-sections.s
index b256bbf4cd..15a79e5c05 100644
--- a/test/MC/ELF/cfi-sections.s
+++ b/test/MC/ELF/cfi-sections.s
@@ -1,5 +1,5 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s
-// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_64 %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_32 %s
.cfi_sections .debug_frame
@@ -13,26 +13,43 @@ f2:
nop
.cfi_endproc
-// ELF_64: (('sh_name', 0x00000011) # '.debug_frame'
-// ELF_64-NEXT: ('sh_type', 0x00000001)
-// ELF_64-NEXT: ('sh_flags', 0x0000000000000000)
-// ELF_64-NEXT: ('sh_addr', 0x0000000000000000)
-// ELF_64-NEXT: ('sh_offset', 0x0000000000000048)
-// ELF_64-NEXT: ('sh_size', 0x0000000000000048)
-// ELF_64-NEXT: ('sh_link', 0x00000000)
-// ELF_64-NEXT: ('sh_info', 0x00000000)
-// ELF_64-NEXT: ('sh_addralign', 0x0000000000000008)
-// ELF_64-NEXT: ('sh_entsize', 0x0000000000000000)
-// ELF_64-NEXT: ('_section_data', '14000000 ffffffff 01000178 100c0708 90010000 00000000 14000000 00000000 00000000 00000000 01000000 00000000 14000000 00000000 00000000 00000000 01000000 00000000')
+// ELF_64: Section {
+// ELF_64: Name: .debug_frame
+// ELF_64-NEXT: Type: SHT_PROGBITS
+// ELF_64-NEXT: Flags [
+// ELF_64-NEXT: ]
+// ELF_64-NEXT: Address: 0x0
+// ELF_64-NEXT: Offset: 0x48
+// ELF_64-NEXT: Size: 72
+// ELF_64-NEXT: Link: 0
+// ELF_64-NEXT: Info: 0
+// ELF_64-NEXT: AddressAlignment: 8
+// ELF_64-NEXT: EntrySize: 0
+// ELF_64-NEXT: SectionData (
+// ELF_64-NEXT: 0000: 14000000 FFFFFFFF 01000178 100C0708
+// ELF_64-NEXT: 0010: 90010000 00000000 14000000 00000000
+// ELF_64-NEXT: 0020: 00000000 00000000 01000000 00000000
+// ELF_64-NEXT: 0030: 14000000 00000000 00000000 00000000
+// ELF_64-NEXT: 0040: 01000000 00000000
+// ELF_64-NEXT: )
+// ELF_64-NEXT: }
-// ELF_32: (('sh_name', 0x00000010) # '.debug_frame'
-// ELF_32-NEXT: ('sh_type', 0x00000001)
-// ELF_32-NEXT: ('sh_flags', 0x00000000)
-// ELF_32-NEXT: ('sh_addr', 0x00000000)
-// ELF_32-NEXT: ('sh_offset', 0x00000038)
-// ELF_32-NEXT: ('sh_size', 0x00000034)
-// ELF_32-NEXT: ('sh_link', 0x00000000)
-// ELF_32-NEXT: ('sh_info', 0x00000000)
-// ELF_32-NEXT: ('sh_addralign', 0x00000004)
-// ELF_32-NEXT: ('sh_entsize', 0x00000000)
-// ELF_32-NEXT: ('_section_data', '10000000 ffffffff 0100017c 080c0404 88010000 0c000000 00000000 00000000 01000000 0c000000 00000000 01000000 01000000')
+// ELF_32: Section {
+// ELF_32: Name: .debug_frame
+// ELF_32-NEXT: Type: SHT_PROGBITS
+// ELF_32-NEXT: Flags [
+// ELF_32-NEXT: ]
+// ELF_32-NEXT: Address: 0x0
+// ELF_32-NEXT: Offset: 0x38
+// ELF_32-NEXT: Size: 52
+// ELF_32-NEXT: Link: 0
+// ELF_32-NEXT: Info: 0
+// ELF_32-NEXT: AddressAlignment: 4
+// ELF_32-NEXT: EntrySize: 0
+// ELF_32-NEXT: SectionData (
+// ELF_32-NEXT: 0000: 10000000 FFFFFFFF 0100017C 080C0404
+// ELF_32-NEXT: 0010: 88010000 0C000000 00000000 00000000
+// ELF_32-NEXT: 0020: 01000000 0C000000 00000000 01000000
+// ELF_32-NEXT: 0030: 01000000
+// ELF_32-NEXT: )
+// ELF_32-NEXT: }
diff --git a/test/MC/ELF/cfi-signal-frame.s b/test/MC/ELF/cfi-signal-frame.s
index cf6d16073a..0233119621 100644
--- a/test/MC/ELF/cfi-signal-frame.s
+++ b/test/MC/ELF/cfi-signal-frame.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
f:
.cfi_startproc
@@ -9,15 +9,25 @@ g:
.cfi_startproc
.cfi_endproc
-// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000058)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5253 00017810 011b0c07 08900100 10000000 1c000000 00000000 00000000 00000000 14000000 00000000 017a5200 01781001 1b0c0708 90010000 10000000 1c000000 00000000 00000000 00000000')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 88
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5253 00017810
+// CHECK-NEXT: 0010: 011B0C07 08900100 10000000 1C000000
+// CHECK-NEXT: 0020: 00000000 00000000 00000000 14000000
+// CHECK-NEXT: 0030: 00000000 017A5200 01781001 1B0C0708
+// CHECK-NEXT: 0040: 90010000 10000000 1C000000 00000000
+// CHECK-NEXT: 0050: 00000000 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/cfi-undefined.s b/test/MC/ELF/cfi-undefined.s
index 28049faec2..c83b47c142 100644
--- a/test/MC/ELF/cfi-undefined.s
+++ b/test/MC/ELF/cfi-undefined.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f:
.cfi_startproc
@@ -6,36 +6,43 @@ f:
.cfi_undefined %rbp
nop
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410706 00000000')
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000390)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 02000000 00410706 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x390
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/cfi-zero-addr-delta.s b/test/MC/ELF/cfi-zero-addr-delta.s
index 9e818e6948..4ac0e34f10 100644
--- a/test/MC/ELF/cfi-zero-addr-delta.s
+++ b/test/MC/ELF/cfi-zero-addr-delta.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
// Test that we don't produce a DW_CFA_advance_loc 0
@@ -14,35 +14,41 @@ f:
nop
.cfi_endproc
-// CHECK: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000048)
-// CHECK-NEXT: ('sh_size', 0x0000000000000038)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 1c000000 1c000000 00000000 04000000 00410e10 410a0e08 410b0000 00000000')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x48
+// CHECK-NEXT: Size: 56
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A5200 01781001
+// CHECK-NEXT: 0010: 1B0C0708 90010000 1C000000 1C000000
+// CHECK-NEXT: 0020: 00000000 04000000 00410E10 410A0E08
+// CHECK-NEXT: 0030: 410B0000 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
-// CHECK: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000398)
-// CHECK-NEXT: ('sh_size', 0x0000000000000018)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x398
+// CHECK-NEXT: Size: 24
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/cfi.s b/test/MC/ELF/cfi.s
index 9320894226..98f4fa9c62 100644
--- a/test/MC/ELF/cfi.s
+++ b/test/MC/ELF/cfi.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -sd | FileCheck %s
f1:
.cfi_startproc
@@ -212,463 +212,220 @@ f36:
nop
.cfi_endproc
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000068)
-// CHECK-NEXT: ('sh_size', 0x00000000000006c8)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '14000000 00000000 017a4c52 00017810 02031b0c 07089001 14000000 1c000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000003 1b0c0708 90010000 14000000 28000000 00000000 01000000 04000000 00000000 14000000 70000000 00000000 01000000 04000000 00000000 20000000 00000000 017a504c 52000178 100b0000 00000000 00000002 1b0c0708 90010000 10000000 28000000 00000000 01000000 02000000 18000000 00000000 017a5052 00017810 04020000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06030000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a040000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 040a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 060b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a0c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a080000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a100000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04120000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06130000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a140000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 041a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 061b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a1c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a180000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a800000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04820000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06830000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a840000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 048a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 068b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a8c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a880000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a900000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 04920000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 06930000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a940000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 049a0000 1b0c0708 90010000 10000000 20000000 00000000 01000000 00000000 18000000 00000000 017a5052 00017810 069b0000 00001b0c 07089001 10000000 20000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a9c0000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000 1c000000 00000000 017a5052 00017810 0a980000 00000000 00001b0c 07089001 10000000 24000000 00000000 01000000 00000000')
-// CHECK-NEXT: ),
-
-// CHECK: # Section 5
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.rela.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000e30)
-// CHECK-NEXT: ('sh_size', 0x00000000000006c0)
-// CHECK-NEXT: ('sh_link', 0x00000007)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000020)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x0000000000000029)
-// CHECK-NEXT: ('r_sym', 0x00000028)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 2
-// CHECK-NEXT: (('r_offset', 0x0000000000000043)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 3
-// CHECK-NEXT: (('r_offset', 0x000000000000005c)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000001)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 4
-// CHECK-NEXT: (('r_offset', 0x0000000000000065)
-// CHECK-NEXT: ('r_sym', 0x00000028)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 5
-// CHECK-NEXT: (('r_offset', 0x0000000000000074)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000002)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 6
-// CHECK-NEXT: (('r_offset', 0x000000000000007d)
-// CHECK-NEXT: ('r_sym', 0x00000028)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 7
-// CHECK-NEXT: (('r_offset', 0x0000000000000097)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 8
-// CHECK-NEXT: (('r_offset', 0x00000000000000b0)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000003)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 9
-// CHECK-NEXT: (('r_offset', 0x00000000000000b9)
-// CHECK-NEXT: ('r_sym', 0x00000028)
-// CHECK-NEXT: ('r_type', 0x0000000c)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 10
-// CHECK-NEXT: (('r_offset', 0x00000000000000ce)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000c)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 11
-// CHECK-NEXT: (('r_offset', 0x00000000000000e0)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000004)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 12
-// CHECK-NEXT: (('r_offset', 0x00000000000000fe)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 13
-// CHECK-NEXT: (('r_offset', 0x0000000000000110)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000005)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 14
-// CHECK-NEXT: (('r_offset', 0x000000000000012e)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 15
-// CHECK-NEXT: (('r_offset', 0x0000000000000144)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000006)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 16
-// CHECK-NEXT: (('r_offset', 0x0000000000000162)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000c)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 17
-// CHECK-NEXT: (('r_offset', 0x0000000000000174)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000007)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 18
-// CHECK-NEXT: (('r_offset', 0x0000000000000192)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 19
-// CHECK-NEXT: (('r_offset', 0x00000000000001a4)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000008)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 20
-// CHECK-NEXT: (('r_offset', 0x00000000000001c2)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 21
-// CHECK-NEXT: (('r_offset', 0x00000000000001d8)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000009)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 22
-// CHECK-NEXT: (('r_offset', 0x00000000000001f6)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 23
-// CHECK-NEXT: (('r_offset', 0x000000000000020c)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000000a)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 24
-// CHECK-NEXT: (('r_offset', 0x000000000000022a)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 25
-// CHECK-NEXT: (('r_offset', 0x0000000000000240)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000000b)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 26
-// CHECK-NEXT: (('r_offset', 0x000000000000025e)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000d)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 27
-// CHECK-NEXT: (('r_offset', 0x0000000000000270)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000000c)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 28
-// CHECK-NEXT: (('r_offset', 0x000000000000028e)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 29
-// CHECK-NEXT: (('r_offset', 0x00000000000002a0)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000000d)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 30
-// CHECK-NEXT: (('r_offset', 0x00000000000002be)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 31
-// CHECK-NEXT: (('r_offset', 0x00000000000002d4)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000000e)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 32
-// CHECK-NEXT: (('r_offset', 0x00000000000002f2)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000d)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 33
-// CHECK-NEXT: (('r_offset', 0x0000000000000304)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000000f)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 34
-// CHECK-NEXT: (('r_offset', 0x0000000000000322)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 35
-// CHECK-NEXT: (('r_offset', 0x0000000000000334)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000010)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 36
-// CHECK-NEXT: (('r_offset', 0x0000000000000352)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 37
-// CHECK-NEXT: (('r_offset', 0x0000000000000368)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000011)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 38
-// CHECK-NEXT: (('r_offset', 0x0000000000000386)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 39
-// CHECK-NEXT: (('r_offset', 0x000000000000039c)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000012)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 40
-// CHECK-NEXT: (('r_offset', 0x00000000000003ba)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 41
-// CHECK-NEXT: (('r_offset', 0x00000000000003d0)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000013)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 42
-// CHECK-NEXT: (('r_offset', 0x00000000000003ee)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000c)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 43
-// CHECK-NEXT: (('r_offset', 0x0000000000000400)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000014)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 44
-// CHECK-NEXT: (('r_offset', 0x000000000000041e)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 45
-// CHECK-NEXT: (('r_offset', 0x0000000000000430)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000015)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 46
-// CHECK-NEXT: (('r_offset', 0x000000000000044e)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 47
-// CHECK-NEXT: (('r_offset', 0x0000000000000464)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000016)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 48
-// CHECK-NEXT: (('r_offset', 0x0000000000000482)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000c)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 49
-// CHECK-NEXT: (('r_offset', 0x0000000000000494)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000017)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 50
-// CHECK-NEXT: (('r_offset', 0x00000000000004b2)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 51
-// CHECK-NEXT: (('r_offset', 0x00000000000004c4)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000018)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 52
-// CHECK-NEXT: (('r_offset', 0x00000000000004e2)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 53
-// CHECK-NEXT: (('r_offset', 0x00000000000004f8)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000019)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 54
-// CHECK-NEXT: (('r_offset', 0x0000000000000516)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 55
-// CHECK-NEXT: (('r_offset', 0x000000000000052c)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000001a)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 56
-// CHECK-NEXT: (('r_offset', 0x000000000000054a)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 57
-// CHECK-NEXT: (('r_offset', 0x0000000000000560)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000001b)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 58
-// CHECK-NEXT: (('r_offset', 0x000000000000057e)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000d)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 59
-// CHECK-NEXT: (('r_offset', 0x0000000000000590)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000001c)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 60
-// CHECK-NEXT: (('r_offset', 0x00000000000005ae)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 61
-// CHECK-NEXT: (('r_offset', 0x00000000000005c0)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000001d)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 62
-// CHECK-NEXT: (('r_offset', 0x00000000000005de)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 63
-// CHECK-NEXT: (('r_offset', 0x00000000000005f4)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000001e)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 64
-// CHECK-NEXT: (('r_offset', 0x0000000000000612)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x0000000d)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 65
-// CHECK-NEXT: (('r_offset', 0x0000000000000624)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000001f)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 66
-// CHECK-NEXT: (('r_offset', 0x0000000000000642)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 67
-// CHECK-NEXT: (('r_offset', 0x0000000000000654)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000020)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 68
-// CHECK-NEXT: (('r_offset', 0x0000000000000672)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 69
-// CHECK-NEXT: (('r_offset', 0x0000000000000688)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000021)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 70
-// CHECK-NEXT: (('r_offset', 0x00000000000006a6)
-// CHECK-NEXT: ('r_sym', 0x00000029)
-// CHECK-NEXT: ('r_type', 0x00000018)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 71
-// CHECK-NEXT: (('r_offset', 0x00000000000006bc)
-// CHECK-NEXT: ('r_sym', 0x00000024)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000022)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x68
+// CHECK-NEXT: Size: 1736
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x20 R_X86_64_PC32 .text 0x0
+// CHECK-NEXT: 0x29 R_X86_64_32 bar 0x0
+// CHECK-NEXT: 0x43 R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x5C R_X86_64_PC32 .text 0x1
+// CHECK-NEXT: 0x65 R_X86_64_32 bar 0x0
+// CHECK-NEXT: 0x74 R_X86_64_PC32 .text 0x2
+// CHECK-NEXT: 0x7D R_X86_64_32 bar 0x0
+// CHECK-NEXT: 0x97 R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0xB0 R_X86_64_PC32 .text 0x3
+// CHECK-NEXT: 0xB9 R_X86_64_16 bar 0x0
+// CHECK-NEXT: 0xCE R_X86_64_16 foo 0x0
+// CHECK-NEXT: 0xE0 R_X86_64_PC32 .text 0x4
+// CHECK-NEXT: 0xFE R_X86_64_32 foo 0x0
+// CHECK-NEXT: 0x110 R_X86_64_PC32 .text 0x5
+// CHECK-NEXT: 0x12E R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x144 R_X86_64_PC32 .text 0x6
+// CHECK-NEXT: 0x162 R_X86_64_16 foo 0x0
+// CHECK-NEXT: 0x174 R_X86_64_PC32 .text 0x7
+// CHECK-NEXT: 0x192 R_X86_64_32 foo 0x0
+// CHECK-NEXT: 0x1A4 R_X86_64_PC32 .text 0x8
+// CHECK-NEXT: 0x1C2 R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x1D8 R_X86_64_PC32 .text 0x9
+// CHECK-NEXT: 0x1F6 R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x20C R_X86_64_PC32 .text 0xA
+// CHECK-NEXT: 0x22A R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x240 R_X86_64_PC32 .text 0xB
+// CHECK-NEXT: 0x25E R_X86_64_PC16 foo 0x0
+// CHECK-NEXT: 0x270 R_X86_64_PC32 .text 0xC
+// CHECK-NEXT: 0x28E R_X86_64_PC32 foo 0x0
+// CHECK-NEXT: 0x2A0 R_X86_64_PC32 .text 0xD
+// CHECK-NEXT: 0x2BE R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x2D4 R_X86_64_PC32 .text 0xE
+// CHECK-NEXT: 0x2F2 R_X86_64_PC16 foo 0x0
+// CHECK-NEXT: 0x304 R_X86_64_PC32 .text 0xF
+// CHECK-NEXT: 0x322 R_X86_64_PC32 foo 0x0
+// CHECK-NEXT: 0x334 R_X86_64_PC32 .text 0x10
+// CHECK-NEXT: 0x352 R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x368 R_X86_64_PC32 .text 0x11
+// CHECK-NEXT: 0x386 R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x39C R_X86_64_PC32 .text 0x12
+// CHECK-NEXT: 0x3BA R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x3D0 R_X86_64_PC32 .text 0x13
+// CHECK-NEXT: 0x3EE R_X86_64_16 foo 0x0
+// CHECK-NEXT: 0x400 R_X86_64_PC32 .text 0x14
+// CHECK-NEXT: 0x41E R_X86_64_32 foo 0x0
+// CHECK-NEXT: 0x430 R_X86_64_PC32 .text 0x15
+// CHECK-NEXT: 0x44E R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x464 R_X86_64_PC32 .text 0x16
+// CHECK-NEXT: 0x482 R_X86_64_16 foo 0x0
+// CHECK-NEXT: 0x494 R_X86_64_PC32 .text 0x17
+// CHECK-NEXT: 0x4B2 R_X86_64_32 foo 0x0
+// CHECK-NEXT: 0x4C4 R_X86_64_PC32 .text 0x18
+// CHECK-NEXT: 0x4E2 R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x4F8 R_X86_64_PC32 .text 0x19
+// CHECK-NEXT: 0x516 R_X86_64_64 foo 0x0
+// CHECK-NEXT: 0x52C R_X86_64_PC32 .text 0x1A
+// CHECK-NEXT: 0x54A R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x560 R_X86_64_PC32 .text 0x1B
+// CHECK-NEXT: 0x57E R_X86_64_PC16 foo 0x0
+// CHECK-NEXT: 0x590 R_X86_64_PC32 .text 0x1C
+// CHECK-NEXT: 0x5AE R_X86_64_PC32 foo 0x0
+// CHECK-NEXT: 0x5C0 R_X86_64_PC32 .text 0x1D
+// CHECK-NEXT: 0x5DE R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x5F4 R_X86_64_PC32 .text 0x1E
+// CHECK-NEXT: 0x612 R_X86_64_PC16 foo 0x0
+// CHECK-NEXT: 0x624 R_X86_64_PC32 .text 0x1F
+// CHECK-NEXT: 0x642 R_X86_64_PC32 foo 0x0
+// CHECK-NEXT: 0x654 R_X86_64_PC32 .text 0x20
+// CHECK-NEXT: 0x672 R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x688 R_X86_64_PC32 .text 0x21
+// CHECK-NEXT: 0x6A6 R_X86_64_PC64 foo 0x0
+// CHECK-NEXT: 0x6BC R_X86_64_PC32 .text 0x22
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 14000000 00000000 017A4C52 00017810
+// CHECK-NEXT: 0010: 02031B0C 07089001 14000000 1C000000
+// CHECK-NEXT: 0020: 00000000 01000000 04000000 00000000
+// CHECK-NEXT: 0030: 20000000 00000000 017A504C 52000178
+// CHECK-NEXT: 0040: 100B0000 00000000 00000003 1B0C0708
+// CHECK-NEXT: 0050: 90010000 14000000 28000000 00000000
+// CHECK-NEXT: 0060: 01000000 04000000 00000000 14000000
+// CHECK-NEXT: 0070: 70000000 00000000 01000000 04000000
+// CHECK-NEXT: 0080: 00000000 20000000 00000000 017A504C
+// CHECK-NEXT: 0090: 52000178 100B0000 00000000 00000002
+// CHECK-NEXT: 00A0: 1B0C0708 90010000 10000000 28000000
+// CHECK-NEXT: 00B0: 00000000 01000000 02000000 18000000
+// CHECK-NEXT: 00C0: 00000000 017A5052 00017810 04020000
+// CHECK-NEXT: 00D0: 1B0C0708 90010000 10000000 20000000
+// CHECK-NEXT: 00E0: 00000000 01000000 00000000 18000000
+// CHECK-NEXT: 00F0: 00000000 017A5052 00017810 06030000
+// CHECK-NEXT: 0100: 00001B0C 07089001 10000000 20000000
+// CHECK-NEXT: 0110: 00000000 01000000 00000000 1C000000
+// CHECK-NEXT: 0120: 00000000 017A5052 00017810 0A040000
+// CHECK-NEXT: 0130: 00000000 00001B0C 07089001 10000000
+// CHECK-NEXT: 0140: 24000000 00000000 01000000 00000000
+// CHECK-NEXT: 0150: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0160: 040A0000 1B0C0708 90010000 10000000
+// CHECK-NEXT: 0170: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 0180: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0190: 060B0000 00001B0C 07089001 10000000
+// CHECK-NEXT: 01A0: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 01B0: 1C000000 00000000 017A5052 00017810
+// CHECK-NEXT: 01C0: 0A0C0000 00000000 00001B0C 07089001
+// CHECK-NEXT: 01D0: 10000000 24000000 00000000 01000000
+// CHECK-NEXT: 01E0: 00000000 1C000000 00000000 017A5052
+// CHECK-NEXT: 01F0: 00017810 0A080000 00000000 00001B0C
+// CHECK-NEXT: 0200: 07089001 10000000 24000000 00000000
+// CHECK-NEXT: 0210: 01000000 00000000 1C000000 00000000
+// CHECK-NEXT: 0220: 017A5052 00017810 0A100000 00000000
+// CHECK-NEXT: 0230: 00001B0C 07089001 10000000 24000000
+// CHECK-NEXT: 0240: 00000000 01000000 00000000 18000000
+// CHECK-NEXT: 0250: 00000000 017A5052 00017810 04120000
+// CHECK-NEXT: 0260: 1B0C0708 90010000 10000000 20000000
+// CHECK-NEXT: 0270: 00000000 01000000 00000000 18000000
+// CHECK-NEXT: 0280: 00000000 017A5052 00017810 06130000
+// CHECK-NEXT: 0290: 00001B0C 07089001 10000000 20000000
+// CHECK-NEXT: 02A0: 00000000 01000000 00000000 1C000000
+// CHECK-NEXT: 02B0: 00000000 017A5052 00017810 0A140000
+// CHECK-NEXT: 02C0: 00000000 00001B0C 07089001 10000000
+// CHECK-NEXT: 02D0: 24000000 00000000 01000000 00000000
+// CHECK-NEXT: 02E0: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 02F0: 041A0000 1B0C0708 90010000 10000000
+// CHECK-NEXT: 0300: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 0310: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0320: 061B0000 00001B0C 07089001 10000000
+// CHECK-NEXT: 0330: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 0340: 1C000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0350: 0A1C0000 00000000 00001B0C 07089001
+// CHECK-NEXT: 0360: 10000000 24000000 00000000 01000000
+// CHECK-NEXT: 0370: 00000000 1C000000 00000000 017A5052
+// CHECK-NEXT: 0380: 00017810 0A180000 00000000 00001B0C
+// CHECK-NEXT: 0390: 07089001 10000000 24000000 00000000
+// CHECK-NEXT: 03A0: 01000000 00000000 1C000000 00000000
+// CHECK-NEXT: 03B0: 017A5052 00017810 0A800000 00000000
+// CHECK-NEXT: 03C0: 00001B0C 07089001 10000000 24000000
+// CHECK-NEXT: 03D0: 00000000 01000000 00000000 18000000
+// CHECK-NEXT: 03E0: 00000000 017A5052 00017810 04820000
+// CHECK-NEXT: 03F0: 1B0C0708 90010000 10000000 20000000
+// CHECK-NEXT: 0400: 00000000 01000000 00000000 18000000
+// CHECK-NEXT: 0410: 00000000 017A5052 00017810 06830000
+// CHECK-NEXT: 0420: 00001B0C 07089001 10000000 20000000
+// CHECK-NEXT: 0430: 00000000 01000000 00000000 1C000000
+// CHECK-NEXT: 0440: 00000000 017A5052 00017810 0A840000
+// CHECK-NEXT: 0450: 00000000 00001B0C 07089001 10000000
+// CHECK-NEXT: 0460: 24000000 00000000 01000000 00000000
+// CHECK-NEXT: 0470: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0480: 048A0000 1B0C0708 90010000 10000000
+// CHECK-NEXT: 0490: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 04A0: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 04B0: 068B0000 00001B0C 07089001 10000000
+// CHECK-NEXT: 04C0: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 04D0: 1C000000 00000000 017A5052 00017810
+// CHECK-NEXT: 04E0: 0A8C0000 00000000 00001B0C 07089001
+// CHECK-NEXT: 04F0: 10000000 24000000 00000000 01000000
+// CHECK-NEXT: 0500: 00000000 1C000000 00000000 017A5052
+// CHECK-NEXT: 0510: 00017810 0A880000 00000000 00001B0C
+// CHECK-NEXT: 0520: 07089001 10000000 24000000 00000000
+// CHECK-NEXT: 0530: 01000000 00000000 1C000000 00000000
+// CHECK-NEXT: 0540: 017A5052 00017810 0A900000 00000000
+// CHECK-NEXT: 0550: 00001B0C 07089001 10000000 24000000
+// CHECK-NEXT: 0560: 00000000 01000000 00000000 18000000
+// CHECK-NEXT: 0570: 00000000 017A5052 00017810 04920000
+// CHECK-NEXT: 0580: 1B0C0708 90010000 10000000 20000000
+// CHECK-NEXT: 0590: 00000000 01000000 00000000 18000000
+// CHECK-NEXT: 05A0: 00000000 017A5052 00017810 06930000
+// CHECK-NEXT: 05B0: 00001B0C 07089001 10000000 20000000
+// CHECK-NEXT: 05C0: 00000000 01000000 00000000 1C000000
+// CHECK-NEXT: 05D0: 00000000 017A5052 00017810 0A940000
+// CHECK-NEXT: 05E0: 00000000 00001B0C 07089001 10000000
+// CHECK-NEXT: 05F0: 24000000 00000000 01000000 00000000
+// CHECK-NEXT: 0600: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0610: 049A0000 1B0C0708 90010000 10000000
+// CHECK-NEXT: 0620: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 0630: 18000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0640: 069B0000 00001B0C 07089001 10000000
+// CHECK-NEXT: 0650: 20000000 00000000 01000000 00000000
+// CHECK-NEXT: 0660: 1C000000 00000000 017A5052 00017810
+// CHECK-NEXT: 0670: 0A9C0000 00000000 00001B0C 07089001
+// CHECK-NEXT: 0680: 10000000 24000000 00000000 01000000
+// CHECK-NEXT: 0690: 00000000 1C000000 00000000 017A5052
+// CHECK-NEXT: 06A0: 00017810 0A980000 00000000 00001B0C
+// CHECK-NEXT: 06B0: 07089001 10000000 24000000 00000000
+// CHECK-NEXT: 06C0: 01000000 00000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+
+// CHECK: Section {
+// CHECK: Index: 5
+// CHECK-NEXT: Name: .rela.eh_frame
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0xE30
+// CHECK-NEXT: Size: 1728
+// CHECK-NEXT: Link: 7
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK: }
diff --git a/test/MC/ELF/comdat.s b/test/MC/ELF/comdat.s
index d7acea6778..f9469dfae2 100644
--- a/test/MC/ELF/comdat.s
+++ b/test/MC/ELF/comdat.s
@@ -1,75 +1,81 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s
// Test that we produce the group sections and that they are a the beginning
// of the file.
-// CHECK: # Section 1
-// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group'
-// CHECK-NEXT: ('sh_type', 0x00000011)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x000000000000000c)
-// CHECK-NEXT: ('sh_link', 0x0000000d)
-// CHECK-NEXT: ('sh_info', 0x00000001)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000004)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 2
-// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group'
-// CHECK-NEXT: ('sh_type', 0x00000011)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x000000000000004c)
-// CHECK-NEXT: ('sh_size', 0x0000000000000008)
-// CHECK-NEXT: ('sh_link', 0x0000000d)
-// CHECK-NEXT: ('sh_info', 0x00000002)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000004)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 3
-// CHECK-NEXT: (('sh_name', 0x0000001b) # '.group'
-// CHECK-NEXT: ('sh_type', 0x00000011)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000054)
-// CHECK-NEXT: ('sh_size', 0x0000000000000008)
-// CHECK-NEXT: ('sh_link', 0x0000000d)
-// CHECK-NEXT: ('sh_info', 0x0000000d)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000004)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK-NEXT: Name: .group
+// CHECK-NEXT: Type: SHT_GROUP
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 12
+// CHECK-NEXT: Link: 13
+// CHECK-NEXT: Info: 1
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 4
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 2
+// CHECK-NEXT: Name: .group
+// CHECK-NEXT: Type: SHT_GROUP
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x4C
+// CHECK-NEXT: Size: 8
+// CHECK-NEXT: Link: 13
+// CHECK-NEXT: Info: 2
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 4
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 3
+// CHECK-NEXT: Name: .group
+// CHECK-NEXT: Type: SHT_GROUP
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x54
+// CHECK-NEXT: Size: 8
+// CHECK-NEXT: Link: 13
+// CHECK-NEXT: Info: 13
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 4
+// CHECK-NEXT: }
// Test that g1 and g2 are local, but g3 is an undefined global.
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000001) # 'g1'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0007)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000004) # 'g2'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0002)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: g1 (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .foo (0x7)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: g2 (4)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .group (0x2)
+// CHECK-NEXT: }
-// CHECK: # Symbol 13
-// CHECK-NEXT: (('st_name', 0x00000007) # 'g3'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: g3 (7)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
.section .foo,"axG",@progbits,g1,comdat
diff --git a/test/MC/ELF/common.s b/test/MC/ELF/common.s
index 046306e3d3..4fc2154d85 100644
--- a/test/MC/ELF/common.s
+++ b/test/MC/ELF/common.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
.text
@@ -8,13 +8,15 @@
.local common1
.comm common1,1,1
-// CHECK: ('st_name', 0x00000001) # 'common1'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx',
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000001)
+// CHECK: Symbol {
+// CHECK: Name: common1 (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 1
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section:
+// CHECK-NEXT: }
// Same as common1, but with directives in a different order.
@@ -22,38 +24,44 @@
.type common2,@object
.comm common2,1,1
-// CHECK: ('st_name', 0x00000009) # 'common2'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx',
-// CHECK-NEXT: ('st_value', 0x0000000000000001)
-// CHECK-NEXT: ('st_size', 0x0000000000000001)
+// CHECK: Symbol {
+// CHECK: Name: common2 (9)
+// CHECK-NEXT: Value: 0x1
+// CHECK-NEXT: Size: 1
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section:
+// CHECK-NEXT: }
+
.local common6
.comm common6,8,16
-// CHECK: # Symbol 3
-// CHECK-NEXT: (('st_name', 0x00000011) # 'common6'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0004)
-// CHECK-NEXT: ('st_value', 0x0000000000000010)
-// CHECK-NEXT: ('st_size', 0x0000000000000008)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: common6 (17)
+// CHECK-NEXT: Value: 0x10
+// CHECK-NEXT: Size: 8
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .bss (0x4)
+// CHECK-NEXT: }
+
// Test that without an explicit .local we produce a global.
.type common3,@object
.comm common3,4,4
-// CHECK: ('st_name', 0x00000019) # 'common3'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0xfff2)
-// CHECK-NEXT: ('st_value', 0x0000000000000004)
-// CHECK-NEXT: ('st_size', 0x0000000000000004)
+// CHECK: Symbol {
+// CHECK: Name: common3 (25)
+// CHECK-NEXT: Value: 0x4
+// CHECK-NEXT: Size: 4
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0xFFF2)
+// CHECK-NEXT: }
// Test that without an explicit .local we produce a global, even if the first
@@ -67,22 +75,25 @@ foo:
.type common4,@object
.comm common4,40,16
-// CHECK: ('st_name', 0x00000025) # 'common4'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0xfff2)
-// CHECK-NEXT: ('st_value', 0x0000000000000010)
-// CHECK-NEXT: ('st_size', 0x0000000000000028)
+// CHECK: Symbol {
+// CHECK: Name: common4 (37)
+// CHECK-NEXT: Value: 0x10
+// CHECK-NEXT: Size: 40
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0xFFF2)
+// CHECK-NEXT: }
+
.comm common5,4,4
-// CHECK: # Symbol 9
-// CHECK-NEXT: (('st_name', 0x0000002d) # 'common5'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0xfff2)
-// CHECK-NEXT: ('st_value', 0x0000000000000004)
-// CHECK-NEXT: ('st_size', 0x0000000000000004)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: common5 (45)
+// CHECK-NEXT: Value: 0x4
+// CHECK-NEXT: Size: 4
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0xFFF2)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/common2.s b/test/MC/ELF/common2.s
index b13577d4a0..526ebc2a95 100644
--- a/test/MC/ELF/common2.s
+++ b/test/MC/ELF/common2.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the common symbols are placed at the end of .bss. In this example
// it causes .bss to have size 9 instead of 8.
@@ -9,13 +9,16 @@
.zero 1
.align 8
-// CHECK: (('sh_name', 0x00000007) # '.bss'
-// CHECK-NEXT: ('sh_type',
-// CHECK-NEXT: ('sh_flags'
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x0000000000000009)
-// CHECK-NEXT: ('sh_link',
-// CHECK-NEXT: ('sh_info',
-// CHECK-NEXT: ('sh_addralign',
-// CHECK-NEXT: ('sh_entsize',
+// CHECK: Section {
+// CHECK: Name: .bss (7)
+// CHECK-NEXT: Type:
+// CHECK-NEXT: Flags [
+// CHECK: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 9
+// CHECK-NEXT: Link:
+// CHECK-NEXT: Info:
+// CHECK-NEXT: AddressAlignment:
+// CHECK-NEXT: EntrySize:
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/debug-line.s b/test/MC/ELF/debug-line.s
index fed816afcc..75e050e9da 100644
--- a/test/MC/ELF/debug-line.s
+++ b/test/MC/ELF/debug-line.s
@@ -1,18 +1,26 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// Test that .debug_line is populated.
-// CHECK: (('sh_name', 0x00000011) # '.debug_line'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
-// CHECK-NEXT: ('sh_size', 0x0000000000000037)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '33000000 02001c00 00000101 fb0e0d00 01010101 00000001 00000100 666f6f2e 63000000 00000009 02000000 00000000 00150204 000101')
+// CHECK: Section {
+// CHECK: Name: .debug_line
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x44
+// CHECK-NEXT: Size: 55
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 33000000 02001C00 00000101 FB0E0D00
+// CHECK-NEXT: 0010: 01010101 00000001 00000100 666F6F2E
+// CHECK-NEXT: 0020: 63000000 00000009 02000000 00000000
+// CHECK-NEXT: 0030: 00150204 000101
+// CHECK-NEXT: )
+// CHECK-NEXT: }
.section .debug_line,"",@progbits
.text
diff --git a/test/MC/ELF/debug-loc.s b/test/MC/ELF/debug-loc.s
index 3eb3797f44..b24fa169de 100644
--- a/test/MC/ELF/debug-loc.s
+++ b/test/MC/ELF/debug-loc.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that we don't regress on the size of the line info section. We used
// to handle negative line diffs incorrectly which manifested as very
@@ -7,18 +7,20 @@
// FIXME: This size is the same as gnu as, but we can probably do a bit better.
// FIXME2: We need a debug_line dumper so that we can test the actual contents.
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x00000011) # '.debug_line'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
-// CHECK-NEXT: ('sh_size', 0x000000000000003d)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .debug_line
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x44
+// CHECK-NEXT: Size: 61
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
.section .debug_line,"",@progbits
.text
diff --git a/test/MC/ELF/diff.s b/test/MC/ELF/diff.s
index 4214fc7c03..5436510669 100644
--- a/test/MC/ELF/diff.s
+++ b/test/MC/ELF/diff.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
.global zed
foo:
@@ -8,8 +8,4 @@ bar:
zed:
mov zed+(bar-foo), %eax
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000005)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend', 0x0000000000000001)
+// CHECK: 0x5 R_X86_64_32S zed 0x1
diff --git a/test/MC/ELF/empty-dwarf-lines.s b/test/MC/ELF/empty-dwarf-lines.s
index 7baedbcfb8..241580bb3b 100644
--- a/test/MC/ELF/empty-dwarf-lines.s
+++ b/test/MC/ELF/empty-dwarf-lines.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that the dwarf debug_line section contains no line directives.
@@ -7,15 +7,17 @@
c:
.asciz "hi\n"
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.debug_line'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
-// CHECK-NEXT: ('sh_size', 0x0000000000000027)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .debug_line
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x44
+// CHECK-NEXT: Size: 39
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/empty.s b/test/MC/ELF/empty.s
index b38a621054..c421fe8448 100644
--- a/test/MC/ELF/empty.s
+++ b/test/MC/ELF/empty.s
@@ -1,70 +1,89 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that like gnu as we create text, data and bss by default. Also test
// that shstrtab, symtab and strtab are listed in that order.
-// CHECK: ('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-
-// CHECK: ('sh_name', 0x00000026) # '.data'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-
-// CHECK: ('sh_name', 0x00000007) # '.bss'
-// CHECK-NEXT: ('sh_type', 0x00000008)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000003)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-
-// CHECK: ('sh_name', 0x0000000c) # '.shstrtab'
-// CHECK-NEXT: ('sh_type', 0x00000003)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x000000000000002c)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-
-// CHECK: ('sh_name', 0x0000001e) # '.symtab'
-// CHECK-NEXT: ('sh_type', 0x00000002)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x0000000000000060)
-// CHECK-NEXT: ('sh_link', 0x00000006)
-// CHECK-NEXT: ('sh_info', 0x00000004)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-
-// CHECK: ('sh_name', 0x00000016) # '.strtab'
-// CHECK-NEXT: ('sh_type', 0x00000003)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x0000000000000001)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Name: .data
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_WRITE
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Name: .bss
+// CHECK-NEXT: Type: SHT_NOBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_WRITE
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Name: .shstrtab
+// CHECK-NEXT: Type: SHT_STRTAB
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 44
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Name: .symtab
+// CHECK-NEXT: Type: SHT_SYMTAB
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 96
+// CHECK-NEXT: Link: 6
+// CHECK-NEXT: Info: 4
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Name: .strtab
+// CHECK-NEXT: Type: SHT_STRTAB
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 1
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/entsize.ll b/test/MC/ELF/entsize.ll
index dce6dbaa2a..2bf9fa9fb5 100644
--- a/test/MC/ELF/entsize.ll
+++ b/test/MC/ELF/entsize.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -mtriple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck -check-prefix=64 %s
+; RUN: llc -filetype=obj -mtriple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck -check-prefix=64 %s
; Test that constant mergeable strings have sh_entsize set.
@@ -20,25 +20,35 @@ declare void @foo(i64* nocapture) nounwind
;;;;;
-; 64: (('sh_name', 0x0000004e) # '.rodata.str1.1'
-; 64-NEXT: ('sh_type', 0x00000001)
-; 64-NEXT: ('sh_flags', 0x0000000000000032)
-; 64-NEXT: ('sh_addr',
-; 64-NEXT: ('sh_offset',
-; 64-NEXT: ('sh_size', 0x000000000000000d)
-; 64-NEXT: ('sh_link',
-; 64-NEXT: ('sh_info',
-; 64-NEXT: ('sh_addralign', 0x0000000000000001)
-; 64-NEXT: ('sh_entsize', 0x0000000000000001)
-
-; 64: (('sh_name', 0x00000041) # '.rodata.cst8'
-; 64-NEXT: ('sh_type', 0x00000001)
-; 64-NEXT: ('sh_flags', 0x0000000000000012)
-; 64-NEXT: ('sh_addr',
-; 64-NEXT: ('sh_offset',
-; 64-NEXT: ('sh_size', 0x0000000000000010)
-; 64-NEXT: ('sh_link',
-; 64-NEXT: ('sh_info',
-; 64-NEXT: ('sh_addralign', 0x0000000000000008)
-; 64-NEXT: ('sh_entsize', 0x0000000000000008)
-
+; 64: Section {
+; 64: Name: .rodata.str1.1
+; 64-NEXT: Type: SHT_PROGBITS
+; 64-NEXT: Flags [
+; 64-NEXT: SHF_ALLOC
+; 64-NEXT: SHF_MERGE
+; 64-NEXT: SHF_STRINGS
+; 64-NEXT: ]
+; 64-NEXT: Address:
+; 64-NEXT: Offset:
+; 64-NEXT: Size: 13
+; 64-NEXT: Link:
+; 64-NEXT: Info:
+; 64-NEXT: AddressAlignment: 1
+; 64-NEXT: EntrySize: 1
+; 64-NEXT: }
+
+; 64: Section {
+; 64: Name: .rodata.cst8
+; 64-NEXT: Type: SHT_PROGBITS
+; 64-NEXT: Flags [
+; 64-NEXT: SHF_ALLOC
+; 64-NEXT: SHF_MERGE
+; 64-NEXT: ]
+; 64-NEXT: Address:
+; 64-NEXT: Offset:
+; 64-NEXT: Size: 16
+; 64-NEXT: Link:
+; 64-NEXT: Info:
+; 64-NEXT: AddressAlignment: 8
+; 64-NEXT: EntrySize: 8
+; 64-NEXT: }
diff --git a/test/MC/ELF/entsize.s b/test/MC/ELF/entsize.s
index 4645686b6d..8e084e24b2 100644
--- a/test/MC/ELF/entsize.s
+++ b/test/MC/ELF/entsize.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that mergeable constants have sh_entsize set.
@@ -32,38 +32,53 @@
.quad 42
.quad 42
-// CHECK: # Section 4
-// CHECK-NEXT: ('sh_name', 0x00000048) # '.rodata.str1.1'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000032)
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x000000000000000d)
-// CHECK-NEXT: ('sh_link',
-// CHECK-NEXT: ('sh_info',
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000001)
-
-// CHECK: # Section 5
-// CHECK-NEXT: ('sh_name', 0x00000039) # '.rodata.str2.1'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000032)
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x0000000000000010)
-// CHECK-NEXT: ('sh_link',
-// CHECK-NEXT: ('sh_info',
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000002)
-
-// CHECK: # Section 6
-// CHECK-NEXT: ('sh_name', 0x0000002c) # '.rodata.cst8
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000012)
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 0x0000000000000010)
-// CHECK-NEXT: ('sh_link',
-// CHECK-NEXT: ('sh_info',
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000008)
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .rodata.str1.1
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_MERGE
+// CHECK-NEXT: SHF_STRINGS
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 13
+// CHECK-NEXT: Link:
+// CHECK-NEXT: Info:
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Index: 5
+// CHECK-NEXT: Name: .rodata.str2.1
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_MERGE
+// CHECK-NEXT: SHF_STRINGS
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 16
+// CHECK-NEXT: Link:
+// CHECK-NEXT: Info:
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 2
+// CHECK-NEXT: }
+// CHECK: Section {
+// CHECK: Index: 6
+// CHECK-NEXT: Name: .rodata.cst8
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_MERGE
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 16
+// CHECK-NEXT: Link:
+// CHECK-NEXT: Info:
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 8
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/file.s b/test/MC/ELF/file.s
index 434fb6e2b3..7e287f7e3f 100644
--- a/test/MC/ELF/file.s
+++ b/test/MC/ELF/file.s
@@ -1,23 +1,25 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that the STT_FILE symbol precedes the other local symbols.
.file "foo"
foa:
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x4)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0xfff1)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000005) # 'foa'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
+
+// CHECK: Symbol {
+// CHECK: Name: foo (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: File
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0xFFF1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foa (5)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/gen-dwarf.s b/test/MC/ELF/gen-dwarf.s
index 85e02428fe..907bf424f4 100644
--- a/test/MC/ELF/gen-dwarf.s
+++ b/test/MC/ELF/gen-dwarf.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
// Test that on ELF:
@@ -14,97 +14,13 @@ foo:
ret
.size foo, .-foo
-// Section 4 is .debug_line
-// CHECK: # Section 4
-// CHECK-NEXT: # '.debug_line'
-
-
-
-// The two relocations, one to symbol 6 and one to 4
-// CHECK: # '.rel.debug_info'
-// CHECK-NEXT: ('sh_type',
-// CHECK-NEXT: ('sh_flags'
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size',
-// CHECK-NEXT: ('sh_link',
-// CHECK-NEXT: ('sh_info',
-// CHECK-NEXT: ('sh_addralign',
-// CHECK-NEXT: ('sh_entsize',
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x00000006)
-// CHECK-NEXT: ('r_sym', 0x000006)
-// CHECK-NEXT: ('r_type', 0x01)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x0000000c)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x01)
-// CHECK-NEXT: ),
-
-
-// Section 8 is .debug_abbrev
-// CHECK: # Section 8
-// CHECK-NEXT: (('sh_name', 0x00000001) # '.debug_abbrev'
-
-// Section 9 is .debug_aranges
-// CHECK: # Section 9
-// CHECK-NEXT: (('sh_name', 0x0000001e) # '.debug_aranges'
-
-// Two relocations in .debug_aranges, one to text and one to debug_info.
-// CHECK: # '.rel.debug_aranges'
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x00000006)
-// CHECK-NEXT: ('r_sym', 0x000005)
-// CHECK-NEXT: ('r_type', 0x01)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x00000010)
-// CHECK-NEXT: ('r_sym', 0x000001)
-// CHECK-NEXT: ('r_type', 0x01)
-// CHECK-NEXT: ),
-
-// Symbol 1 is section 1 (.text)
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ),
-
-// Symbol 4 is section 4 (.debug_line)
-// CHECK: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0004)
-// CHECK-NEXT: ),
-
-// Symbol 5 is section 6 (.debug_info)
-// CHECK: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0006)
-// CHECK-NEXT: ),
-
-// Symbol 6 is section 8 (.debug_abbrev)
-// CHECK: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0008)
-// CHECK-NEXT: ),
+// CHECK: Relocations [
+// CHECK: Section ({{[^ ]+}}) .debug_info {
+// CHECK-NEXT: 0x6 R_386_32 .debug_abbrev 0x0
+// CHECK-NEXT: 0xC R_386_32 .debug_line 0x0
+// CHECK: }
+// CHECK-NEXT: Section ({{[^ ]+}}) .debug_aranges {
+// CHECK-NEXT: 0x6 R_386_32 .debug_info 0x0
+// CHECK-NEXT: 0x10 R_386_32 .text 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/global-offset.s b/test/MC/ELF/global-offset.s
index 81ae5d785d..c6886734ca 100644
--- a/test/MC/ELF/global-offset.s
+++ b/test/MC/ELF/global-offset.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// We test that _GLOBAL_OFFSET_TABLE_ will account for the two bytes at the
// start of the addl/leal.
@@ -10,14 +10,20 @@
foo:
addl _GLOBAL_OFFSET_TABLE_-foo,%ebx
-// CHECK: ('sh_name', 0x00000005) # '.text'
-// CHECK-NEXT: ('sh_type',
-// CHECK-NEXT: ('sh_flags',
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size',
-// CHECK-NEXT: ('sh_link',
-// CHECK-NEXT: ('sh_info',
-// CHECK-NEXT: ('sh_addralign',
-// CHECK-NEXT: ('sh_entsize',
-// CHECK-NEXT: ('_section_data', '81c30200 00008d9b 02000000 031d0200 0000')
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type:
+// CHECK-NEXT: Flags [
+// CHECK: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Link:
+// CHECK-NEXT: Info:
+// CHECK-NEXT: AddressAlignment:
+// CHECK-NEXT: EntrySize:
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 81C30200 00008D9B 02000000 031D0200
+// CHECK-NEXT: 0010: 0000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/got.s b/test/MC/ELF/got.s
index a849872818..60dea6d3b1 100644
--- a/test/MC/ELF/got.s
+++ b/test/MC/ELF/got.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
// Test that this produces a R_X86_64_GOT32 and that we have an undefined
// reference to _GLOBAL_OFFSET_TABLE_.
@@ -6,20 +6,15 @@
movl foo@GOT, %eax
movl foo@GOTPCREL(%rip), %eax
-// CHECK: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
-// CHECK-NEXT: ('r_type', 0x00000003)
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
-// CHECK-NEXT: ('r_type', 0x00000009)
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: Relocations [
+// CHECK: Section ({{[^ ]+}}) .text {
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOT32 foo 0x{{[^ ]+}}
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOTPCREL foo 0x{{[^ ]+}}
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
-// CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_'
-// CHECK-NEXT: ('st_bind', 0x1)
+// CHECK: Symbol {
+// CHECK: Name: _GLOBAL_OFFSET_TABLE_
+// CHECK-NEXT: Value:
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Binding: Global
diff --git a/test/MC/ELF/ident.s b/test/MC/ELF/ident.s
index 56af19a307..259220522e 100644
--- a/test/MC/ELF/ident.s
+++ b/test/MC/ELF/ident.s
@@ -1,16 +1,23 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
-// CHECK: (('sh_name', 0x00000007) # '.comment'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000030)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x000000000000000d)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000001)
-// CHECK-NEXT: ('_section_data', '00666f6f 00626172 007a6564 00')
+// CHECK: Section {
+// CHECK: Name: .comment
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_MERGE
+// CHECK-NEXT: SHF_STRINGS
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 13
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 00666F6F 00626172 007A6564 00
+// CHECK-NEXT: )
+// CHECK-NEXT: }
.ident "foo"
.ident "bar"
diff --git a/test/MC/ELF/lcomm.s b/test/MC/ELF/lcomm.s
index ae8d0baa33..430b79b54b 100644
--- a/test/MC/ELF/lcomm.s
+++ b/test/MC/ELF/lcomm.s
@@ -1,21 +1,23 @@
-// RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
.lcomm A, 5
.lcomm B, 32 << 20
-// CHECK: (('st_name', 0x00000001) # 'A'
-// CHECK: ('st_value', 0x00000000)
-// CHECK: ('st_size', 0x00000005)
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x1)
-// CHECK: ('st_other', 0x00)
-// CHECK: ('st_shndx', 0x0003)
-// CHECK: ),
-// CHECK: (('st_name', 0x00000003) # 'B'
-// CHECK: ('st_value', 0x00000005)
-// CHECK: ('st_size', 0x02000000)
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x1)
-// CHECK: ('st_other', 0x00)
-// CHECK: ('st_shndx', 0x0003)
-// CHECK: ),
+// CHECK: Symbol {
+// CHECK: Name: A (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 5
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .bss (0x3)
+// CHECK-NEXT: }
+// CHECK: Symbol {
+// CHECK: Name: B (3)
+// CHECK-NEXT: Value: 0x5
+// CHECK-NEXT: Size: 33554432
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .bss (0x3)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/leb128.s b/test/MC/ELF/leb128.s
index f6daac8ace..84c5b54fa1 100644
--- a/test/MC/ELF/leb128.s
+++ b/test/MC/ELF/leb128.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
.sleb128 .Lfoo - .Lbar
.Lfoo:
@@ -6,14 +6,29 @@
.fill 126, 1, 0x90
.Lbar:
-// CHECK: (('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000081)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '817f7f90 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90909090 90')
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 129
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 817F7F90 90909090 90909090 90909090
+// CHECK-NEXT: 0010: 90909090 90909090 90909090 90909090
+// CHECK-NEXT: 0020: 90909090 90909090 90909090 90909090
+// CHECK-NEXT: 0030: 90909090 90909090 90909090 90909090
+// CHECK-NEXT: 0040: 90909090 90909090 90909090 90909090
+// CHECK-NEXT: 0050: 90909090 90909090 90909090 90909090
+// CHECK-NEXT: 0060: 90909090 90909090 90909090 90909090
+// CHECK-NEXT: 0070: 90909090 90909090 90909090 90909090
+// CHECK-NEXT: 0080: 90
+// CHECK-NEXT: )
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/local-reloc.s b/test/MC/ELF/local-reloc.s
index b32a9cc169..4241ba5af4 100644
--- a/test/MC/ELF/local-reloc.s
+++ b/test/MC/ELF/local-reloc.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -r -t | FileCheck %s
// Test that relocations with local symbols are represented as relocations
// with the section. They should be equivalent, but gas behaves like this.
@@ -6,26 +6,8 @@
movl foo, %r14d
foo:
-// Section number 1 is .text
-// CHECK: # Section 1
-// CHECK-next: (('sh_name', 0x00000001) # '.text'
-
-// Relocation refers to symbol number 2
-// CHECK: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type',
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-
-// Symbol number 2 is section number 1
-// CHECK: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
+// CHECKT: Relocations [
+// CHECK: Section (1) .text {
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32S .text 0x{{[^ ]+}}
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/merge.s b/test/MC/ELF/merge.s
index 11a80ad035..d34635a671 100644
--- a/test/MC/ELF/merge.s
+++ b/test/MC/ELF/merge.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
// Test that PIC relocations with local symbols in a mergeable section are done
// with a reference to the symbol. Not sure if this is a linker limitation,
@@ -22,76 +22,13 @@ zed:
.section bar,"ax",@progbits
foo:
-// Relocation 0 refers to symbol 1
-// CHECK: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym', 0x00000001)
-// CHECK-NEXT: ('r_type', 0x00000002
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-
-// Relocation 1 refers to symbol 6
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-
-// Relocation 2 refers to symbol 1
-// CHECK-NEXT: # Relocation 2
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym', 0x00000001)
-// CHECK-NEXT: ('r_type', 0x0000000a
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-
-// Relocation 3 refers to symbol 2
-// CHECK-NEXT: # Relocation 3
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000004
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-
-// Relocation 4 refers to symbol 2
-// CHECK-NEXT: # Relocation 4
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x00000009
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-
-// Relocation 5 refers to symbol 8
-// CHECK-NEXT: # Relocation 5
-// CHECK-NEXT: (('r_offset', 0x0000000000000023)
-// CHECK-NEXT: ('r_sym', 0x00000008)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-
-// Section 5 is "sec1"
-// CHECK: # Section 5
-// CHECK-NEXT: (('sh_name', 0x00000035) # '.sec1'
-
-// Symbol number 1 is .Lfoo
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000001) # '.Lfoo'
-
-// Symbol number 2 is foo
-// CHECK: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000007) # 'foo'
-
-// Symbol number 6 is section 5
-// CHECK: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0005)
-
-// Symbol number 8 is zed
-// CHECK: # Symbol 8
-// CHECK-NEXT: (('st_name', 0x0000000b) # 'zed'
+// CHECK: Relocations [
+// CHECK-NEXT: Section (1) .text {
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_PC32 .Lfoo 0x{{[^ ]+}}
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32 .sec1 0x{{[^ ]+}}
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32 .Lfoo 0x{{[^ ]+}}
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_PLT32 foo 0x{{[^ ]+}}
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_GOTPCREL foo 0x{{[^ ]+}}
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_32S zed 0x{{[^ ]+}}
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/n_bytes.s b/test/MC/ELF/n_bytes.s
index de6632232c..e658de09a2 100644
--- a/test/MC/ELF/n_bytes.s
+++ b/test/MC/ELF/n_bytes.s
@@ -1,20 +1,30 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
.2byte 42, 1, 2, 3
.4byte 42, 1, 2, 3
.8byte 42, 1, 2, 3
.int 42, 1, 2, 3
-// CHECK: # Section 1
-// CHECK-NEXT: (('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000048)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', '2a000100 02000300 2a000000 01000000 02000000 03000000 2a000000 00000000 01000000 00000000 02000000 00000000 03000000 00000000 2a000000 01000000 02000000 03000000')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK-NEXT: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 72
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 2A000100 02000300 2A000000 01000000
+// CHECK-NEXT: 0010: 02000000 03000000 2A000000 00000000
+// CHECK-NEXT: 0020: 01000000 00000000 02000000 00000000
+// CHECK-NEXT: 0030: 03000000 00000000 2A000000 01000000
+// CHECK-NEXT: 0040: 02000000 03000000
+// CHECK-NEXT: )
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/noexec.s b/test/MC/ELF/noexec.s
index d8b7b32338..33cb8ae345 100644
--- a/test/MC/ELF/noexec.s
+++ b/test/MC/ELF/noexec.s
@@ -1,24 +1,26 @@
-// RUN: llvm-mc -mc-no-exec-stack -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -mc-no-exec-stack -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x0000000c) # '.note.GNU-stack'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 4
+// CHECK-NEXT: Name: .note.GNU-stack
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
-// CHECK: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0004)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: .note.GNU-stack (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .note.GNU-stack (0x4)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/norelocation.s b/test/MC/ELF/norelocation.s
index c6394791ad..1370382928 100644
--- a/test/MC/ELF/norelocation.s
+++ b/test/MC/ELF/norelocation.s
@@ -1,18 +1,26 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd -sr | FileCheck %s
call bar
bar:
-// CHECK: ('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000005)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', 'e8000000 00')
-// CHECK-NOT: .rela.text
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [ (0x6)
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 5
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: E8000000 00
+// CHECK-NEXT: )
+// CHECK-NEXT: }
// CHECK: shstrtab
diff --git a/test/MC/ELF/org.s b/test/MC/ELF/org.s
index 3afc364b21..d878fa1aab 100644
--- a/test/MC/ELF/org.s
+++ b/test/MC/ELF/org.s
@@ -1,13 +1,15 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
.zero 4
foo:
.zero 4
.org foo+16
-// CHECK: (('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type',
-// CHECK-NEXT: ('sh_flags',
-// CHECK-NEXT: ('sh_addr',
-// CHECK-NEXT: ('sh_offset'
-// CHECK-NEXT: ('sh_size', 0x0000000000000014)
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type:
+// CHECK-NEXT: Flags [
+// CHECK: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 20
diff --git a/test/MC/ELF/pic-diff.s b/test/MC/ELF/pic-diff.s
index 2c68f6cc71..cffa0dd368 100644
--- a/test/MC/ELF/pic-diff.s
+++ b/test/MC/ELF/pic-diff.s
@@ -1,23 +1,20 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
-// CHECK: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x000000000000000c)
-// CHECK-NEXT: ('r_sym', 0x00000005)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000008)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: Relocations [
+// CHECK-NEXT: Section ({{[^ ]+}}) {{[^ ]+}} {
+// CHECK-NEXT: 0xC R_X86_64_PC32 baz 0x8
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
-// CHECK: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000005) # 'baz'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: baz (5)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
.zero 4
.data
diff --git a/test/MC/ELF/plt.s b/test/MC/ELF/plt.s
index 7d78e23443..604a4bf3a3 100644
--- a/test/MC/ELF/plt.s
+++ b/test/MC/ELF/plt.s
@@ -1,14 +1,11 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
// Test that this produces a R_X86_64_PLT32.
jmp foo@PLT
-// CHECK: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
-// CHECK-NEXT: ('r_type', 0x00000004)
-// CHECK-NEXT: ('r_addend',
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: Relocations [
+// CHECK-NEXT: Section ({{[^ ]+}}) {{[^ ]+}} {
+// CHECK-NEXT: 0x{{[^ ]+}} R_X86_64_PLT32 {{[^ ]+}} 0x{{[^ ]+}}
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/pr9292.s b/test/MC/ELF/pr9292.s
index 05f377faa7..a6e78dc992 100644
--- a/test/MC/ELF/pr9292.s
+++ b/test/MC/ELF/pr9292.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that both foo and bar are undefined.
@@ -7,20 +7,21 @@
mov %eax,bar
-// CHECK: (('st_name', 0x00000005) # 'bar'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: bar (5)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/relax-arith.s b/test/MC/ELF/relax-arith.s
index 3236b41e53..b8145564db 100644
--- a/test/MC/ELF/relax-arith.s
+++ b/test/MC/ELF/relax-arith.s
@@ -1,11 +1,16 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
// Test that we correctly relax these instructions into versions that use
// 16 or 32 bit immediate values.
bar:
-// CHECK: 'imul'
-// CHECK: ('_section_data', '6669db00 0066691c 25000000 00000069 db000000 00691c25 00000000 00000000 4869db00 00000048 691c2500 00000000 000000')
+// CHECK: Name: imul
+// CHECK: SectionData (
+// CHECK-NEXT: 0000: 6669DB00 0066691C 25000000 00000069
+// CHECK-NEXT: 0010: DB000000 00691C25 00000000 00000000
+// CHECK-NEXT: 0020: 4869DB00 00000048 691C2500 00000000
+// CHECK-NEXT: 0030: 000000
+// CHECK-NEXT: )
.section imul
imul $foo, %bx, %bx
imul $foo, bar, %bx
@@ -14,8 +19,14 @@ bar:
imul $foo, %rbx, %rbx
imul $foo, bar, %rbx
-// CHECK: and'
-// CHECK:('_section_data', '6681e300 00668124 25000000 00000081 e3000000 00812425 00000000 00000000 4881e300 00000048 81242500 00000000 000000')
+
+// CHECK: Name: and
+// CHECK: SectionData (
+// CHECK-NEXT: 0000: 6681E300 00668124 25000000 00000081
+// CHECK-NEXT: 0010: E3000000 00812425 00000000 00000000
+// CHECK-NEXT: 0020: 4881E300 00000048 81242500 00000000
+// CHECK-NEXT: 0030: 000000
+// CHECK-NEXT: )
.section and
and $foo, %bx
andw $foo, bar
@@ -24,8 +35,13 @@ bar:
and $foo, %rbx
andq $foo, bar
-// CHECK: 'or'
-// CHECK: ('_section_data', '6681cb00 0066810c 25000000 00000081 cb000000 00810c25 00000000 00000000 4881cb00 00000048 810c2500 00000000 000000')
+// CHECK: Name: or
+// CHECK: SectionData (
+// CHECK-NEXT: 0000: 6681CB00 0066810C 25000000 00000081
+// CHECK-NEXT: 0010: CB000000 00810C25 00000000 00000000
+// CHECK-NEXT: 0020: 4881CB00 00000048 810C2500 00000000
+// CHECK-NEXT: 0030: 000000
+// CHECK-NEXT: )
.section or
or $foo, %bx
orw $foo, bar
@@ -34,8 +50,13 @@ bar:
or $foo, %rbx
orq $foo, bar
-// CHECK: 'xor'
-// CHECK: ('_section_data', '6681f300 00668134 25000000 00000081 f3000000 00813425 00000000 00000000 4881f300 00000048 81342500 00000000 000000')
+// CHECK: Name: xor
+// CHECK: SectionData (
+// CHECK-NEXT: 0000: 6681F300 00668134 25000000 00000081
+// CHECK-NEXT: 0010: F3000000 00813425 00000000 00000000
+// CHECK-NEXT: 0020: 4881F300 00000048 81342500 00000000
+// CHECK-NEXT: 0030: 000000
+// CHECK-NEXT: )
.section xor
xor $foo, %bx
xorw $foo, bar
@@ -44,8 +65,13 @@ bar:
xor $foo, %rbx
xorq $foo, bar
-// CHECK: 'add'
-// CHECK: ('_section_data', '6681c300 00668104 25000000 00000081 c3000000 00810425 00000000 00000000 4881c300 00000048 81042500 00000000 000000')
+// CHECK: Name: add
+// CHECK: SectionData (
+// CHECK-NEXT: 0000: 6681C300 00668104 25000000 00000081
+// CHECK-NEXT: 0010: C3000000 00810425 00000000 00000000
+// CHECK-NEXT: 0020: 4881C300 00000048 81042500 00000000
+// CHECK-NEXT: 0030: 000000
+// CHECK-NEXT: )
.section add
add $foo, %bx
addw $foo, bar
@@ -54,8 +80,13 @@ bar:
add $foo, %rbx
addq $foo, bar
-// CHECK: 'sub'
-// CHECK: ('_section_data', '6681eb00 0066812c 25000000 00000081 eb000000 00812c25 00000000 00000000 4881eb00 00000048 812c2500 00000000 000000')
+// CHECK: Name: sub
+// CHECK: SectionData (
+// CHECK-NEXT: 000: 6681EB00 0066812C 25000000 00000081
+// CHECK-NEXT: 010: EB000000 00812C25 00000000 00000000
+// CHECK-NEXT: 020: 4881EB00 00000048 812C2500 00000000
+// CHECK-NEXT: 030: 000000
+// CHECK-NEXT: )
.section sub
sub $foo, %bx
subw $foo, bar
@@ -64,8 +95,13 @@ bar:
sub $foo, %rbx
subq $foo, bar
-// CHECK: 'cmp'
-// CHECK: ('_section_data', '6681fb00 0066813c 25000000 00000081 fb000000 00813c25 00000000 00000000 4881fb00 00000048 813c2500 00000000 000000')
+// CHECK: Name: cmp
+// CHECK: SectionData (
+// CHECK-NEXT: 0000: 6681FB00 0066813C 25000000 00000081
+// CHECK-NEXT: 0010: FB000000 00813C25 00000000 00000000
+// CHECK-NEXT: 0020: 4881FB00 00000048 813C2500 00000000
+// CHECK-NEXT: 0030: 000000
+// CHECK-NEXT: )
.section cmp
cmp $foo, %bx
cmpw $foo, bar
diff --git a/test/MC/ELF/relax.s b/test/MC/ELF/relax.s
index 0b5d24f0f7..49ee8e2eef 100644
--- a/test/MC/ELF/relax.s
+++ b/test/MC/ELF/relax.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd -t | FileCheck %s
// Test that we do not relax these.
@@ -11,17 +11,23 @@ foo:
jmp foo
jmp zed
-// CHECK: ('sh_name', 0x00000001) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000006)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ('_section_data', 'ebfeebfc ebfa')
-
-// CHECK: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000005) # 'foo'
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 6
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: EBFEEBFC EBFA
+// CHECK-NEXT: )
+// CHECK-NEXT: }
+// CHECK: Symbol {
+// CHECK: Name: foo (5)
diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s
index 85da2eb8c9..24d0172e72 100644
--- a/test/MC/ELF/relocation-386.s
+++ b/test/MC/ELF/relocation-386.s
@@ -1,205 +1,86 @@
-// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
// Test that we produce the correct relocation types and that the relocations
// correctly point to the section or the symbol.
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x00000002)
-// CHECK-NEXT: ('r_sym', 0x000001)
-// CHECK-NEXT: ('r_type', 0x09)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
-// CHECK-NEXT: ('r_type', 0x04)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 2
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
-// CHECK-NEXT: ('r_type', 0x0a)
-// CHECK-NEXT: ),
-
+// CHECK: Relocations [
+// CHECK-NEXT: Section (1) .text {
+// CHECK-NEXT: 0x2 R_386_GOTOFF .Lfoo 0x0
+// CHECK-NEXT: 0x{{[^ ]+}} R_386_PLT32 bar2 0x0
+// CHECK-NEXT: 0x{{[^ ]+}} R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0
// Relocation 3 (bar3@GOTOFF) is done with symbol 7 (bss)
-// CHECK-NEXT: # Relocation 3
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym', 0x000007
-// CHECK-NEXT: ('r_type',
-// CHECK-NEXT: ),
-
+// CHECK-NEXT: 0x{{[^ ]+}} R_386_GOTOFF .bss 0x0
// Relocation 4 (bar2@GOT) is of type R_386_GOT32
-// CHECK-NEXT: # Relocation 4
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
-// CHECK-NEXT: ('r_type', 0x03
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x{{[^ ]+}} R_386_GOT32 bar2j 0x0
// Relocation 5 (foo@TLSGD) is of type R_386_TLS_GD
-// CHECK-NEXT: # Relocation 5
-// CHECK-NEXT: (('r_offset', 0x00000020)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x12)
-// CHECK-NEXT: ),
-
+// CHECK-NEXT: 0x20 R_386_TLS_GD foo 0x0
// Relocation 6 ($foo@TPOFF) is of type R_386_TLS_LE_32
-// CHECK-NEXT: # Relocation 6
-// CHECK-NEXT: (('r_offset', 0x00000025)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x22)
-// CHECK-NEXT: ),
-
+// CHECK-NEXT: 0x25 R_386_TLS_LE_32 foo 0x0
// Relocation 7 (foo@INDNTPOFF) is of type R_386_TLS_IE
-// CHECK-NEXT: # Relocation 7
-// CHECK-NEXT: (('r_offset', 0x0000002b)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x0f)
-// CHECK-NEXT: ),
-
+// CHECK-NEXT: 0x2B R_386_TLS_IE foo 0x0
// Relocation 8 (foo@NTPOFF) is of type R_386_TLS_LE
-// CHECK-NEXT: # Relocation 8
-// CHECK-NEXT: (('r_offset', 0x00000031)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x11)
-// CHECK-NEXT: ),
-
+// CHECK-NEXT: 0x31 R_386_TLS_LE foo 0x0
// Relocation 9 (foo@GOTNTPOFF) is of type R_386_TLS_GOTIE
-// CHECK-NEXT: # Relocation 9
-// CHECK-NEXT: (('r_offset', 0x00000037)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x10)
-// CHECK-NEXT: ),
-
+// CHECK-NEXT: 0x37 R_386_TLS_GOTIE foo 0x0
// Relocation 10 (foo@TLSLDM) is of type R_386_TLS_LDM
-// CHECK-NEXT: # Relocation 10
-// CHECK-NEXT: (('r_offset', 0x0000003d)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x13)
-// CHECK-NEXT: ),
-
+// CHECK-NEXT: 0x3D R_386_TLS_LDM foo 0x0
// Relocation 11 (foo@DTPOFF) is of type R_386_TLS_LDO_32
-// CHECK-NEXT: # Relocation 11
-// CHECK-NEXT: (('r_offset', 0x00000043)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x20)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x43 R_386_TLS_LDO_32 foo 0x0
// Relocation 12 (calll 4096) is of type R_386_PC32
-// CHECK-NEXT: # Relocation 12
-// CHECK-NEXT: (('r_offset', 0x00000048)
-// CHECK-NEXT: ('r_sym', 0x000000)
-// CHECK-NEXT: ('r_type', 0x02)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x48 R_386_PC32 - 0x0
// Relocation 13 (zed@GOT) is of type R_386_GOT32 and uses the symbol
-// CHECK-NEXT: # Relocation 13
-// CHECK-NEXT: (('r_offset', 0x0000004e)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x03)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x4E R_386_GOT32 zed 0x0
// Relocation 14 (zed@GOTOFF) is of type R_386_GOTOFF and uses the symbol
-// CHECK-NEXT: # Relocation 14
-// CHECK-NEXT: (('r_offset', 0x00000054)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x09)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x54 R_386_GOTOFF zed 0x0
// Relocation 15 (zed@INDNTPOFF) is of type R_386_TLS_IE and uses the symbol
-// CHECK-NEXT: # Relocation 15
-// CHECK-NEXT: (('r_offset', 0x0000005a)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x0f)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x5A R_386_TLS_IE zed 0x0
// Relocation 16 (zed@NTPOFF) is of type R_386_TLS_LE and uses the symbol
-// CHECK-NEXT: # Relocation 16
-// CHECK-NEXT: (('r_offset', 0x00000060)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x11)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x60 R_386_TLS_LE zed 0x0
// Relocation 17 (zed@GOTNTPOFF) is of type R_386_TLS_GOTIE and uses the symbol
-// CHECK-NEXT: # Relocation 17
-// CHECK-NEXT: (('r_offset', 0x00000066)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x10)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x66 R_386_TLS_GOTIE zed 0x0
// Relocation 18 (zed@PLT) is of type R_386_PLT32 and uses the symbol
-// CHECK-NEXT: # Relocation 18
-// CHECK-NEXT: (('r_offset', 0x0000006b)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x04)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x6B R_386_PLT32 zed 0x0
// Relocation 19 (zed@TLSGD) is of type R_386_TLS_GD and uses the symbol
-// CHECK-NEXT: # Relocation 19
-// CHECK-NEXT: (('r_offset', 0x00000071)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x12)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x71 R_386_TLS_GD zed 0x0
// Relocation 20 (zed@TLSLDM) is of type R_386_TLS_LDM and uses the symbol
-// CHECK-NEXT: # Relocation 20
-// CHECK-NEXT: (('r_offset', 0x00000077)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x13)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x77 R_386_TLS_LDM zed 0x0
// Relocation 21 (zed@TPOFF) is of type R_386_TLS_LE_32 and uses the symbol
-// CHECK-NEXT:# Relocation 21
-// CHECK-NEXT: (('r_offset', 0x0000007d)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x22)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x7D R_386_TLS_LE_32 zed 0x0
// Relocation 22 (zed@DTPOFF) is of type R_386_TLS_LDO_32 and uses the symbol
-// CHECK-NEXT: Relocation 22
-// CHECK-NEXT: (('r_offset', 0x00000083)
-// CHECK-NEXT: ('r_sym', 0x000004)
-// CHECK-NEXT: ('r_type', 0x20)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x83 R_386_TLS_LDO_32 zed 0x0
// Relocation 23 ($bar) is of type R_386_32 and uses the section
-// CHECK-NEXT: Relocation 23
-// CHECK-NEXT: (('r_offset',
-// CHECK-NEXT: ('r_sym',
-// CHECK-NEXT: ('r_type', 0x01)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x{{[^ ]+}} R_386_32 .text 0x0
// Relocation 24 (foo@GOTTPOFF(%edx)) is of type R_386_TLS_IE_32 and uses the
// symbol
-// CHECK-NEXT: Relocation 24
-// CHECK-NEXT: (('r_offset', 0x0000008e)
-// CHECK-NEXT: ('r_sym', 0x00000d)
-// CHECK-NEXT: ('r_type', 0x21)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x8E R_386_TLS_IE_32 foo 0x0
// Relocation 25 (_GLOBAL_OFFSET_TABLE_-bar2) is of type R_386_GOTPC.
-// CHECK-NEXT: Relocation 25
-// CHECK-NEXT: (('r_offset', 0x00000094)
-// CHECK-NEXT: ('r_sym', 0x00000b)
-// CHECK-NEXT: ('r_type', 0x0a)
-// CHECK-NEXT: ),
+// CHECK-NEXT: 0x94 R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 0x0
// Relocation 26 (und_symbol-bar2) is of type R_386_PC32
-// CHECK-NEXT: Relocation 26
-// CHECK-NEXT: (('r_offset', 0x0000009a)
-// CHECK-NEXT: ('r_sym', 0x00000e)
-// CHECK-NEXT: ('r_type', 0x02)
-// CHECK-NEXT: ),
-
-// Section 4 is bss
-// CHECK: # Section 4
-// CHECK-NEXT: (('sh_name', 0x0000000b) # '.bss'
-
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000005) # '.Lfoo'
+// CHECK-NEXT: 0x9A R_386_PC32 und_symbol 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
// Symbol 4 is zed
-// CHECK: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000035) # 'zed'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0005)
-
+// CHECK: Symbol {
+// CHECK: Name: zed (53)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: zedsec (0x5)
+// CHECK-NEXT: }
// Symbol 7 is section 4
-// CHECK: # Symbol 7
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0004)
-
+// CHECK: Symbol {
+// CHECK: Name: .bss (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .bss (0x4)
+// CHECK-NEXT: }
.text
bar:
diff --git a/test/MC/ELF/relocation-pc.s b/test/MC/ELF/relocation-pc.s
index b6279c3e55..551f5ff378 100644
--- a/test/MC/ELF/relocation-pc.s
+++ b/test/MC/ELF/relocation-pc.s
@@ -1,33 +1,32 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr | FileCheck %s
// Test that we produce the correct relocation.
loope 0 # R_X86_64_PC8
jmp -256 # R_X86_64_PC32
-// CHECK: # Section 2
-// CHECK-NEXT: (('sh_name', 0x00000001) # '.rela.text'
-// CHECK-NEXT: ('sh_type', 0x00000004)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x00000000000002e8)
-// CHECK-NEXT: ('sh_size', 0x0000000000000030)
-// CHECK-NEXT: ('sh_link', 0x00000006)
-// CHECK-NEXT: ('sh_info', 0x00000001)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000008)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000018)
-// CHECK-NEXT: ('_relocations', [
-// CHECK-NEXT: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000001)
-// CHECK-NEXT: ('r_sym', 0x00000000)
-// CHECK-NEXT: ('r_type', 0x0000000f)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x0000000000000003)
-// CHECK-NEXT: ('r_sym', 0x00000000)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK-NEXT: Name: .text
+// CHECK: Relocations [
+// CHECK-NEXT: 0x1 R_X86_64_PC8 - 0x0
+// CHECK-NEXT: 0x3 R_X86_64_PC32 - 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+
+// CHECK: Section {
+// CHECK: Index: 2
+// CHECK-NEXT: Name: .rela.text
+// CHECK-NEXT: Type: SHT_RELA
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x2E8
+// CHECK-NEXT: Size: 48
+// CHECK-NEXT: Link: 6
+// CHECK-NEXT: Info: 1
+// CHECK-NEXT: AddressAlignment: 8
+// CHECK-NEXT: EntrySize: 24
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s
index 5db213bc04..19bcc18d8f 100644
--- a/test/MC/ELF/relocation.s
+++ b/test/MC/ELF/relocation.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -t | FileCheck %s
// Test that we produce the correct relocation.
@@ -20,102 +20,33 @@ bar:
addq $bar,%rax # R_X86_64_32S
-// CHECK: # Section 1
-// CHECK: (('sh_name', 0x00000006) # '.text'
-
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000001)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend',
-
-// CHECK: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x0000000000000008)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend',
-
-// CHECK: # Relocation 2
-// CHECK-NEXT: (('r_offset', 0x0000000000000013)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend',
-
-// CHECK: # Relocation 3
-// CHECK-NEXT: (('r_offset', 0x000000000000001a)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend',
-
-// CHECK: # Relocation 4
-// CHECK-NEXT: (('r_offset', 0x0000000000000022)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend',
-
-// CHECK: # Relocation 5
-// CHECK-NEXT: (('r_offset', 0x0000000000000026)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend',
-
-// CHECK: # Relocation 6
-// CHECK-NEXT: (('r_offset', 0x000000000000002d)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000016)
-// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-
-// CHECK: # Relocation 7
-// CHECK-NEXT: (('r_offset', 0x0000000000000034)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000013)
-// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-
-// CHECK: # Relocation 8
-// CHECK-NEXT: (('r_offset', 0x000000000000003b)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000017)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-
-// CHECK: # Relocation 9
-// CHECK-NEXT: (('r_offset', 0x0000000000000042)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000014)
-// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-
-// CHECK: # Relocation 10
-// CHECK-NEXT: (('r_offset', 0x0000000000000049)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000015)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-
-// CHECK: # Relocation 11
-// CHECK-NEXT: (('r_offset', 0x000000000000004e)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-
-// CHECK: # Relocation 12
-// CHECK-NEXT: (('r_offset', 0x0000000000000055)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-
-// CHECK: # Relocation 13
-// CHECK-NEXT: (('r_offset', 0x000000000000005c)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x000000000000005c)
-
-// CHECK: # Relocation 14
-// CHECK-NEXT: (('r_offset', 0x0000000000000063)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-
-// CHECK: # Symbol 2
-// CHECK: (('st_name', 0x00000000) # ''
-// CHECK: ('st_bind', 0x0)
-// CHECK: ('st_type', 0x3)
-// CHECK: ('st_other', 0x00)
-// CHECK: ('st_shndx', 0x0001)
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK: Relocations [
+// CHECK-NEXT: 0x1 R_X86_64_32 .text
+// CHECK-NEXT: 0x8 R_X86_64_32S .text
+// CHECK-NEXT: 0x13 R_X86_64_32S .text
+// CHECK-NEXT: 0x1A R_X86_64_32S .text
+// CHECK-NEXT: 0x22 R_X86_64_32S .text
+// CHECK-NEXT: 0x26 R_X86_64_32 .text
+// CHECK-NEXT: 0x2D R_X86_64_GOTTPOFF foo 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: 0x34 R_X86_64_TLSGD foo 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: 0x3B R_X86_64_TPOFF32 foo 0x0
+// CHECK-NEXT: 0x42 R_X86_64_TLSLD foo 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: 0x49 R_X86_64_DTPOFF32 foo 0x0
+// CHECK-NEXT: 0x4E R_X86_64_32S .text 0x0
+// CHECK-NEXT: 0x55 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: 0x5C R_X86_64_PC32 foo 0x5C
+// CHECK-NEXT: 0x63 R_X86_64_32S .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
+
+// CHECK: Symbol {
+// CHECK: Name: .text (0)
+// CHECK-NEXT: Value:
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/rename.s b/test/MC/ELF/rename.s
index 241aa05ecb..c50910b41e 100644
--- a/test/MC/ELF/rename.s
+++ b/test/MC/ELF/rename.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sr -t | FileCheck %s
// When doing a rename, all the checks for where the relocation should go
// should be performed with the original symbol. Only if we decide to relocate
@@ -16,31 +16,33 @@ defined3:
.global defined1
// Section 1 is .text
-// CHECK: # Section 1
-// CHECK-NEXT: (('sh_name', 0x00000006) # '.text'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000040)
-// CHECK-NEXT: ('sh_size', 0x0000000000000004)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000004)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-
-// The relocation uses symbol 2
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000000)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
+// CHECK: Section {
+// CHECK: Index: 1
+// CHECK-NEXT: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 4
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: Relocations [
+// CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0
+// CHECK-NEXT: ]
+// CHECK-NEXT: }
// Symbol 2 is section 1
-// CHECK: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
+// CHECK: Symbol {
+// CHECK: Name: .text (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/section.s b/test/MC/ELF/section.s
index c71e1a72c4..a6794034c9 100644
--- a/test/MC/ELF/section.s
+++ b/test/MC/ELF/section.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
// Test that these names are accepted.
@@ -7,10 +7,10 @@
.section .note.GNU-,"",@progbits
.section -.note.GNU,"",@progbits
-// CHECK: ('sh_name', 0x00000038) # '.note.GNU-stack'
-// CHECK: ('sh_name', 0x0000008f) # '.note.GNU-stack2'
-// CHECK: ('sh_name', 0x000000a0) # '.note.GNU-'
-// CHECK: ('sh_name', 0x00000084) # '-.note.GNU'
+// CHECK: Name: .note.GNU-stack (56)
+// CHECK: Name: .note.GNU-stack2 (143)
+// CHECK: Name: .note.GNU- (160)
+// CHECK: Name: -.note.GNU (132)
// Test that the defaults are used
@@ -19,66 +19,81 @@
.section .rodata
.section zed, ""
-// CHECK: (('sh_name', 0x00000012) # '.init'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 11
-// CHECK-NEXT: (('sh_name', 0x00000048) # '.fini'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000006)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 12
-// CHECK-NEXT: (('sh_name', 0x00000076) # '.rodata'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 13
-// CHECK-NEXT: (('sh_name', 0x00000058) # 'zed'
-// CHECK-NEXT: ('sh_type', 0x00000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .init
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 11
+// CHECK-NEXT: Name: .fini
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 12
+// CHECK-NEXT: Name: .rodata
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
+// CHECK-NEXT: Section {
+// CHECK-NEXT: Index: 13
+// CHECK-NEXT: Name: zed
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
.section .note.test,"",@note
-// CHECK: (('sh_name', 0x00000007) # '.note.test'
-// CHECK-NEXT: ('sh_type', 0x00000007)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .note.test
+// CHECK-NEXT: Type: SHT_NOTE
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
// Test that we can parse these
foo:
@@ -90,21 +105,26 @@ bar:
.section .eh_frame,"a",@unwind
-// CHECK: (('sh_name', 0x0000004e) # '.eh_frame'
-// CHECK-NEXT: ('sh_type', 0x70000001)
-// CHECK-NEXT: ('sh_flags', 0x0000000000000002)
-// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
-// CHECK-NEXT: ('sh_offset', 0x0000000000000050)
-// CHECK-NEXT: ('sh_size', 0x0000000000000000)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
-// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .eh_frame
+// CHECK-NEXT: Type: SHT_X86_64_UNWIND
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x50
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 1
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: }
// Test that we handle the strings like gas
.section bar-"foo"
.section "foo"
-// CHECK: ('sh_name', 0x000000ab) # 'bar-"foo"'
-// CHECK: ('sh_name', 0x00000034) # 'foo'
+// CHECK: Section {
+// CHECK: Name: bar-"foo" (171)
+// CHECK: Section {
+// CHECK: Name: foo (52)
diff --git a/test/MC/ELF/set.s b/test/MC/ELF/set.s
index 2258b19236..f6965a583a 100644
--- a/test/MC/ELF/set.s
+++ b/test/MC/ELF/set.s
@@ -1,17 +1,18 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that we emit the correct value.
.set kernbase,0xffffffff80000000
-// CHECK: (('st_name', 0x00000001) # 'kernbase'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0xfff1)
-// CHECK-NEXT: ('st_value', 0xffffffff80000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: kernbase (1)
+// CHECK-NEXT: Value: 0xFFFFFFFF80000000
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0xFFF1)
+// CHECK-NEXT: }
// Test that we accept .set of a symbol after it has been used in a statement.
@@ -24,11 +25,12 @@
.set foo2,bar2
// Test that there is an undefined reference to bar
-// CHECK: (('st_name', 0x0000000a) # 'bar'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: bar (10)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/sleb.s b/test/MC/ELF/sleb.s
index 00e5b4bf28..5cba5829a1 100644
--- a/test/MC/ELF/sleb.s
+++ b/test/MC/ELF/sleb.s
@@ -1,5 +1,5 @@
-// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_32 %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_64 %s
// RUN: llvm-mc -filetype=obj -triple i386-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_32 %s
// RUN: llvm-mc -filetype=obj -triple x86_64-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_64 %s
@@ -19,10 +19,14 @@ foo:
.sleb128 8193
-// ELF_32: ('sh_name', 0x00000001) # '.text'
-// ELF_32: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000')
-// ELF_64: ('sh_name', 0x00000001) # '.text'
-// ELF_64: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000')
+// ELF_32: Name: .text
+// ELF_32: SectionData (
+// ELF_32: 0000: 00017F3F 40C000BF 7FFF3F80 4081C000
+// ELF_32: )
+// ELF_64: Name: .text
+// ELF_64: SectionData (
+// ELF_64: 0000: 00017F3F 40C000BF 7FFF3F80 4081C000
+// ELF_64: )
// MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
// MACHO_32: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000')
// MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
diff --git a/test/MC/ELF/symref.s b/test/MC/ELF/symref.s
index 2dfa058ab0..9a71a81930 100644
--- a/test/MC/ELF/symref.s
+++ b/test/MC/ELF/symref.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
defined1:
defined2:
@@ -21,145 +21,122 @@ defined3:
.symver global1, g1@@zed
global1:
+// CHECK: Relocations [
+// CHECK-NEXT: Section (1) .text {
+// CHECK-NEXT: 0x0 R_X86_64_32 .text 0x0
+// CHECK-NEXT: 0x4 R_X86_64_32 bar2@zed 0x0
+// CHECK-NEXT: 0x8 R_X86_64_32 .text 0x0
+// CHECK-NEXT: 0xC R_X86_64_32 .text 0x0
+// CHECK-NEXT: 0x10 R_X86_64_32 bar6@zed 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000000)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x0000000000000004)
-// CHECK-NEXT: ('r_sym', 0x0000000b)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 2
-// CHECK-NEXT: (('r_offset', 0x0000000000000008)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 3
-// CHECK-NEXT: (('r_offset', 0x000000000000000c)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 4
-// CHECK-NEXT: (('r_offset', 0x0000000000000010)
-// CHECK-NEXT: ('r_sym', 0x0000000c)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT:])
-
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000013) # 'bar1@zed'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000025) # 'bar3@@zed'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 3
-// CHECK-NEXT: (('st_name', 0x0000002f) # 'bar5@@zed'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000001) # 'defined1'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x0000000a) # 'defined2'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 7
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0003)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 8
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0004)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 9
-// CHECK-NEXT: (('st_name', 0x0000004a) # 'g1@@zed'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000014)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 10
-// CHECK-NEXT: (('st_name', 0x00000042) # 'global1'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000014)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 11
-// CHECK-NEXT: (('st_name', 0x0000001c) # 'bar2@zed'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 12
-// CHECK-NEXT: (('st_name', 0x00000039) # 'bar6@zed'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT:])
+// CHECK: Symbol {
+// CHECK: Name: bar1@zed (19)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar3@@zed (37)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar5@@zed (47)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: defined1 (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: defined2 (10)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .text (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .data (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .data (0x3)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .bss (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .bss (0x4)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: g1@@zed (74)
+// CHECK-NEXT: Value: 0x14
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: global1 (66)
+// CHECK-NEXT: Value: 0x14
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar2@zed (28)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar6@zed (57)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/tls-i386.s b/test/MC/ELF/tls-i386.s
index 922d4c6e6c..267046ef5b 100644
--- a/test/MC/ELF/tls-i386.s
+++ b/test/MC/ELF/tls-i386.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that all symbols are of type STT_TLS.
@@ -17,129 +17,129 @@
.long fooD@DTPOFF
.long fooE@INDNTPOFF
-// CHECK: (('st_name', 0x00000001) # 'foo1'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000006) # 'foo2'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 7
-// CHECK-NEXT: (('st_name', 0x0000000b) # 'foo3'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 8
-// CHECK-NEXT: (('st_name', 0x00000010) # 'foo4'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 9
-// CHECK-NEXT: (('st_name', 0x00000015) # 'foo5'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 10
-// CHECK-NEXT: (('st_name', 0x0000001a) # 'foo6'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 11
-// CHECK-NEXT: (('st_name', 0x0000001f) # 'foo7'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 12
-// CHECK-NEXT: (('st_name', 0x00000024) # 'foo8'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 13
-// CHECK-NEXT: (('st_name', 0x00000029) # 'foo9'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 14
-// CHECK-NEXT: (('st_name', 0x0000002e) # 'fooA'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 15
-// CHECK-NEXT: (('st_name', 0x00000033) # 'fooB'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 16
-// CHECK-NEXT: (('st_name', 0x00000038) # 'fooC'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 17
-// CHECK-NEXT: (('st_name', 0x0000003d) # 'fooD'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 18
-// CHECK-NEXT: (('st_name', 0x00000042) # 'fooE'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ),
-
+// CHECK: Symbol {
+// CHECK: Name: foo1 (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo2 (6)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo3 (11)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo4 (16)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo5 (21)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo6 (26)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo7 (31)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo8 (36)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo9 (41)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: fooA (46)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: fooB (51)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: fooC (56)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: fooD (61)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: fooE (66)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/tls.s b/test/MC/ELF/tls.s
index fe2bb4e733..c71e3962bb 100644
--- a/test/MC/ELF/tls.s
+++ b/test/MC/ELF/tls.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that all symbols are of type STT_TLS.
@@ -12,66 +12,67 @@
foobar:
.long 43
-// CHECK: (('st_name', 0x0000001f) # 'foobar'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0005)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: foobar (31)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .zed (0x5)
+// CHECK-NEXT: }
-// CHECK: # Symbol 7
-// CHECK-NEXT: (('st_name', 0x00000001) # 'foo1'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 8
-// CHECK-NEXT: (('st_name', 0x00000006) # 'foo2'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 9
-// CHECK-NEXT: (('st_name', 0x0000000b) # 'foo3'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 10
-// CHECK-NEXT: (('st_name', 0x00000010) # 'foo4'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 11
-// CHECK-NEXT: (('st_name', 0x00000015) # 'foo5'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 12
-// CHECK-NEXT: (('st_name', 0x0000001a) # 'foo6'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbol {
+// CHECK: Name: foo1 (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo2 (6)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo3 (11)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo4 (16)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo5 (21)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo6 (26)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/type.s b/test/MC/ELF/type.s
index 00277ce9c4..a5b98129c9 100644
--- a/test/MC/ELF/type.s
+++ b/test/MC/ELF/type.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that both % and @ are accepted.
.global foo
@@ -25,57 +25,63 @@ func:
ifunc:
.global ifunc
.type ifunc,@gnu_indirect_function
- .type ifunc,@function
tls:
.global tls
.type tls,@tls_object
.type tls,@gnu_indirect_function
-// CHECK: (('st_name', {{.*}}) # 'bar'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-
-// CHECK: (('st_name', {{.*}}) # 'foo'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x2)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-
-// CHECK: (('st_name', {{.*}}) # 'func'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x2)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-
-// CHECK: (('st_name', {{.*}}) # 'ifunc'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0xa)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-
-// CHECK: (('st_name', {{.*}}) # 'obj'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-
-// CHECK: (('st_name', {{.*}}) # 'tls'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x6)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
+// CHECK: Symbol {
+// CHECK: Name: bar
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Function
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: func
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Function
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: ifunc
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: GNU_IFunc
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: obj
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: tls
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: TLS
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/uleb.s b/test/MC/ELF/uleb.s
index 1e4734bcaf..d755cc23e3 100644
--- a/test/MC/ELF/uleb.s
+++ b/test/MC/ELF/uleb.s
@@ -1,5 +1,5 @@
-// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_32 %s
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=ELF_64 %s
+// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_32 %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck -check-prefix=ELF_64 %s
// RUN: llvm-mc -filetype=obj -triple i386-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_32 %s
// RUN: llvm-mc -filetype=obj -triple x86_64-apple-darwin9 %s -o - | macho-dump --dump-section-data | FileCheck -check-prefix=MACHO_64 %s
@@ -12,10 +12,14 @@ foo:
.uleb128 16383
.uleb128 16384
-// ELF_32: ('sh_name', 0x00000001) # '.text'
-// ELF_32: ('_section_data', '00017f80 01ff7f80 8001')
-// ELF_64: ('sh_name', 0x00000001) # '.text'
-// ELF_64: ('_section_data', '00017f80 01ff7f80 8001')
+// ELF_32: Name: .text
+// ELF_32: SectionData (
+// ELF_32: 0000: 00017F80 01FF7F80 8001
+// ELF_32: )
+// ELF_64: Name: .text
+// ELF_64: SectionData (
+// ELF_64: 0000: 00017F80 01FF7F80 8001
+// ELF_64: )
// MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001')
// MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
diff --git a/test/MC/ELF/undef.s b/test/MC/ELF/undef.s
index e377c63317..0d89fb1293 100644
--- a/test/MC/ELF/undef.s
+++ b/test/MC/ELF/undef.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test which symbols should be in the symbol table
@@ -19,28 +19,21 @@
.text
movsd .Lsym8(%rip), %xmm1
-// CHECK: ('_symbols', [
-// CHECK-NEXT: # Symbol 0
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x0000000d) # '.Lsym8'
-// CHECK: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 3
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000001) # '.Lsym1'
-// CHECK: # Symbol 7
-// CHECK-NEXT: (('st_name', 0x00000008) # 'sym6'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x1)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: Symbols [
+
+// CHECK: Symbol {
+// CHECK: Name: .Lsym8
+
+// CHECK: Symbol {
+// CHECK: Name: .Lsym1
+
+// CHECK: Symbol {
+// CHECK: Name: sym6
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/undef2.s b/test/MC/ELF/undef2.s
index 6f971c55bf..6aa66c05c4 100644
--- a/test/MC/ELF/undef2.s
+++ b/test/MC/ELF/undef2.s
@@ -1,10 +1,18 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -t | FileCheck %s
// Test that this produces an undefined reference to .Lfoo
je .Lfoo
-// CHECK: ('_symbols', [
-// CHECK: (('st_name', 0x00000001) # '.Lfoo'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK: (('sh_name', 0x0000001b) # '.strtab'
+// CHECK: Section {
+// CHECK: Name: .strtab
+
+// CHECK: Symbol {
+// CHECK: Name: .Lfoo
+// CHECK-NEXT: Value:
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type:
+// CHECK-NEXT: Other:
+// CHECK-NEXT: Section:
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/version.s b/test/MC/ELF/version.s
index 31e952afeb..0bc9c8b7a7 100644
--- a/test/MC/ELF/version.s
+++ b/test/MC/ELF/version.s
@@ -1,17 +1,23 @@
-// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
.version "1234"
.version "123"
-// CHECK: (('sh_name', 0x0000000c) # '.note'
-// CHECK-NEXT: ('sh_type', 0x00000007)
-// CHECK-NEXT: ('sh_flags', 0x00000000)
-// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000034)
-// CHECK-NEXT: ('sh_size', 0x00000024)
-// CHECK-NEXT: ('sh_link', 0x00000000)
-// CHECK-NEXT: ('sh_info', 0x00000000)
-// CHECK-NEXT: ('sh_addralign', 0x00000004)
-// CHECK-NEXT: ('sh_entsize', 0x00000000)
-// CHECK-NEXT: ('_section_data', '05000000 00000000 01000000 31323334 00000000 04000000 00000000 01000000 31323300')
-// CHECK-NEXT: ),
+// CHECK: Section {
+// CHECK: Name: .note
+// CHECK-NEXT: Type: SHT_NOTE
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x34
+// CHECK-NEXT: Size: 36
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 05000000 00000000 01000000 31323334
+// CHECK-NEXT: 0010: 00000000 04000000 00000000 01000000
+// CHECK-NEXT: 0020: 31323300
+// CHECK-NEXT: )
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/weak-relocation.s b/test/MC/ELF/weak-relocation.s
index 88e841e65b..0f5bba2383 100644
--- a/test/MC/ELF/weak-relocation.s
+++ b/test/MC/ELF/weak-relocation.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r | FileCheck %s
// Test that weak symbols always produce relocations
@@ -7,9 +7,8 @@ foo:
bar:
call foo
-//CHECK: # Relocation 0
-//CHECK-NEXT: (('r_offset', 0x0000000000000001)
-//CHECK-NEXT: ('r_sym', 0x00000005)
-//CHECK-NEXT: ('r_type', 0x00000002)
-//CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-//CHECK-NEXT: ),
+// CHECK: Relocations [
+// CHECK-NEXT: Section ({{[0-9]+}}) .text {
+// CHECK-NEXT: 0x1 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/weak.s b/test/MC/ELF/weak.s
index 07a8391363..2ed3eb7b2b 100644
--- a/test/MC/ELF/weak.s
+++ b/test/MC/ELF/weak.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// Test that this produces a weak undefined symbol.
@@ -9,22 +9,22 @@
.weak bar
bar:
-//CHECK: # Symbol 4
-//CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
-//CHECK-NEXT: ('st_bind', 0x2)
-//CHECK-NEXT: ('st_type', 0x0)
-//CHECK-NEXT: ('st_other', 0x00)
-//CHECK-NEXT: ('st_shndx', 0x0001)
-//CHECK-NEXT: ('st_value', 0x0000000000000004)
-//CHECK-NEXT: ('st_size', 0x0000000000000000)
-//CHECK-NEXT: ),
-//CHECK-NEXT: # Symbol 5
-//CHECK: (('st_name', 0x00000001) # 'foo'
-//CHECK-NEXT: ('st_bind', 0x2)
-//CHECK-NEXT: ('st_type', 0x0)
-//CHECK-NEXT: ('st_other', 0x00)
-//CHECK-NEXT: ('st_shndx', 0x0000)
-//CHECK-NEXT: ('st_value', 0x0000000000000000)
-//CHECK-NEXT: ('st_size', 0x0000000000000000)
-//CHECK-NEXT: ),
-//CHECK-NEXT: ])
+// CHECK: Symbol {
+// CHECK: Name: bar
+// CHECK-NEXT: Value: 0x4
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Weak
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text
+// CHECK-NEXT: }
+// CHECK: Symbol {
+// CHECK: Name: foo
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Weak
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/weakref-plt.s b/test/MC/ELF/weakref-plt.s
index 2e500935b6..d6486dcd52 100644
--- a/test/MC/ELF/weakref-plt.s
+++ b/test/MC/ELF/weakref-plt.s
@@ -1,8 +1,14 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
.weakref bar,foo
call bar@PLT
-// CHECK: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
-// CHECK-NEXT: ('st_bind', 0x2)
+// CHECK: Symbol {
+// CHECK: Name: foo
+// CHECK-NEXT: Value:
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Binding: Weak
+// CHECK-NEXT: Type:
+// CHECK-NEXT: Other:
+// CHECK-NEXT: Section:
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/weakref-reloc.s b/test/MC/ELF/weakref-reloc.s
index 4bbf2645a8..48bda8748f 100644
--- a/test/MC/ELF/weakref-reloc.s
+++ b/test/MC/ELF/weakref-reloc.s
@@ -1,49 +1,44 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
// Test that the relocations point to the correct symbols. We used to get the
// symbol index wrong for weakrefs when creating _GLOBAL_OFFSET_TABLE_.
- .weakref bar,foo
+ .weakref bar,foo
call zed@PLT
- call bar
+ call bar
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 0x0000000000000001)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000004)
-// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 1
-// CHECK-NEXT: (('r_offset', 0x0000000000000006)
-// CHECK-NEXT: ('r_sym', 0x00000005)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0xfffffffffffffffc)
-// CHECK-NEXT: ),
+// CHECK: Relocations [
+// CHECK-NEXT: Section ({{[0-9]+}}) {{[^ ]+}} {
+// CHECK-NEXT: 0x1 R_X86_64_PLT32 zed 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: 0x6 R_X86_64_PC32 foo 0xFFFFFFFFFFFFFFFC
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
-// CHECK: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000009) # '_GLOBAL_OFFSET_TABLE_'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
-// CHECK-NEXT: ('st_bind', 0x2)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000005) # 'zed'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
+// CHECK: Symbols [
+// CHECK: Symbol {
+// CHECK: Name: _GLOBAL_OFFSET_TABLE_ (9)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: foo (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Weak
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: zed (5)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
diff --git a/test/MC/ELF/weakref.s b/test/MC/ELF/weakref.s
index e12d2c74eb..87173641b5 100644
--- a/test/MC/ELF/weakref.s
+++ b/test/MC/ELF/weakref.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
// This is a long test that checks that the aliases created by weakref are
// never in the symbol table and that the only case it causes a symbol to
@@ -69,166 +69,158 @@ bar15:
.long bar15
.long foo15
-// CHECK: # Symbol 0
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 1
-// CHECK-NEXT: (('st_name', 0x00000015) # 'bar6'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000018)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 2
-// CHECK-NEXT: (('st_name', 0x0000001a) # 'bar7'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000018)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 3
-// CHECK-NEXT: (('st_name', 0x0000001f) # 'bar8'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x000000000000001c)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 4
-// CHECK-NEXT: (('st_name', 0x00000024) # 'bar9'
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000020)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 5
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 6
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0003)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 7
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x0)
-// CHECK-NEXT: ('st_type', 0x3)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0004)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 8
-// CHECK-NEXT: (('st_name', 0x00000029) # 'bar10'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000028)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 9
-// CHECK-NEXT: (('st_name', 0x0000002f) # 'bar11'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000030)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 10
-// CHECK-NEXT: (('st_name', 0x00000035) # 'bar12'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000030)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 11
-// CHECK-NEXT: (('st_name', 0x0000003b) # 'bar13'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000034)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 12
-// CHECK-NEXT: (('st_name', 0x00000041) # 'bar14'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000038)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 13
-// CHECK-NEXT: (('st_name', 0x00000047) # 'bar15'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0001)
-// CHECK-NEXT: ('st_value', 0x0000000000000040)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 14
-// CHECK-NEXT: (('st_name', 0x00000001) # 'bar2'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 15
-// CHECK-NEXT: (('st_name', 0x00000006) # 'bar3'
-// CHECK-NEXT: ('st_bind', 0x2)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 16
-// CHECK-NEXT: (('st_name', 0x0000000b) # 'bar4'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 17
-// CHECK-NEXT: (('st_name', 0x00000010) # 'bar5'
-// CHECK-NEXT: ('st_bind', 0x1)
-// CHECK-NEXT: ('st_type', 0x0)
-// CHECK-NEXT: ('st_other', 0x00)
-// CHECK-NEXT: ('st_shndx', 0x0000)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
+// CHECK: Symbols [
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar6 (21)
+// CHECK-NEXT: Value: 0x18
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar7 (26)
+// CHECK-NEXT: Value: 0x18
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar8 (31)
+// CHECK-NEXT: Value: 0x1C
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar9 (36)
+// CHECK-NEXT: Value: 0x20
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .text (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .data (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .data (0x3)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: .bss (0)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Local
+// CHECK-NEXT: Type: Section
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .bss (0x4)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar10 (41)
+// CHECK-NEXT: Value: 0x28
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar11 (47)
+// CHECK-NEXT: Value: 0x30
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar12 (53)
+// CHECK-NEXT: Value: 0x30
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar13 (59)
+// CHECK-NEXT: Value: 0x34
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar14 (65)
+// CHECK-NEXT: Value: 0x38
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar15 (71)
+// CHECK-NEXT: Value: 0x40
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar2 (1)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar3 (6)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Weak
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar4 (11)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: bar5 (16)
+// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: (0x0)
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/x86_64-reloc-sizetest.s b/test/MC/ELF/x86_64-reloc-sizetest.s
index acca2f5076..bd67ee0f9d 100644
--- a/test/MC/ELF/x86_64-reloc-sizetest.s
+++ b/test/MC/ELF/x86_64-reloc-sizetest.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-linux-gnu -filetype=obj %s | elf-dump | FileCheck %s
+// RUN: llvm-mc -triple x86_64-linux-gnu -filetype=obj %s | llvm-readobj -r | FileCheck %s
// Tests that relocation value fits in the provided size
// Original bug http://llvm.org/bugs/show_bug.cgi?id=10568
@@ -6,8 +6,8 @@
L: movq $(L + 2147483648),%rax
-// CHECK: Relocation 0
-// CHECK-NEXT: ('r_offset', 0x0000000000000003)
-// CHECK-NEXT: ('r_sym'
-// CHECK-NEXT: ('r_type', 0x0000000b)
-// CHECK-NEXT: ('r_addend', 0x0000000080000000
+// CHECK: Relocations [
+// CHECK-NEXT: Section ({{[0-9]+}}) .text {
+// CHECK-NEXT: 0x3 R_X86_64_32S {{[^ ]+}} 0x80000000
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
diff --git a/test/MC/ELF/zero.s b/test/MC/ELF/zero.s
index 46ffe17cfb..be92eb839e 100644
--- a/test/MC/ELF/zero.s
+++ b/test/MC/ELF/zero.s
@@ -1,16 +1,23 @@
-// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s -sd | FileCheck %s
.zero 4
.zero 1,42
-// CHECK: ('sh_name', 0x00000001) # '.text'
-// CHECK: ('sh_type', 0x00000001)
-// CHECK: ('sh_flags', 0x0000000000000006)
-// CHECK: ('sh_addr', 0x0000000000000000)
-// CHECK: ('sh_offset', 0x0000000000000040)
-// CHECK: ('sh_size', 0x0000000000000005)
-// CHECK: ('sh_link', 0x00000000)
-// CHECK: ('sh_info', 0x00000000)
-// CHECK: ('sh_addralign', 0x0000000000000004)
-// CHECK: ('sh_entsize', 0x0000000000000000)
-// CHECK: ('_section_data', '00000000 2a')
+// CHECK: Section {
+// CHECK: Name: .text
+// CHECK-NEXT: Type: SHT_PROGBITS
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: SHF_EXECINSTR
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address: 0x0
+// CHECK-NEXT: Offset: 0x40
+// CHECK-NEXT: Size: 5
+// CHECK-NEXT: Link: 0
+// CHECK-NEXT: Info: 0
+// CHECK-NEXT: AddressAlignment: 4
+// CHECK-NEXT: EntrySize: 0
+// CHECK-NEXT: SectionData (
+// CHECK-NEXT: 0000: 00000000 2A
+// CHECK-NEXT: )
+// CHECK-NEXT: }
diff --git a/test/MC/Mips/elf-N64.ll b/test/MC/Mips/elf-N64.ll
index ae6de78d65..a1ea34a80a 100644
--- a/test/MC/Mips/elf-N64.ll
+++ b/test/MC/Mips/elf-N64.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -disable-mips-delay-filler %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 -disable-mips-delay-filler %s -o - | llvm-readobj -r | FileCheck %s
; Check for N64 relocation production.
;
@@ -12,25 +12,12 @@ define i32 @main() nounwind {
entry:
; Check that the appropriate relocations were created.
-; R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16
-; CHECK: ('r_type3', 0x05)
-; CHECK-NEXT: ('r_type2', 0x18)
-; CHECK-NEXT: ('r_type', 0x07)
-
-; R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16
-; CHECK: ('r_type3', 0x06)
-; CHECK-NEXT: ('r_type2', 0x18)
-; CHECK-NEXT: ('r_type', 0x07)
-
-; R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE
-; CHECK: ('r_type3', 0x00)
-; CHECK-NEXT: ('r_type2', 0x00)
-; CHECK-NEXT: ('r_type', 0x14)
-
-; R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE
-; CHECK: ('r_type3', 0x00)
-; CHECK-NEXT: ('r_type2', 0x00)
-; CHECK-NEXT: ('r_type', 0x15)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_PAGE/R_MIPS_NONE/R_MIPS_NONE
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE
+; CHECK: ]
%puts = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @str, i64 0, i64 0))
ret i32 0
diff --git a/test/MC/Mips/elf-bigendian.ll b/test/MC/Mips/elf-bigendian.ll
index 7111debd11..a92fe339f8 100644
--- a/test/MC/Mips/elf-bigendian.ll
+++ b/test/MC/Mips/elf-bigendian.ll
@@ -1,24 +1,37 @@
-; DISABLE: llc -filetype=obj -mtriple mips-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; DISABLE: llc -filetype=obj -mtriple mips-unknown-linux %s -o - | llvm-readobj -h -s -sd | FileCheck %s
; RUN: false
; XFAIL: *
; Check that this is big endian.
-; CHECK: ('e_indent[EI_DATA]', 0x02)
+; CHECK: ElfHeader {
+; CHECK: Ident {
+; CHECK: DataEncoding: BigEndian
+; CHECK: }
+; CHECK: }
; Make sure that a section table (text) entry is correct.
-; CHECK: (('sh_name', 0x{{[0]*}}5) # '.text'
-; CHECK-NEXT: ('sh_type', 0x{{[0]*}}1)
-; CHECK-NEXT: ('sh_flags', 0x{{[0]*}}6)
-; CHECK-NEXT: ('sh_addr', 0x{{[0-9,a-f]+}})
-; CHECK-NEXT: ('sh_offset', 0x{{[0-9,a-f]+}})
-; CHECK-NEXT: ('sh_size', 0x{{[0-9,a-f]+}})
-; CHECK-NEXT: ('sh_link', 0x{{[0]+}})
-; CHECK-NEXT: ('sh_info', 0x{{[0]+}})
-; CHECK-NEXT: ('sh_addralign', 0x{{[0]*}}4)
-; CHECK-NEXT: ('sh_entsize', 0x{{[0]+}})
+; CHECK: Sections [
+; CHECK: Section {
+; CHECK: Index:
+; CHECK: Name: .text
+; CHECK-NEXT: Type: SHT_PROGBITS
+; CHECK-NEXT: Flags [ (0x6)
+; CHECK-NEXT: SHF_ALLOC
+; CHECK-NEXT: SHF_EXECINSTR
+; CHECK-NEXT: ]
+; CHECK-NEXT: Address: 0x{{[0-9,A-F]+}}
+; CHECK-NEXT: Offset: 0x{{[0-9,A-F]+}}
+; CHECK-NEXT: Size: {{[0-9]+}}
+; CHECK-NEXT: Link: 0
+; CHECK-NEXT: Info: 0
+; CHECK-NEXT: AddressAlignment: 4
+; CHECK-NEXT: EntrySize: 0
; See that at least first 3 instructions are correct: GP prologue
-; CHECK-NEXT: ('_section_data', '3c1c0000 279c0000 0399e021 {{[0-9,a-f, ]*}}')
+; CHECK-NEXT: SectionData (
+; CHECK-NEXT: 0000: 3C1C0000 279C0000 0399E021 {{[0-9,A-F, ]*}}
+; CHECK: )
+; CHECK: }
; ModuleID = '../br1.c'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32"
diff --git a/test/MC/Mips/elf-gprel-32-64.ll b/test/MC/Mips/elf-gprel-32-64.ll
index b94682214d..47003fa1e7 100644
--- a/test/MC/Mips/elf-gprel-32-64.ll
+++ b/test/MC/Mips/elf-gprel-32-64.ll
@@ -1,5 +1,5 @@
; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 %s -o - \
-; RUN: | elf-dump --dump-section-data \
+; RUN: | llvm-readobj -r \
; RUN: | FileCheck %s
define i32 @test(i32 %c) nounwind {
@@ -30,8 +30,11 @@ return:
; Check that the appropriate relocations were created.
; R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
-; CHECK: (('sh_name', 0x{{[a-z0-9]+}}) # '.rela.rodata'
-; CHECK: ('r_type3', 0x00)
-; CHECK-NEXT: ('r_type2', 0x12)
-; CHECK-NEXT: ('r_type', 0x0c)
-
+; CHECK: Relocations [
+; CHECK: Section ({{[a-z0-9]+}}) .rodata {
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
+; CHECK-NEXT: }
+; CHECK-NEXT: ]
diff --git a/test/MC/Mips/elf-reginfo.ll b/test/MC/Mips/elf-reginfo.ll
index 1d7a18866c..a255af931d 100644
--- a/test/MC/Mips/elf-reginfo.ll
+++ b/test/MC/Mips/elf-reginfo.ll
@@ -1,7 +1,7 @@
; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 %s -o - \
- ; RUN: | elf-dump --dump-section-data | FileCheck --check-prefix=CHECK_64 %s
+ ; RUN: | llvm-readobj -s | FileCheck --check-prefix=CHECK_64 %s
; RUN: llc -filetype=obj -march=mipsel -mcpu=mips32 %s -o - \
- ; RUN: | elf-dump --dump-section-data | FileCheck --check-prefix=CHECK_32 %s
+ ; RUN: | llvm-readobj -s | FileCheck --check-prefix=CHECK_32 %s
; Check for register information sections.
;
@@ -13,14 +13,18 @@ entry:
; Check that the appropriate relocations were created.
; check for .MIPS.options
-; CHECK_64: (('sh_name', 0x{{[0-9|a-f]+}}) # '.MIPS.options'
-; CHECK_64-NEXT: ('sh_type', 0x7000000d)
-; CHECK_64-NEXT: ('sh_flags', 0x0000000008000002)
+; CHECK_64: Sections [
+; CHECK_64: Section {
+; CHECK_64: Name: .MIPS.options
+; CHECK_64-NEXT: Type: SHT_MIPS_OPTIONS
+; CHECK_64-NEXT: Flags [ (0x8000002)
; check for .reginfo
-; CHECK_32: (('sh_name', 0x{{[0-9|a-f]+}}) # '.reginfo'
-; CHECK_32-NEXT: ('sh_type', 0x70000006)
-; CHECK_32-NEXT: ('sh_flags', 0x00000002)
+; CHECK_32: Sections [
+; CHECK_32: Section {
+; CHECK_32: Name: .reginfo
+; CHECK_32-NEXT: Type: SHT_MIPS_REGINFO
+; CHECK_32-NEXT: Flags [ (0x2)
%puts = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @str, i64 0, i64 0))
@@ -28,4 +32,3 @@ entry:
}
declare i32 @puts(i8* nocapture) nounwind
-
diff --git a/test/MC/Mips/elf-relsym.ll b/test/MC/Mips/elf-relsym.ll
index 0f74437ec5..6da926273a 100644
--- a/test/MC/Mips/elf-relsym.ll
+++ b/test/MC/Mips/elf-relsym.ll
@@ -1,11 +1,21 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -t | FileCheck %s
; Check that the appropriate symbols were created.
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$.str'
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$.str1'
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$CPI0_0'
-; CHECK: (('st_name', 0x{{[0-9|a-f]+}}) # '$CPI0_1'
+; CHECK: Symbols [
+; CHECK: Symbol {
+; CHECK: Name: $.str
+; CHECK: }
+; CHECK: Symbol {
+; CHECK: Name: $.str1
+; CHECK: }
+; CHECK: Symbol {
+; CHECK: Name: $CPI0_0
+; CHECK: }
+; CHECK: Symbol {
+; CHECK: Name: $CPI0_1
+; CHECK: }
+; CHECK: ]
@.str = private unnamed_addr constant [6 x i8] c"abcde\00", align 1
@gc1 = external global i8*
diff --git a/test/MC/Mips/elf-tls.ll b/test/MC/Mips/elf-tls.ll
index b4183b8357..9f604e00a0 100644
--- a/test/MC/Mips/elf-tls.ll
+++ b/test/MC/Mips/elf-tls.ll
@@ -1,10 +1,14 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -r | FileCheck %s
; Check that the appropriate relocations were created.
-; CHECK: ('r_type', 0x2b)
-; CHECK: ('r_type', 0x2c)
-; CHECK: ('r_type', 0x2d)
+; CHECK: Relocations [
+; CHECK: Section (1) .text {
+; CHECK: R_MIPS_TLS_LDM
+; CHECK: R_MIPS_TLS_DTPREL_HI16
+; CHECK: R_MIPS_TLS_DTPREL_LO16
+; CHECK: }
+; CHECK: ]
@t1 = thread_local global i32 0, align 4
diff --git a/test/MC/Mips/elf_basic.s b/test/MC/Mips/elf_basic.s
index ffc3b112e5..6c1e769012 100644
--- a/test/MC/Mips/elf_basic.s
+++ b/test/MC/Mips/elf_basic.s
@@ -1,35 +1,41 @@
// 32 bit big endian
-// RUN: llvm-mc -filetype=obj -triple mips-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32 %s
+// RUN: llvm-mc -filetype=obj -triple mips-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32 %s
// 32 bit little endian
-// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE32 %s
+// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-LE32 %s
// 64 bit big endian
-// RUN: llvm-mc -filetype=obj -arch=mips64 -triple mips64-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64 %s
+// RUN: llvm-mc -filetype=obj -arch=mips64 -triple mips64-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64 %s
// 64 bit little endian
-// RUN: llvm-mc -filetype=obj -arch=mips64el -triple mips64el-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE64 %s
+// RUN: llvm-mc -filetype=obj -arch=mips64el -triple mips64el-unknown-linux %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-LE64 %s
// Check that we produce 32 bit with each endian.
-// This is 32 bit.
-// CHECK-BE32: ('e_indent[EI_CLASS]', 0x01)
-// This is big endian.
-// CHECK-BE32: ('e_indent[EI_DATA]', 0x02)
+// CHECK-BE32: ElfHeader {
+// CHECK-BE32: Ident {
+// CHECK-BE32: Class: 32-bit
+// CHECK-BE32: DataEncoding: BigEndian
+// CHECK-BE32: }
+// CHECK-BE32: }
-// This is 32 bit.
-// CHECK-LE32: ('e_indent[EI_CLASS]', 0x01)
-// This is little endian.
-// CHECK-LE32: ('e_indent[EI_DATA]', 0x01)
+// CHECK-LE32: ElfHeader {
+// CHECK-LE32: Ident {
+// CHECK-LE32: Class: 32-bit
+// CHECK-LE32: DataEncoding: LittleEndian
+// CHECK-LE32: }
+// CHECK-LE32: }
// Check that we produce 64 bit with each endian.
-// This is 64 bit.
-// CHECK-BE64: ('e_indent[EI_CLASS]', 0x02)
-// This is big endian.
-// CHECK-BE64: ('e_indent[EI_DATA]', 0x02)
+// CHECK-BE64: ElfHeader {
+// CHECK-BE64: Ident {
+// CHECK-BE64: Class: 64-bit
+// CHECK-BE64: DataEncoding: BigEndian
+// CHECK-BE64: }
+// CHECK-BE64: }
-// This is 64 bit.
-// CHECK-LE64: ('e_indent[EI_CLASS]', 0x02)
-// This is little endian.
-// CHECK-LE64: ('e_indent[EI_DATA]', 0x01)
-
-// Check that we are setting EI_OSABI to ELFOSABI_LINUX.
-// CHECK-LE64: ('e_indent[EI_OSABI]', 0x03)
+// CHECK-LE64: ElfHeader {
+// CHECK-LE64: Ident {
+// CHECK-LE64: Class: 64-bit
+// CHECK-LE64: DataEncoding: LittleEndian
+// CHECK-LE64: OS/ABI: GNU/Linux
+// CHECK-LE64: }
+// CHECK-LE64: }
diff --git a/test/MC/Mips/elf_eflags.ll b/test/MC/Mips/elf_eflags.ll
index 315cb812bf..6d16a42aca 100644
--- a/test/MC/Mips/elf_eflags.ll
+++ b/test/MC/Mips/elf_eflags.ll
@@ -13,52 +13,52 @@
; EF_MIPS_ARCH_32R2 (0x70000000)
; EF_MIPS_ARCH_64R2 (0x80000000)
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE32R2-MICROMIPS_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64R2 %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-BE64R2_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64_PIC %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64R2 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-BE64R2_PIC %s
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | elf-dump --dump-section-data | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | llvm-readobj -h | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
; 32(R1) bit with NO_REORDER and static
-; CHECK-BE32: ('e_flags', 0x50001001)
+; CHECK-BE32: Flags [ (0x50001001)
;
; 32(R1) bit with NO_REORDER and PIC
-; CHECK-BE32_PIC: ('e_flags', 0x50001003)
+; CHECK-BE32_PIC: Flags [ (0x50001003)
;
; 32R2 bit with NO_REORDER and static
-; CHECK-BE32R2: ('e_flags', 0x70001001)
+; CHECK-BE32R2: Flags [ (0x70001001)
;
; 32R2 bit with NO_REORDER and PIC
-; CHECK-BE32R2_PIC: ('e_flags', 0x70001003)
+; CHECK-BE32R2_PIC: Flags [ (0x70001003)
;
; 32R2 bit MICROMIPS with NO_REORDER and static
-; CHECK-BE32R2-MICROMIPS: ('e_flags', 0x72001001)
+; CHECK-BE32R2-MICROMIPS: Flags [ (0x72001001)
;
; 32R2 bit MICROMIPS with NO_REORDER and PIC
-;CHECK-BE32R2-MICROMIPS_PIC: ('e_flags', 0x72001003)
+;CHECK-BE32R2-MICROMIPS_PIC: Flags [ (0x72001003)
;
; 64(R1) bit with NO_REORDER and static
-; CHECK-BE64: ('e_flags', 0x60000001)
+; CHECK-BE64: Flags [ (0x60000001)
;
; 64(R1) bit with NO_REORDER and PIC
-; CHECK-BE64_PIC: ('e_flags', 0x60000003)
+; CHECK-BE64_PIC: Flags [ (0x60000003)
;
; 64R2 bit with NO_REORDER and static
-; CHECK-BE64R2: ('e_flags', 0x80000001)
+; CHECK-BE64R2: Flags [ (0x80000001)
;
; 64R2 bit with NO_REORDER and PIC
-; CHECK-BE64R2_PIC: ('e_flags', 0x80000003)
+; CHECK-BE64R2_PIC: Flags [ (0x80000003)
;
; 32R2 bit MIPS16 with PIC
-; CHECK-LE32R2-MIPS16: ('e_flags', 0x74001002)
+; CHECK-LE32R2-MIPS16: Flags [ (0x74001002)
define i32 @main() nounwind {
entry:
diff --git a/test/MC/Mips/elf_st_other.ll b/test/MC/Mips/elf_st_other.ll
index f188ce7ba3..bc56c0033e 100644
--- a/test/MC/Mips/elf_st_other.ll
+++ b/test/MC/Mips/elf_st_other.ll
@@ -1,13 +1,12 @@
; This tests value of ELF st_other field for function symbol table entries.
; For microMIPS value should be equal to STO_MIPS_MICROMIPS.
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | llvm-readobj -t | FileCheck %s
define i32 @main() nounwind {
entry:
ret i32 0
}
-; CHECK: 'main'
-; CHECK: ('st_other', 0x80)
-
+; CHECK: Name: main
+; CHECK: Other: 128
diff --git a/test/MC/Mips/higher_highest.ll b/test/MC/Mips/higher_highest.ll
index 0c66522033..6c3d71f6a4 100644
--- a/test/MC/Mips/higher_highest.ll
+++ b/test/MC/Mips/higher_highest.ll
@@ -1,14 +1,16 @@
-; DISABLE: llc -march=mips64el -mcpu=mips64 -mattr=n64 -force-mips-long-branch -filetype=obj < %s -o - | elf-dump --dump-section-data | FileCheck %s
+; DISABLE: llc -march=mips64el -mcpu=mips64 -mattr=n64 -force-mips-long-branch -filetype=obj < %s -o - | llvm-readobj -r | FileCheck %s
; RUN: false
; XFAIL: *
; Disabled because currently we don't have a way to generate these relocations.
;
; Check that the R_MIPS_HIGHER and R_MIPS_HIGHEST relocations were created.
-; CHECK: ('r_type', 0x1d)
-; CHECK: ('r_type', 0x1d)
-; CHECK: ('r_type', 0x1c)
-; CHECK: ('r_type', 0x1c)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHEST
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHEST
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHER
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HIGHER
+; CHECK: ]
@g0 = external global i32
diff --git a/test/MC/Mips/r-mips-got-disp.ll b/test/MC/Mips/r-mips-got-disp.ll
index 73396ac513..7e78a46649 100644
--- a/test/MC/Mips/r-mips-got-disp.ll
+++ b/test/MC/Mips/r-mips-got-disp.ll
@@ -1,8 +1,9 @@
-; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 < %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 < %s -o - | llvm-readobj -r | FileCheck %s
; Check that the R_MIPS_GOT_DISP relocations were created.
-; CHECK: ('r_type', 0x13)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_DISP
@shl = global i64 1, align 8
@.str = private unnamed_addr constant [8 x i8] c"0x%llx\0A\00", align 1
diff --git a/test/MC/Mips/sym-offset.ll b/test/MC/Mips/sym-offset.ll
index 5162c913ad..c7450f74ae 100644
--- a/test/MC/Mips/sym-offset.ll
+++ b/test/MC/Mips/sym-offset.ll
@@ -1,4 +1,4 @@
-; DISABLED: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | elf-dump --dump-section-data | FileCheck %s
+; DISABLED: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -s -sd | FileCheck %s
; RUN: false
; XFAIL: *
@@ -13,7 +13,9 @@ entry:
; 8841000e lwl at,14(v0)
; 9841000b lwr at,11(v0)
-; CHECK: ('_section_data', '00001c3c 00009c27 21e09903 0000828f 0e004188 0b004198
+; CHECK: SectionData (
+; CHECK: 0000: 00001C3C 00009C27 21E09903 0000828F
+; CHECK-NEXT: 0010: 0E004188 0B004198
%call = tail call i32 @memcmp(i8* getelementptr inbounds ([11 x i8]* @string1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @string2, i32 0, i32 0), i32 4) nounwind readonly
%cmp = icmp eq i32 %call, 0
diff --git a/test/MC/Mips/xgot.ll b/test/MC/Mips/xgot.ll
index bfe9b9ad66..e2a500ffde 100644
--- a/test/MC/Mips/xgot.ll
+++ b/test/MC/Mips/xgot.ll
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | elf-dump --dump-section-data | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | llvm-readobj -r | FileCheck %s
@.str = private unnamed_addr constant [16 x i8] c"ext_1=%d, i=%d\0A\00", align 1
@ext_1 = external global i32
@@ -9,29 +9,16 @@ entry:
; Check that the appropriate relocations were created.
; For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16.
-; R_MIPS_HI16
-; CHECK: ('r_type', 0x05)
-
-; R_MIPS_LO16
-; CHECK: ('r_type', 0x06)
-
-; R_MIPS_GOT_HI16
-; CHECK: ('r_type', 0x16)
-
-; R_MIPS_GOT_LO16
-; CHECK: ('r_type', 0x17)
-
-; R_MIPS_GOT
-; CHECK: ('r_type', 0x09)
-
-; R_MIPS_LO16
-; CHECK: ('r_type', 0x06)
-
-; R_MIPS_CALL_HI16
-; CHECK: ('r_type', 0x1e)
-
-; R_MIPS_CALL_LO16
-; CHECK: ('r_type', 0x1f)
+; CHECK: Relocations [
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_GOT
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_LO16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_CALL_HI16
+; CHECK: 0x{{[0-9,A-F]+}} R_MIPS_CALL_LO16
+; CHECK: ]
%0 = load i32* @ext_1, align 4
%call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([16 x i8]* @.str, i32 0, i32 0), i32 %0) nounwind
diff --git a/test/MC/PowerPC/ppc64-initial-cfa.ll b/test/MC/PowerPC/ppc64-initial-cfa.ll
index 16236c9c65..23a77384ec 100644
--- a/test/MC/PowerPC/ppc64-initial-cfa.ll
+++ b/test/MC/PowerPC/ppc64-initial-cfa.ll
@@ -1,7 +1,7 @@
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj -relocation-model=static %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck %s -check-prefix=STATIC
+; RUN: llvm-readobj -s -sr -sd | FileCheck %s -check-prefix=STATIC
; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj -relocation-model=pic %s -o - | \
-; RUN: elf-dump --dump-section-data | FileCheck %s -check-prefix=PIC
+; RUN: llvm-readobj -s -sr -sd | FileCheck %s -check-prefix=PIC
; FIXME: this file should be in .s form, change when asm parser is available.
@@ -10,69 +10,75 @@ entry:
ret void
}
-; STATIC: ('sh_name', 0x{{.*}}) # '.eh_frame'
-; STATIC-NEXT: ('sh_type', 0x00000001)
-; STATIC-NEXT: ('sh_flags', 0x0000000000000002)
-; STATIC-NEXT: ('sh_addr', 0x{{.*}})
-; STATIC-NEXT: ('sh_offset', 0x{{.*}})
-; STATIC-NEXT: ('sh_size', 0x0000000000000028)
-; STATIC-NEXT: ('sh_link', 0x00000000)
-; STATIC-NEXT: ('sh_info', 0x00000000)
-; STATIC-NEXT: ('sh_addralign', 0x0000000000000008)
-; STATIC-NEXT: ('sh_entsize', 0x0000000000000000)
-; STATIC-NEXT: ('_section_data', '00000010 00000000 017a5200 01784101 1b0c0100 00000010 00000018 00000000 00000010 00000000')
+; STATIC: Section {
+; STATIC: Name: .eh_frame
+; STATIC-NEXT: Type: SHT_PROGBITS
+; STATIC-NEXT: Flags [ (0x2)
+; STATIC-NEXT: SHF_ALLOC
+; STATIC-NEXT: ]
+; STATIC-NEXT: Address:
+; STATIC-NEXT: Offset:
+; STATIC-NEXT: Size: 40
+; STATIC-NEXT: Link: 0
+; STATIC-NEXT: Info: 0
+; STATIC-NEXT: AddressAlignment: 8
+; STATIC-NEXT: EntrySize:
+; STATIC-NEXT: Relocations [
+; STATIC-NEXT: 0x1C R_PPC64_REL32 .text 0x0
+; STATIC-NEXT: ]
+; STATIC-NEXT: SectionData (
+; STATIC-NEXT: 0000: 00000010 00000000 017A5200 01784101
+; STATIC-NEXT: 0010: 1B0C0100 00000010 00000018 00000000
+; STATIC-NEXT: 0020: 00000010 00000000
+; STATIC-NEXT: )
+; STATIC-NEXT: }
-; STATIC: ('sh_name', 0x{{.*}}) # '.rela.eh_frame'
-; STATIC-NEXT: ('sh_type', 0x00000004)
-; STATIC-NEXT: ('sh_flags', 0x0000000000000000)
-; STATIC-NEXT: ('sh_addr', 0x{{.*}})
-; STATIC-NEXT: ('sh_offset', 0x{{.*}})
-; STATIC-NEXT: ('sh_size', 0x0000000000000018)
-; STATIC-NEXT: ('sh_link', 0x{{.*}})
-; STATIC-NEXT: ('sh_info', 0x{{.*}})
-; STATIC-NEXT: ('sh_addralign', 0x0000000000000008)
-; STATIC-NEXT: ('sh_entsize', 0x0000000000000018)
-; STATIC-NEXT: ('_relocations', [
+; STATIC: Section {
+; STATIC: Name: .rela.eh_frame
+; STATIC-NEXT: Type: SHT_RELA
+; STATIC-NEXT: Flags [ (0x0)
+; STATIC-NEXT: ]
+; STATIC-NEXT: Address:
+; STATIC-NEXT: Offset:
+; STATIC-NEXT: Size: 24
+; STATIC-NEXT: Link:
+; STATIC-NEXT: Info:
+; STATIC-NEXT: AddressAlignment: 8
+; STATIC-NEXT: EntrySize: 24
-; Static build should create R_PPC64_REL32 relocations
-; STATIC-NEXT: # Relocation 0
-; STATIC-NEXT: (('r_offset', 0x000000000000001c)
-; STATIC-NEXT: ('r_sym', 0x{{.*}})
-; STATIC-NEXT: ('r_type', 0x0000001a)
-; STATIC-NEXT: ('r_addend', 0x0000000000000000)
-; STATIC-NEXT: ),
-; STATIC-NEXT: ])
+; PIC: Section {
+; PIC: Name: .eh_frame
+; PIC-NEXT: Type: SHT_PROGBITS
+; PIC-NEXT: Flags [ (0x2)
+; PIC-NEXT: SHF_ALLOC
+; PIC-NEXT: ]
+; PIC-NEXT: Address:
+; PIC-NEXT: Offset:
+; PIC-NEXT: Size: 40
+; PIC-NEXT: Link: 0
+; PIC-NEXT: Info: 0
+; PIC-NEXT: AddressAlignment: 8
+; PIC-NEXT: EntrySize: 0
+; PIC-NEXT: Relocations [
+; PIC-NEXT: 0x1C R_PPC64_REL32 .text 0x0
+; PIC-NEXT: ]
+; PIC-NEXT: SectionData (
+; PIC-NEXT: 0000: 00000010 00000000 017A5200 01784101
+; PIC-NEXT: 0010: 1B0C0100 00000010 00000018 00000000
+; PIC-NEXT: 0020: 00000010 00000000
+; PIC-NEXT: )
+; PIC-NEXT: }
-; PIC: ('sh_name', 0x{{.*}}) # '.eh_frame'
-; PIC-NEXT: ('sh_type', 0x00000001)
-; PIC-NEXT: ('sh_flags', 0x0000000000000002)
-; PIC-NEXT: ('sh_addr', 0x{{.*}})
-; PIC-NEXT: ('sh_offset', 0x{{.*}})
-; PIC-NEXT: ('sh_size', 0x0000000000000028)
-; PIC-NEXT: ('sh_link', 0x00000000)
-; PIC-NEXT: ('sh_info', 0x00000000)
-; PIC-NEXT: ('sh_addralign', 0x0000000000000008)
-; PIC-NEXT: ('sh_entsize', 0x0000000000000000)
-; PIC-NEXT: ('_section_data', '00000010 00000000 017a5200 01784101 1b0c0100 00000010 00000018 00000000 00000010 00000000')
-
-; PIC: ('sh_name', 0x{{.*}}) # '.rela.eh_frame'
-; PIC-NEXT: ('sh_type', 0x00000004)
-; PIC-NEXT: ('sh_flags', 0x0000000000000000)
-; PIC-NEXT: ('sh_addr', 0x{{.*}})
-; PIC-NEXT: ('sh_offset', 0x{{.*}})
-; PIC-NEXT: ('sh_size', 0x0000000000000018)
-; PIC-NEXT: ('sh_link', 0x{{.*}})
-; PIC-NEXT: ('sh_info', 0x{{.*}})
-; PIC-NEXT: ('sh_addralign', 0x0000000000000008)
-; PIC-NEXT: ('sh_entsize', 0x0000000000000018)
-; PIC-NEXT: ('_relocations', [
-
-; PIC build should create R_PPC64_REL32 relocations
-; PIC-NEXT: # Relocation 0
-; PIC-NEXT: (('r_offset', 0x000000000000001c)
-; PIC-NEXT: ('r_sym', 0x{{.*}})
-; PIC-NEXT: ('r_type', 0x0000001a)
-; PIC-NEXT: ('r_addend', 0x0000000000000000)
-; PIC-NEXT: ),
-; PIC-NEXT: ])
+; PIC: Section {
+; PIC: Name: .rela.eh_frame
+; PIC-NEXT: Type: SHT_RELA
+; PIC-NEXT: Flags [ (0x0)
+; PIC-NEXT: ]
+; PIC-NEXT: Address:
+; PIC-NEXT: Offset:
+; PIC-NEXT: Size: 24
+; PIC-NEXT: Link:
+; PIC-NEXT: Info:
+; PIC-NEXT: AddressAlignment: 8
+; PIC-NEXT: EntrySize: 24
diff --git a/test/MC/PowerPC/ppc64-relocs-01.ll b/test/MC/PowerPC/ppc64-relocs-01.ll
index 4919e91400..ac8d303dd4 100644
--- a/test/MC/PowerPC/ppc64-relocs-01.ll
+++ b/test/MC/PowerPC/ppc64-relocs-01.ll
@@ -1,6 +1,6 @@
;; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -O3 -code-model=small \
;; RUN: -filetype=obj %s -o - | \
-;; RUN: elf-dump --dump-section-data | FileCheck %s
+;; RUN: llvm-readobj -r | FileCheck %s
;; FIXME: this file need to be in .s form, change when asm parse is done.
@@ -22,45 +22,28 @@ entry:
ret double %add
}
+;; CHECK: Relocations [
+
;; The relocations in .rela.text are the 'number64' load using a
;; R_PPC64_TOC16_DS against the .toc and the 'sin' external function
;; address using a R_PPC64_REL24
-;; CHECK: '.rela.text'
-;; CHECK: Relocation 0
-;; CHECK-NEXT: 'r_offset',
-;; CHECK-NEXT: 'r_sym', 0x00000006
-;; CHECK-NEXT: 'r_type', 0x0000003f
-;; CHECK: Relocation 1
-;; CHECK-NEXT: 'r_offset',
-;; CHECK-NEXT: 'r_sym', 0x0000000a
-;; CHECK-NEXT: 'r_type', 0x0000000a
+;; CHECK: Section ({{[0-9]+}}) .text {
+;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC16_DS .toc
+;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_REL24 sin
+;; CHECK-NEXT: }
;; The .opd entry for the 'access_int64' function creates 2 relocations:
;; 1. A R_PPC64_ADDR64 against the .text segment plus addend (the function
; address itself);
;; 2. And a R_PPC64_TOC against no symbol (the linker will replace for the
;; module's TOC base).
-;; CHECK: '.rela.opd'
-;; CHECK: Relocation 0
-;; CHECK-NEXT: 'r_offset',
-;; CHECK-NEXT: 'r_sym', 0x00000002
-;; CHECK-NEXT: 'r_type', 0x00000026
-;; CHECK: Relocation 1
-;; CHECK-NEXT: 'r_offset',
-;; CHECK-NEXT: 'r_sym', 0x00000000
-;; CHECK-NEXT: 'r_type', 0x00000033
+;; CHECK: Section ({{[0-9]+}}) .opd {
+;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_ADDR64 .text 0x0
+;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TOC - 0x0
;; Finally the TOC creates the relocation for the 'number64'.
-;; CHECK: '.rela.toc'
-;; CHECK: Relocation 0
-;; CHECK-NEXT: 'r_offset',
-;; CHECK-NEXT: 'r_sym', 0x00000008
-;; CHECK-NEXT: 'r_type', 0x00000026
+;; CHECK: Section ({{[0-9]+}}) .toc {
+;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_ADDR64 number64 0x0
+;; CHECK-NEXT: }
-;; Check if the relocation references are for correct symbols.
-;; CHECK: Symbol 7
-;; CHECK-NEXT: 'access_int64'
-;; CHECK: Symbol 8
-;; CHECK-NEXT: 'number64'
-;; CHECK: Symbol 10
-;; CHECK-NEXT: 'sin'
+;; CHECK-NEXT: ]
diff --git a/test/MC/PowerPC/ppc64-tls-relocs-01.ll b/test/MC/PowerPC/ppc64-tls-relocs-01.ll
index 5e37311075..4e901e816a 100644
--- a/test/MC/PowerPC/ppc64-tls-relocs-01.ll
+++ b/test/MC/PowerPC/ppc64-tls-relocs-01.ll
@@ -1,5 +1,5 @@
;; RUN: llc -mtriple=powerpc64-unknown-linux-gnu -filetype=obj %s -o - | \
-;; RUN: elf-dump --dump-section-data | FileCheck %s
+;; RUN: llvm-readobj -r | FileCheck %s
;; FIXME: this file should be in .s form, change when asm parser is available.
@@ -12,17 +12,8 @@ entry:
;; Check for a pair of R_PPC64_TPREL16_HA / R_PPC64_TPREL16_LO relocs
;; against the thread-local symbol 't'.
-;; CHECK: '.rela.text'
-;; CHECK: Relocation 0
-;; CHECK-NEXT: 'r_offset',
-;; CHECK-NEXT: 'r_sym', 0x00000008
-;; CHECK-NEXT: 'r_type', 0x00000048
-;; CHECK: Relocation 1
-;; CHECK-NEXT: 'r_offset',
-;; CHECK-NEXT: 'r_sym', 0x00000008
-;; CHECK-NEXT: 'r_type', 0x00000046
-
-;; Check that we got the correct symbol.
-;; CHECK: Symbol 8
-;; CHECK-NEXT: 't'
-
+;; CHECK: Relocations [
+;; CHECK: Section ({{[0-9]+}}) .text {
+;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TPREL16_HA t
+;; CHECK-NEXT: 0x{{[0-9,A-F]+}} R_PPC64_TPREL16_LO t
+;; CHECK-NEXT: }