aboutsummaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-03-20 18:44:20 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-03-20 18:44:20 +0000
commit7c18fa87a4d4ed8b0cfe1ec65597c748c6d91ca9 (patch)
tree805831560fd2335ffc166f53d3852bacd28e9c67 /test/MC
parenta201c4c2e604a519665ca55dc49e913628444ddb (diff)
Write the section table and the section data in the same order that
gun as does. This makes it a lot easier to compare the output of both as the addresses are now a lot closer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ARM/elf-reloc-01.ll9
-rw-r--r--test/MC/ARM/elf-reloc-02.ll7
-rw-r--r--test/MC/ARM/elf-reloc-03.ll7
-rw-r--r--test/MC/ELF/alias-reloc.s28
-rw-r--r--test/MC/ELF/basic-elf-32.s34
-rw-r--r--test/MC/ELF/basic-elf-64.s34
-rw-r--r--test/MC/ELF/cfi-advance-loc2.s6
-rw-r--r--test/MC/ELF/cfi-def-cfa-offset.s8
-rw-r--r--test/MC/ELF/cfi-def-cfa-register.s6
-rw-r--r--test/MC/ELF/cfi-def-cfa.s6
-rw-r--r--test/MC/ELF/cfi-offset.s6
-rw-r--r--test/MC/ELF/cfi-remember.s8
-rw-r--r--test/MC/ELF/cfi-zero-addr-delta.s6
-rw-r--r--test/MC/ELF/cfi.s8
-rw-r--r--test/MC/ELF/comdat.s12
-rw-r--r--test/MC/ELF/common.s2
-rw-r--r--test/MC/ELF/got.s6
-rw-r--r--test/MC/ELF/local-reloc.s20
-rw-r--r--test/MC/ELF/merge.s48
-rw-r--r--test/MC/ELF/pic-diff.s18
-rw-r--r--test/MC/ELF/relocation-386.s55
-rw-r--r--test/MC/ELF/relocation-pc.s8
-rw-r--r--test/MC/ELF/relocation.s14
-rw-r--r--test/MC/ELF/rename.s14
-rw-r--r--test/MC/ELF/symref.s68
-rw-r--r--test/MC/ELF/tls.s2
-rw-r--r--test/MC/ELF/undef2.s2
-rw-r--r--test/MC/ELF/weakref-reloc.s26
-rw-r--r--test/MC/ELF/weakref.s4
29 files changed, 235 insertions, 237 deletions
diff --git a/test/MC/ARM/elf-reloc-01.ll b/test/MC/ARM/elf-reloc-01.ll
index 6b83c95032..eb6e2436af 100644
--- a/test/MC/ARM/elf-reloc-01.ll
+++ b/test/MC/ARM/elf-reloc-01.ll
@@ -60,12 +60,11 @@ bb3: ; preds = %bb, %entry
declare void @exit(i32) noreturn nounwind
-
-;; OBJ: Symbol 0x00000002
-;; OBJ-NEXT: '_MergedGlobals'
-;; OBJ-NEXT: 'st_value', 0x00000010
-
;; OBJ: Relocation 0x00000001
;; OBJ-NEXT: 'r_offset',
;; OBJ-NEXT: 'r_sym', 0x00000002
;; OBJ-NEXT: 'r_type', 0x0000002b
+
+;; OBJ: Symbol 0x00000002
+;; OBJ-NEXT: '_MergedGlobals'
+;; OBJ-NEXT: 'st_value', 0x00000010
diff --git a/test/MC/ARM/elf-reloc-02.ll b/test/MC/ARM/elf-reloc-02.ll
index 132a47758d..091e89f576 100644
--- a/test/MC/ARM/elf-reloc-02.ll
+++ b/test/MC/ARM/elf-reloc-02.ll
@@ -41,11 +41,10 @@ declare i32 @write(...)
declare void @exit(i32) noreturn nounwind
-
-;; OBJ: Symbol 0x00000002
-;; OBJ-NEXT: '.L.str'
-
;; OBJ: Relocation 0x00000000
;; OBJ-NEXT: 'r_offset',
;; OBJ-NEXT: 'r_sym', 0x00000002
;; OBJ-NEXT: 'r_type', 0x0000002b
+
+;; OBJ: Symbol 0x00000002
+;; OBJ-NEXT: '.L.str'
diff --git a/test/MC/ARM/elf-reloc-03.ll b/test/MC/ARM/elf-reloc-03.ll
index e052f39a61..91dba554ab 100644
--- a/test/MC/ARM/elf-reloc-03.ll
+++ b/test/MC/ARM/elf-reloc-03.ll
@@ -88,11 +88,10 @@ entry:
declare void @exit(i32) noreturn nounwind
-
-;; OBJ: Symbol 0x0000000c
-;; OBJ-NEXT: 'vtable'
-
;; OBJ: Relocation 0x00000001
;; OBJ-NEXT: 'r_offset',
;; OBJ-NEXT: 'r_sym', 0x0000000c
;; OBJ-NEXT: 'r_type', 0x0000002b
+
+;; OBJ: Symbol 0x0000000c
+;; OBJ-NEXT: 'vtable'
diff --git a/test/MC/ELF/alias-reloc.s b/test/MC/ELF/alias-reloc.s
index c908c12404..67266d6520 100644
--- a/test/MC/ELF/alias-reloc.s
+++ b/test/MC/ELF/alias-reloc.s
@@ -17,6 +17,20 @@ foo2:
.set bar2,foo2
.quad bar2
+// CHECK: # Relocation 0x00000000
+// CHECK-NEXT: (('r_offset', 0x00000001)
+// CHECK-NEXT: ('r_sym', 0x00000001)
+// CHECK-NEXT: ('r_type', 0x00000004)
+// CHECK-NEXT: ('r_addend', 0xfffffffc)
+// CHECK-NEXT: ),
+
+// CHECK: # Relocation 0x00000001
+// CHECK-NEXT: (('r_offset', 0x00000005)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x00000001)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+// CHECK-NEXT: ),
+
// CHECK: # Symbol 0x00000001
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
// CHECK-NEXT: ('st_bind', 0x00000000)
@@ -36,17 +50,3 @@ foo2:
// CHECK-NEXT: ('st_value', 0x0000000000000005)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
-
-// CHECK: # Relocation 0x00000000
-// CHECK-NEXT: (('r_offset', 0x00000001)
-// CHECK-NEXT: ('r_sym', 0x00000001)
-// CHECK-NEXT: ('r_type', 0x00000004)
-// CHECK-NEXT: ('r_addend', 0xfffffffc)
-// CHECK-NEXT: ),
-
-// CHECK: # Relocation 0x00000001
-// CHECK-NEXT: (('r_offset', 0x00000005)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000001)
-// CHECK-NEXT: ('r_addend', 0x00000000)
-// CHECK-NEXT: ),
diff --git a/test/MC/ELF/basic-elf-32.s b/test/MC/ELF/basic-elf-32.s
index fa97da44d4..7c2927ad79 100644
--- a/test/MC/ELF/basic-elf-32.s
+++ b/test/MC/ELF/basic-elf-32.s
@@ -39,23 +39,6 @@ main: # @main
// CHECK: # '.text'
-// CHECK: ('st_bind', 0x00000000)
-// CHECK: ('st_type', 0x00000003)
-
-// CHECK: ('st_bind', 0x00000000)
-// CHECK: ('st_type', 0x00000003)
-
-// CHECK: ('st_bind', 0x00000000)
-// CHECK: ('st_type', 0x00000003)
-
-// CHECK: # 'main'
-// CHECK: ('st_bind', 0x00000001)
-// CHECK-NEXT: ('st_type', 0x00000002)
-
-// CHECK: # 'puts'
-// CHECK: ('st_bind', 0x00000001)
-// CHECK-NEXT: ('st_type', 0x00000000)
-
// CHECK: # '.rel.text'
// CHECK: ('_relocations', [
@@ -76,3 +59,20 @@ main: # @main
// CHECK: ('r_type', 0x00000002)
// CHECK: ),
// CHECK: ])
+
+// CHECK: ('st_bind', 0x00000000)
+// CHECK: ('st_type', 0x00000003)
+
+// CHECK: ('st_bind', 0x00000000)
+// CHECK: ('st_type', 0x00000003)
+
+// CHECK: ('st_bind', 0x00000000)
+// CHECK: ('st_type', 0x00000003)
+
+// CHECK: # 'main'
+// CHECK: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000002)
+
+// CHECK: # 'puts'
+// CHECK: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000000)
diff --git a/test/MC/ELF/basic-elf-64.s b/test/MC/ELF/basic-elf-64.s
index 7fc40b790f..5ae1f45166 100644
--- a/test/MC/ELF/basic-elf-64.s
+++ b/test/MC/ELF/basic-elf-64.s
@@ -39,23 +39,6 @@ main: # @main
// CHECK: # '.text'
-// CHECK: ('st_bind', 0x00000000)
-// CHECK: ('st_type', 0x00000003)
-
-// CHECK: ('st_bind', 0x00000000)
-// CHECK: ('st_type', 0x00000003)
-
-// CHECK: ('st_bind', 0x00000000)
-// CHECK: ('st_type', 0x00000003)
-
-// CHECK: # 'main'
-// CHECK-NEXT: ('st_bind', 0x00000001)
-// CHECK-NEXT: ('st_type', 0x00000002)
-
-// CHECK: # 'puts'
-// CHECK-NEXT: ('st_bind', 0x00000001)
-// CHECK-NEXT: ('st_type', 0x00000000)
-
// CHECK: # '.rela.text'
// CHECK: ('_relocations', [
@@ -80,3 +63,20 @@ main: # @main
// CHECK: ('r_addend', 0xfffffffc)
// CHECK: ),
// CHECK: ])
+
+// CHECK: ('st_bind', 0x00000000)
+// CHECK: ('st_type', 0x00000003)
+
+// CHECK: ('st_bind', 0x00000000)
+// CHECK: ('st_type', 0x00000003)
+
+// CHECK: ('st_bind', 0x00000000)
+// CHECK: ('st_type', 0x00000003)
+
+// CHECK: # 'main'
+// CHECK-NEXT: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000002)
+
+// CHECK: # 'puts'
+// CHECK-NEXT: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000000)
diff --git a/test/MC/ELF/cfi-advance-loc2.s b/test/MC/ELF/cfi-advance-loc2.s
index 3ffdd6cf02..0b5f5b1adb 100644
--- a/test/MC/ELF/cfi-advance-loc2.s
+++ b/test/MC/ELF/cfi-advance-loc2.s
@@ -24,13 +24,13 @@ f:
// CHECK-NEXT: ),
-// CHECK: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000258)
+// CHECK-NEXT: ('sh_offset', 0x00000498)
// CHECK-NEXT: ('sh_size', 0x00000018)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/cfi-def-cfa-offset.s b/test/MC/ELF/cfi-def-cfa-offset.s
index efefb8789d..38e35945e5 100644
--- a/test/MC/ELF/cfi-def-cfa-offset.s
+++ b/test/MC/ELF/cfi-def-cfa-offset.s
@@ -24,14 +24,14 @@ f:
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 0a000000 00440e10 450e0800')
// CHECK-NEXT: ),
-// CHECK: # Section 0x00000008
-// CHECK-NEXT: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: # Section 0x00000005
+// CHECK-NEXT: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000160)
+// CHECK-NEXT: ('sh_offset', 0x000003a0)
// CHECK-NEXT: ('sh_size', 0x00000018)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/cfi-def-cfa-register.s b/test/MC/ELF/cfi-def-cfa-register.s
index 3df20218a2..0122eba42f 100644
--- a/test/MC/ELF/cfi-def-cfa-register.s
+++ b/test/MC/ELF/cfi-def-cfa-register.s
@@ -20,13 +20,13 @@ f:
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 02000000 00410d06 00000000')
// CHECK-NEXT: ),
-// CHECK: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000158)
+// CHECK-NEXT: ('sh_offset', 0x00000398)
// CHECK-NEXT: ('sh_size', 0x00000018)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/cfi-def-cfa.s b/test/MC/ELF/cfi-def-cfa.s
index 1ad427b310..acc0b4fad9 100644
--- a/test/MC/ELF/cfi-def-cfa.s
+++ b/test/MC/ELF/cfi-def-cfa.s
@@ -21,13 +21,13 @@ f:
// CHECK-NEXT: ),
-// CHECK: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000158)
+// CHECK-NEXT: ('sh_offset', 0x00000398)
// CHECK-NEXT: ('sh_size', 0x00000018)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/cfi-offset.s b/test/MC/ELF/cfi-offset.s
index 2f7e7976fa..4152a71e0d 100644
--- a/test/MC/ELF/cfi-offset.s
+++ b/test/MC/ELF/cfi-offset.s
@@ -21,13 +21,13 @@ f:
// CHECK-NEXT: ),
-// CHECK: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000158)
+// CHECK-NEXT: ('sh_offset', 0x00000398)
// CHECK-NEXT: ('sh_size', 0x00000018)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/cfi-remember.s b/test/MC/ELF/cfi-remember.s
index b5b380368f..c282e6f0b8 100644
--- a/test/MC/ELF/cfi-remember.s
+++ b/test/MC/ELF/cfi-remember.s
@@ -23,14 +23,14 @@ f:
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 14000000 1c000000 00000000 03000000 00410a41 0b000000')
// CHECK-NEXT: ),
-// CHECK: # Section 0x00000008
-// CHECK-NEXT: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: # Section 0x00000005
+// CHECK-NEXT: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000158)
+// CHECK-NEXT: ('sh_offset', 0x00000398)
// CHECK-NEXT: ('sh_size', 0x00000018)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/cfi-zero-addr-delta.s b/test/MC/ELF/cfi-zero-addr-delta.s
index 5585e296da..e4c342e4e9 100644
--- a/test/MC/ELF/cfi-zero-addr-delta.s
+++ b/test/MC/ELF/cfi-zero-addr-delta.s
@@ -27,13 +27,13 @@ f:
// CHECK-NEXT: ('_section_data', '14000000 00000000 017a5200 01781001 1b0c0708 90010000 1c000000 1c000000 00000000 04000000 00410e10 410a0e08 410b0000 00000000')
// CHECK-NEXT: ),
-// CHECK: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000160)
+// CHECK-NEXT: ('sh_offset', 0x000003a0)
// CHECK-NEXT: ('sh_size', 0x00000018)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/cfi.s b/test/MC/ELF/cfi.s
index 93fd2e7922..f73240e94d 100644
--- a/test/MC/ELF/cfi.s
+++ b/test/MC/ELF/cfi.s
@@ -226,14 +226,14 @@ f36:
// 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 0x00000008
-// CHECK-NEXT: (('sh_name', 0x00000036) # '.rela.eh_frame'
+// CHECK: # Section 0x00000005
+// CHECK-NEXT: (('sh_name', 0x0000001c) # '.rela.eh_frame'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x00000bf8)
+// CHECK-NEXT: ('sh_offset', 0x00000e38)
// CHECK-NEXT: ('sh_size', 0x000006c0)
-// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_link', 0x00000007)
// CHECK-NEXT: ('sh_info', 0x00000004)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/comdat.s b/test/MC/ELF/comdat.s
index 0f1164e820..8d747a264e 100644
--- a/test/MC/ELF/comdat.s
+++ b/test/MC/ELF/comdat.s
@@ -4,37 +4,37 @@
// of the file.
// CHECK: # Section 0x00000001
-// CHECK-NEXT: (('sh_name', 0x00000026) # '.group'
+// CHECK-NEXT: (('sh_name', 0x00000030) # '.group'
// CHECK-NEXT: ('sh_type', 0x00000011)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
// CHECK-NEXT: ('sh_offset', 0x00000040)
// CHECK-NEXT: ('sh_size', 0x0000000c)
-// CHECK-NEXT: ('sh_link', 0x0000000c)
+// CHECK-NEXT: ('sh_link', 0x0000000d)
// CHECK-NEXT: ('sh_info', 0x00000001)
// CHECK-NEXT: ('sh_addralign', 0x00000004)
// CHECK-NEXT: ('sh_entsize', 0x00000004)
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 0x00000002
-// CHECK-NEXT: (('sh_name', 0x00000026) # '.group'
+// CHECK-NEXT: (('sh_name', 0x00000030) # '.group'
// CHECK-NEXT: ('sh_type', 0x00000011)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
// CHECK-NEXT: ('sh_offset', 0x0000004c)
// CHECK-NEXT: ('sh_size', 0x00000008)
-// CHECK-NEXT: ('sh_link', 0x0000000c)
+// CHECK-NEXT: ('sh_link', 0x0000000d)
// CHECK-NEXT: ('sh_info', 0x00000002)
// CHECK-NEXT: ('sh_addralign', 0x00000004)
// CHECK-NEXT: ('sh_entsize', 0x00000004)
// CHECK-NEXT: ),
// CHECK-NEXT: # Section 0x00000003
-// CHECK-NEXT: (('sh_name', 0x00000026) # '.group'
+// CHECK-NEXT: (('sh_name', 0x00000030) # '.group'
// CHECK-NEXT: ('sh_type', 0x00000011)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
// CHECK-NEXT: ('sh_offset', 0x00000054)
// CHECK-NEXT: ('sh_size', 0x00000008)
-// CHECK-NEXT: ('sh_link', 0x0000000c)
+// CHECK-NEXT: ('sh_link', 0x0000000d)
// CHECK-NEXT: ('sh_info', 0x0000000d)
// CHECK-NEXT: ('sh_addralign', 0x00000004)
// CHECK-NEXT: ('sh_entsize', 0x00000004)
diff --git a/test/MC/ELF/common.s b/test/MC/ELF/common.s
index 16b677b9e8..70e2ed2a95 100644
--- a/test/MC/ELF/common.s
+++ b/test/MC/ELF/common.s
@@ -38,7 +38,7 @@
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_type', 0x00000001)
// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000003)
+// CHECK-NEXT: ('st_shndx', 0x00000004)
// CHECK-NEXT: ('st_value', 0x0000000000000010)
// CHECK-NEXT: ('st_size', 0x0000000000000008)
// CHECK-NEXT: ),
diff --git a/test/MC/ELF/got.s b/test/MC/ELF/got.s
index 798150e0f5..a3abef536a 100644
--- a/test/MC/ELF/got.s
+++ b/test/MC/ELF/got.s
@@ -6,9 +6,6 @@
movl foo@GOT, %eax
movl foo@GOTPCREL(%rip), %eax
-// CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_'
-// CHECK-NEXT: ('st_bind', 0x00000001)
-
// CHECK: ('_relocations', [
// CHECK-NEXT: # Relocation 0x00000000
// CHECK-NEXT: (('r_offset',
@@ -23,3 +20,6 @@
// CHECK-NEXT: ('r_addend',
// CHECK-NEXT: ),
// CHECK-NEXT: ])
+
+// CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_'
+// CHECK-NEXT: ('st_bind', 0x00000001)
diff --git a/test/MC/ELF/local-reloc.s b/test/MC/ELF/local-reloc.s
index c2b477188c..8384e0e6cb 100644
--- a/test/MC/ELF/local-reloc.s
+++ b/test/MC/ELF/local-reloc.s
@@ -10,16 +10,6 @@ foo:
// CHECK: # Section 0x00000001
// CHECK-next: (('sh_name', 0x00000001) # '.text'
-// Symbol number 2 is section number 1
-// CHECK: # Symbol 0x00000002
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x00000000)
-// CHECK-NEXT: ('st_type', 0x00000003)
-// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000001)
-// CHECK-NEXT: ('st_value', 0x0000000000000000)
-// CHECK-NEXT: ('st_size', 0x0000000000000000)
-
// Relocation refers to symbol number 2
// CHECK: ('_relocations', [
// CHECK-NEXT: # Relocation 0x00000000
@@ -29,3 +19,13 @@ foo:
// CHECK-NEXT: ('r_addend',
// CHECK-NEXT: ),
// CHECK-NEXT: ])
+
+// Symbol number 2 is section number 1
+// CHECK: # Symbol 0x00000002
+// CHECK-NEXT: (('st_name', 0x00000000) # ''
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000003)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x0000000000000000)
+// CHECK-NEXT: ('st_size', 0x0000000000000000)
diff --git a/test/MC/ELF/merge.s b/test/MC/ELF/merge.s
index ec02228900..2bf8143548 100644
--- a/test/MC/ELF/merge.s
+++ b/test/MC/ELF/merge.s
@@ -22,30 +22,6 @@ zed:
.section bar,"ax",@progbits
foo:
-// Section 4 is "sec1"
-// CHECK: # Section 0x00000004
-// CHECK-NEXT: (('sh_name', 0x00000012) # '.sec1'
-
-// Symbol number 1 is .Lfoo
-// CHECK: # Symbol 0x00000001
-// CHECK-NEXT: (('st_name', 0x00000001) # '.Lfoo'
-
-// Symbol number 2 is foo
-// CHECK: # Symbol 0x00000002
-// CHECK-NEXT: (('st_name', 0x00000007) # 'foo'
-
-// Symbol number 6 is section 4
-// CHECK: # Symbol 0x00000006
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_bind', 0x00000000)
-// CHECK-NEXT: ('st_type', 0x00000003)
-// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000004)
-
-// Symbol number 8 is zed
-// CHECK: # Symbol 0x00000008
-// CHECK-NEXT: (('st_name', 0x0000000b) # 'zed'
-
// Relocation 0 refers to symbol 1
// CHECK: ('_relocations', [
// CHECK-NEXT: # Relocation 0
@@ -95,3 +71,27 @@ foo:
// CHECK-NEXT: ('r_addend', 0x00000000)
// CHECK-NEXT: ),
// CHECK-NEXT: ])
+
+// Section 5 is "sec1"
+// CHECK: # Section 0x00000005
+// CHECK-NEXT: (('sh_name', 0x00000012) # '.sec1'
+
+// Symbol number 1 is .Lfoo
+// CHECK: # Symbol 0x00000001
+// CHECK-NEXT: (('st_name', 0x00000001) # '.Lfoo'
+
+// Symbol number 2 is foo
+// CHECK: # Symbol 0x00000002
+// CHECK-NEXT: (('st_name', 0x00000007) # 'foo'
+
+// Symbol number 6 is section 5
+// CHECK: # Symbol 0x00000006
+// CHECK-NEXT: (('st_name', 0x00000000) # ''
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000003)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000005)
+
+// Symbol number 8 is zed
+// CHECK: # Symbol 0x00000008
+// CHECK-NEXT: (('st_name', 0x0000000b) # 'zed'
diff --git a/test/MC/ELF/pic-diff.s b/test/MC/ELF/pic-diff.s
index d1fc909dba..c2f96c2506 100644
--- a/test/MC/ELF/pic-diff.s
+++ b/test/MC/ELF/pic-diff.s
@@ -1,5 +1,14 @@
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
+// CHECK: ('_relocations', [
+// CHECK-NEXT: # Relocation 0x00000000
+// CHECK-NEXT: (('r_offset', 0x0000000c)
+// CHECK-NEXT: ('r_sym', 0x00000005)
+// CHECK-NEXT: ('r_type', 0x00000002)
+// CHECK-NEXT: ('r_addend', 0x00000008)
+// CHECK-NEXT: ),
+// CHECK-NEXT: ])
+
// CHECK: # Symbol 0x00000005
// CHECK-NEXT: (('st_name', 0x00000005) # 'baz'
// CHECK-NEXT: ('st_bind', 0x00000001)
@@ -10,15 +19,6 @@
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
-// CHECK: ('_relocations', [
-// CHECK-NEXT: # Relocation 0x00000000
-// CHECK-NEXT: (('r_offset', 0x0000000c)
-// CHECK-NEXT: ('r_sym', 0x00000005)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0x00000008)
-// CHECK-NEXT: ),
-// CHECK-NEXT: ])
-
.zero 4
.data
diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s
index f106f89b70..8be2d9ca0c 100644
--- a/test/MC/ELF/relocation-386.s
+++ b/test/MC/ELF/relocation-386.s
@@ -3,33 +3,6 @@
// Test that we produce the correct relocation types and that the relocations
// correctly point to the section or the symbol.
-// Section 3 is bss
-// CHECK: # Section 0x00000003
-// CHECK-NEXT: (('sh_name', 0x0000000d) # '.bss'
-
-// CHECK: # Symbol 0x00000001
-// CHECK-NEXT: (('st_name', 0x00000005) # '.Lfoo'
-
-// Symbol 4 is zed
-// CHECK: # Symbol 0x00000004
-// CHECK-NEXT: (('st_name', 0x00000035) # 'zed'
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x00000000)
-// CHECK-NEXT: ('st_type', 0x00000006)
-// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000004)
-
-// Symbol 7 is section 3
-// CHECK: # Symbol 0x00000007
-// CHECK-NEXT: (('st_name', 0x00000000) # ''
-// CHECK-NEXT: ('st_value', 0x00000000)
-// CHECK-NEXT: ('st_size', 0x00000000)
-// CHECK-NEXT: ('st_bind', 0x00000000)
-// CHECK-NEXT: ('st_type', 0x00000003)
-// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000003)
-
// CHECK: # Relocation 0x00000000
// CHECK-NEXT: (('r_offset', 0x00000002)
// CHECK-NEXT: ('r_sym', 0x00000001)
@@ -181,6 +154,34 @@
// CHECK-NEXT: ('r_type', 0x00000001)
// CHECK-NEXT: ),
+// Section 4 is bss
+// CHECK: # Section 0x00000004
+// CHECK-NEXT: (('sh_name', 0x0000000d) # '.bss'
+
+// CHECK: # Symbol 0x00000001
+// CHECK-NEXT: (('st_name', 0x00000005) # '.Lfoo'
+
+// Symbol 4 is zed
+// CHECK: # Symbol 0x00000004
+// CHECK-NEXT: (('st_name', 0x00000035) # 'zed'
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000006)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000005)
+
+// Symbol 7 is section 4
+// CHECK: # Symbol 0x00000007
+// CHECK-NEXT: (('st_name', 0x00000000) # ''
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000003)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000004)
+
+
.text
bar:
leal .Lfoo@GOTOFF(%ebx), %eax
diff --git a/test/MC/ELF/relocation-pc.s b/test/MC/ELF/relocation-pc.s
index 58c5f410b5..75841c6f70 100644
--- a/test/MC/ELF/relocation-pc.s
+++ b/test/MC/ELF/relocation-pc.s
@@ -5,14 +5,14 @@
loope 0 # R_X86_64_PC8
jmp -256 # R_X86_64_PC32
-// CHECK: # Section 0x00000007
-// CHECK-NEXT: (('sh_name', 0x0000002c) # '.rela.text'
+// CHECK: # Section 0x00000002
+// CHECK-NEXT: (('sh_name', 0x00000012) # '.rela.text'
// CHECK-NEXT: ('sh_type', 0x00000004)
// CHECK-NEXT: ('sh_flags', 0x00000000)
// CHECK-NEXT: ('sh_addr', 0x00000000)
-// CHECK-NEXT: ('sh_offset', 0x000000e8)
+// CHECK-NEXT: ('sh_offset', 0x000002e8)
// CHECK-NEXT: ('sh_size', 0x00000030)
-// CHECK-NEXT: ('sh_link', 0x00000005)
+// CHECK-NEXT: ('sh_link', 0x00000006)
// CHECK-NEXT: ('sh_info', 0x00000001)
// CHECK-NEXT: ('sh_addralign', 0x00000008)
// CHECK-NEXT: ('sh_entsize', 0x00000018)
diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s
index dabe721d90..640ed81323 100644
--- a/test/MC/ELF/relocation.s
+++ b/test/MC/ELF/relocation.s
@@ -22,13 +22,6 @@ bar:
// CHECK: # Section 0x00000001
// CHECK: (('sh_name', 0x00000001) # '.text'
-// CHECK: # Symbol 0x00000002
-// CHECK: (('st_name', 0x00000000) # ''
-// CHECK: ('st_bind', 0x00000000)
-// CHECK: ('st_type', 0x00000003)
-// CHECK: ('st_other', 0x00000000)
-// CHECK: ('st_shndx', 0x00000001)
-
// CHECK: # Relocation 0x00000000
// CHECK-NEXT: (('r_offset', 0x00000001)
// CHECK-NEXT: ('r_sym', 0x00000002)
@@ -112,3 +105,10 @@ bar:
// CHECK-NEXT: ('r_sym', 0x00000006)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0x0000005c)
+
+// CHECK: # Symbol 0x00000002
+// CHECK: (('st_name', 0x00000000) # ''
+// CHECK: ('st_bind', 0x00000000)
+// CHECK: ('st_type', 0x00000003)
+// CHECK: ('st_other', 0x00000000)
+// CHECK: ('st_shndx', 0x00000001)
diff --git a/test/MC/ELF/rename.s b/test/MC/ELF/rename.s
index 36065603e7..6260387fb6 100644
--- a/test/MC/ELF/rename.s
+++ b/test/MC/ELF/rename.s
@@ -28,6 +28,13 @@ defined3:
// CHECK-NEXT: ('sh_addralign', 0x00000004)
// CHECK-NEXT: ('sh_entsize', 0x00000000)
+// The relocation uses symbol 2
+// CHECK: # Relocation 0x00000000
+// CHECK-NEXT: (('r_offset', 0x00000000)
+// CHECK-NEXT: ('r_sym', 0x00000002)
+// CHECK-NEXT: ('r_type', 0x0000000a)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+
// Symbol 2 is section 1
// CHECK: # Symbol 0x00000002
// CHECK-NEXT: (('st_name', 0x00000000) # ''
@@ -37,10 +44,3 @@ defined3:
// CHECK-NEXT: ('st_shndx', 0x00000001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
-
-// The relocation uses symbol 2
-// CHECK: # Relocation 0x00000000
-// CHECK-NEXT: (('r_offset', 0x00000000)
-// CHECK-NEXT: ('r_sym', 0x00000002)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x00000000)
diff --git a/test/MC/ELF/symref.s b/test/MC/ELF/symref.s
index b99e71b869..d945c826d7 100644
--- a/test/MC/ELF/symref.s
+++ b/test/MC/ELF/symref.s
@@ -22,6 +22,38 @@ defined3:
global1:
+// CHECK: # Relocation 0x00000000
+// CHECK-NEXT: (('r_offset', 0x00000000)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x0000000a)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+// CHECK-NEXT: ),
+// CHECK-NEXT: # Relocation 0x00000001
+// CHECK-NEXT: (('r_offset', 0x00000004)
+// CHECK-NEXT: ('r_sym', 0x0000000b)
+// CHECK-NEXT: ('r_type', 0x0000000a)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+// CHECK-NEXT: ),
+// CHECK-NEXT: # Relocation 0x00000002
+// CHECK-NEXT: (('r_offset', 0x00000008)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x0000000a)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+// CHECK-NEXT: ),
+// CHECK-NEXT: # Relocation 0x00000003
+// CHECK-NEXT: (('r_offset', 0x0000000c)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x0000000a)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+// CHECK-NEXT: ),
+// CHECK-NEXT: # Relocation 0x00000004
+// CHECK-NEXT: (('r_offset', 0x00000010)
+// CHECK-NEXT: ('r_sym', 0x0000000c)
+// CHECK-NEXT: ('r_type', 0x0000000a)
+// CHECK-NEXT: ('r_addend', 0x00000000)
+// CHECK-NEXT: ),
+// CHECK-NEXT:])
+
// CHECK: # Symbol 0x00000001
// CHECK-NEXT: (('st_name', 0x00000013) # 'bar1@zed'
// CHECK-NEXT: ('st_bind', 0x00000000)
@@ -81,7 +113,7 @@ global1:
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000002)
+// CHECK-NEXT: ('st_shndx', 0x00000003)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
@@ -90,7 +122,7 @@ global1:
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000003)
+// CHECK-NEXT: ('st_shndx', 0x00000004)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
@@ -131,35 +163,3 @@ global1:
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
// CHECK-NEXT:])
-
-// CHECK: # Relocation 0x00000000
-// CHECK-NEXT: (('r_offset', 0x00000000)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x00000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 0x00000001
-// CHECK-NEXT: (('r_offset', 0x00000004)
-// CHECK-NEXT: ('r_sym', 0x0000000b)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x00000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 0x00000002
-// CHECK-NEXT: (('r_offset', 0x00000008)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x00000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 0x00000003
-// CHECK-NEXT: (('r_offset', 0x0000000c)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x00000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 0x00000004
-// CHECK-NEXT: (('r_offset', 0x00000010)
-// CHECK-NEXT: ('r_sym', 0x0000000c)
-// CHECK-NEXT: ('r_type', 0x0000000a)
-// CHECK-NEXT: ('r_addend', 0x00000000)
-// CHECK-NEXT: ),
-// CHECK-NEXT:])
diff --git a/test/MC/ELF/tls.s b/test/MC/ELF/tls.s
index 2517a5bddc..f9d6425f10 100644
--- a/test/MC/ELF/tls.s
+++ b/test/MC/ELF/tls.s
@@ -14,7 +14,7 @@ foobar:
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_type', 0x00000006)
// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000004)
+// CHECK-NEXT: ('st_shndx', 0x00000005)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
diff --git a/test/MC/ELF/undef2.s b/test/MC/ELF/undef2.s
index 9544fbc42a..67010132ab 100644
--- a/test/MC/ELF/undef2.s
+++ b/test/MC/ELF/undef2.s
@@ -7,4 +7,4 @@
// CHECK: ('_symbols', [
// CHECK: (('st_name', 0x00000001) # '.Lfoo'
// CHECK-NEXT: ('st_bind', 0x00000001)
-// CHECK: (('sh_name', 0x00000024) # '.strtab'
+// CHECK: (('sh_name', 0x0000002f) # '.strtab'
diff --git a/test/MC/ELF/weakref-reloc.s b/test/MC/ELF/weakref-reloc.s
index c7cd7649d6..63c1f5ea25 100644
--- a/test/MC/ELF/weakref-reloc.s
+++ b/test/MC/ELF/weakref-reloc.s
@@ -7,6 +7,19 @@
call zed@PLT
call bar
+// CHECK: # Relocation 0x00000000
+// CHECK-NEXT: (('r_offset', 0x00000001)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x00000004)
+// CHECK-NEXT: ('r_addend', 0xfffffffc)
+// CHECK-NEXT: ),
+// CHECK-NEXT: # Relocation 0x00000001
+// CHECK-NEXT: (('r_offset', 0x00000006)
+// CHECK-NEXT: ('r_sym', 0x00000005)
+// CHECK-NEXT: ('r_type', 0x00000002)
+// CHECK-NEXT: ('r_addend', 0xfffffffc)
+// CHECK-NEXT: ),
+
// CHECK: # Symbol 0x00000004
// CHECK-NEXT: (('st_name', 0x00000009) # '_GLOBAL_OFFSET_TABLE_'
// CHECK-NEXT: ('st_bind', 0x00000001)
@@ -34,16 +47,3 @@
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
-
-// CHECK: # Relocation 0x00000000
-// CHECK-NEXT: (('r_offset', 0x00000001)
-// CHECK-NEXT: ('r_sym', 0x00000006)
-// CHECK-NEXT: ('r_type', 0x00000004)
-// CHECK-NEXT: ('r_addend', 0xfffffffc)
-// CHECK-NEXT: ),
-// CHECK-NEXT: # Relocation 0x00000001
-// CHECK-NEXT: (('r_offset', 0x00000006)
-// CHECK-NEXT: ('r_sym', 0x00000005)
-// CHECK-NEXT: ('r_type', 0x00000002)
-// CHECK-NEXT: ('r_addend', 0xfffffffc)
-// CHECK-NEXT: ),
diff --git a/test/MC/ELF/weakref.s b/test/MC/ELF/weakref.s
index aea10d1d92..9100073551 100644
--- a/test/MC/ELF/weakref.s
+++ b/test/MC/ELF/weakref.s
@@ -128,7 +128,7 @@ bar15:
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000002)
+// CHECK-NEXT: ('st_shndx', 0x00000003)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),
@@ -137,7 +137,7 @@ bar15:
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
-// CHECK-NEXT: ('st_shndx', 0x00000003)
+// CHECK-NEXT: ('st_shndx', 0x00000004)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK-NEXT: ),