aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason W Kim <jason.w.kim.2009@gmail.com>2010-10-19 17:39:10 +0000
committerJason W Kim <jason.w.kim.2009@gmail.com>2010-10-19 17:39:10 +0000
commitf7d5278fb32b84b6218a222346202ab3af17057c (patch)
tree3644abbf2801a786ca63af47be0bd5bcbb5aa609
parent081c34b725980f995be9080eaec24cd3dfaaf065 (diff)
Fixing r116753 r116756 r116777
The failures in r116753 r116756 were caused by a python issue - Python likes to append 'L' suffix to stringified numbers if the number is larger than a machine int. Unfortunately, this causes a divergence of behavior between 32 and 64 bit python versions. I re-crafted elf-dump/common_dump to take care of these issues by: 1. always printing 0x (makes for easy sed/regex) 2. always print fixed length (exactly 2 + numBits/4 digits long) by mod ((2^numBits) - 1) 3. left-padded with '0' There is a residual common routine that is also used by macho-dump (dataToHex) , so I left the 'section_data' test values alone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116823 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/MC/ELF/alias.s124
-rw-r--r--test/MC/ELF/align-bss.s20
-rw-r--r--test/MC/ELF/align-nops.s36
-rw-r--r--test/MC/ELF/align-size.s12
-rw-r--r--test/MC/ELF/align-text.s20
-rw-r--r--test/MC/ELF/align.s44
-rw-r--r--test/MC/ELF/basic-elf.ll112
-rw-r--r--test/MC/ELF/common.s52
-rw-r--r--test/MC/ELF/common2.s4
-rw-r--r--test/MC/ELF/diff.s10
-rw-r--r--test/MC/ELF/empty.s116
-rw-r--r--test/MC/ELF/entsize.ll24
-rw-r--r--test/MC/ELF/entsize.s42
-rw-r--r--test/MC/ELF/file.s32
-rw-r--r--test/MC/ELF/got.s12
-rw-r--r--test/MC/ELF/local-reloc.s24
-rw-r--r--test/MC/ELF/merge.s66
-rw-r--r--test/MC/ELF/norelocation.s20
-rw-r--r--test/MC/ELF/pic-diff.s26
-rw-r--r--test/MC/ELF/plt.s4
-rw-r--r--test/MC/ELF/relax.s34
-rw-r--r--test/MC/ELF/relocation-386.s48
-rw-r--r--test/MC/ELF/relocation.s68
-rw-r--r--test/MC/ELF/section.s6
-rw-r--r--test/MC/ELF/size.s6
-rw-r--r--test/MC/ELF/sleb.s4
-rw-r--r--test/MC/ELF/uleb.s4
-rw-r--r--test/MC/ELF/undef.s44
-rw-r--r--test/MC/ELF/undef2.s6
-rw-r--r--test/MC/ELF/weak.s32
-rw-r--r--test/MC/ELF/zero.s20
-rw-r--r--test/Scripts/common_dump.py33
-rwxr-xr-xtest/Scripts/elf-dump98
33 files changed, 619 insertions, 584 deletions
diff --git a/test/MC/ELF/alias.s b/test/MC/ELF/alias.s
index 4842d2746a..84b558822d 100644
--- a/test/MC/ELF/alias.s
+++ b/test/MC/ELF/alias.s
@@ -15,70 +15,70 @@ bar3 = foo3
foo4:
bar4 = foo4
-// CHECK: # Symbol 1
-// CHECK-NEXT: (('st_name', 5) # 'bar'
-// CHECK-NEXT: ('st_bind', 0)
-// CHECK-NEXT: ('st_type', 0)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 1)
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 0)
+// CHECK: # Symbol 0x00000001
+// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000000)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 2
-// CHECK-NEXT: (('st_name', 29) # 'bar4'
-// CHECK-NEXT: ('st_bind', 0)
-// CHECK-NEXT: ('st_type', 2)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 1)
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 0)
+// CHECK-NEXT: # Symbol 0x00000002
+// CHECK-NEXT: (('st_name', 0x0000001d) # 'bar4'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000002)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 3
-// CHECK-NEXT: (('st_name', 1) # 'foo'
-// CHECK-NEXT: ('st_bind', 0)
-// CHECK-NEXT: ('st_type', 0)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 1)
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 0)
+// CHECK-NEXT: # Symbol 0x00000003
+// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000000)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 4
-// CHECK-NEXT: (('st_name', 14) # 'foo3'
-// CHECK-NEXT: ('st_bind', 0)
-// CHECK-NEXT: ('st_type', 0)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 1)
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 0)
+// CHECK-NEXT: # Symbol 0x00000004
+// CHECK-NEXT: (('st_name', 0x0000000e) # 'foo3'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000000)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 5
-// CHECK-NEXT: (('st_name', 24) # 'foo4'
-// CHECK-NEXT: ('st_bind', 0)
-// CHECK-NEXT: ('st_type', 2)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 1)
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 0)
+// CHECK-NEXT: # Symbol 0x00000005
+// CHECK-NEXT: (('st_name', 0x00000018) # 'foo4'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000002)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ),
-// CHECK-NEXT: # Symbol 6
-// CHECK-NEXT: (('st_name', 0) # ''
-// CHECK: # Symbol 7
-// CHECK-NEXT: (('st_name', 0) # ''
-// CHECK: # Symbol 8
-// CHECK-NEXT: (('st_name', 0) # ''
-// CHECK: # Symbol 9
-// CHECK-NEXT: (('st_name', 19) # 'bar3'
-// CHECK-NEXT: ('st_bind', 1)
-// CHECK-NEXT: ('st_type', 0)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 1)
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 0)
-// CHECK: # Symbol 10
-// CHECK-NEXT: (('st_name', 9) # 'bar2'
-// CHECK-NEXT: ('st_bind', 1)
-// CHECK-NEXT: ('st_type', 0)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 0)
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 0)
+// CHECK-NEXT: # Symbol 0x00000006
+// CHECK-NEXT: (('st_name', 0x00000000) # ''
+// CHECK: # Symbol 0x00000007
+// CHECK-NEXT: (('st_name', 0x00000000) # ''
+// CHECK: # Symbol 0x00000008
+// CHECK-NEXT: (('st_name', 0x00000000) # ''
+// CHECK: # Symbol 0x00000009
+// CHECK-NEXT: (('st_name', 0x00000013) # 'bar3'
+// CHECK-NEXT: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000000)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000001)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
+// CHECK: # Symbol 0x0000000a
+// CHECK-NEXT: (('st_name', 0x00000009) # 'bar2'
+// CHECK-NEXT: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000000)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000000)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
diff --git a/test/MC/ELF/align-bss.s b/test/MC/ELF/align-bss.s
index b6a3ba8cc4..4f73a29f8e 100644
--- a/test/MC/ELF/align-bss.s
+++ b/test/MC/ELF/align-bss.s
@@ -5,13 +5,13 @@
.local foo
.comm foo,2048,16
-// CHECK: ('sh_name', 13) # '.bss'
-// CHECK-NEXT: ('sh_type', 8)
-// CHECK-NEXT: ('sh_flags', 3)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 64)
-// CHECK-NEXT: ('sh_size', 2048)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 16)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK: ('sh_name', 0x0000000d) # '.bss'
+// CHECK-NEXT: ('sh_type', 0x00000008)
+// CHECK-NEXT: ('sh_flags', 0x00000003)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x00000800)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000010)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
diff --git a/test/MC/ELF/align-nops.s b/test/MC/ELF/align-nops.s
index b6793ecb67..28d4b895f5 100644
--- a/test/MC/ELF/align-nops.s
+++ b/test/MC/ELF/align-nops.s
@@ -4,37 +4,37 @@
.text
f0:
.long 0
- .align 8, 0x90
+ .align 8, 0x00000090
.long 0
.align 8
// But not in another section
.data
.long 0
- .align 8, 0x90
+ .align 8, 0x00000090
.long 0
.align 8
-// CHECK: (('sh_name', 1) # '.text'
-// CHECK-NEXT: ('sh_type', 1)
-// CHECK-NEXT: ('sh_flags', 6)
+// CHECK: (('sh_name', 0x00000001) # '.text'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000006)
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 16)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 8)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK-NEXT: ('sh_size', 0x00000010)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000008)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
// CHECK-NEXT: ('_section_data', '00000000 0f1f4000 00000000 0f1f4000')
-// CHECK: (('sh_name', 7) # '.data'
-// CHECK-NEXT: ('sh_type', 1)
-// CHECK-NEXT: ('sh_flags', 3)
+// CHECK: (('sh_name', 0x00000007) # '.data'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000003)
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 16)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 8)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK-NEXT: ('sh_size', 0x00000010)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000008)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
// CHECK-NEXT: ('_section_data', '00000000 90909090 00000000 00000000')
diff --git a/test/MC/ELF/align-size.s b/test/MC/ELF/align-size.s
index 4d705cf77b..85331d7ae9 100644
--- a/test/MC/ELF/align-size.s
+++ b/test/MC/ELF/align-size.s
@@ -5,9 +5,9 @@
.zero 4
.align 8
-// CHECK: (('sh_name', 1) # '.text'
-// CHECK-NEXT: ('sh_type', 1)
-// CHECK-NEXT: ('sh_flags', 6)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 64)
-// CHECK-NEXT: ('sh_size', 8)
+// CHECK: (('sh_name', 0x00000001) # '.text'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000006)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x00000008)
diff --git a/test/MC/ELF/align-text.s b/test/MC/ELF/align-text.s
index 4f4497c82b..1d2dacb3a0 100644
--- a/test/MC/ELF/align-text.s
+++ b/test/MC/ELF/align-text.s
@@ -6,14 +6,14 @@
.text
.zero 1
-// CHECK: (('sh_name', 1) # '.text'
-// CHECK-NEXT: ('sh_type', 1)
-// CHECK-NEXT: ('sh_flags', 6)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 64)
-// CHECK-NEXT: ('sh_size', 2)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 4)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK: (('sh_name', 0x00000001) # '.text'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000006)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x00000002)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000004)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
// CHECK-NEXT: ),
diff --git a/test/MC/ELF/align.s b/test/MC/ELF/align.s
index d375c4aa4f..c3912a7c67 100644
--- a/test/MC/ELF/align.s
+++ b/test/MC/ELF/align.s
@@ -7,26 +7,26 @@
.section .rodata,"a",@progbits
.align 8
-// CHECK: # Section 3
-// CHECK-NEXT: (('sh_name', 13) # '.bss'
-// CHECK-NEXT: ('sh_type', 8)
-// CHECK-NEXT: ('sh_flags', 3)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 68)
-// CHECK-NEXT: ('sh_size', 0)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 4)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK: # Section 0x00000003
+// CHECK-NEXT: (('sh_name', 0x0000000d) # '.bss'
+// CHECK-NEXT: ('sh_type', 0x00000008)
+// CHECK-NEXT: ('sh_flags', 0x00000003)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000044)
+// CHECK-NEXT: ('sh_size', 0x00000000)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000004)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
// CHECK-NEXT: ),
-// CHECK-NEXT: # Section 4
-// CHECK-NEXT: (('sh_name', 18) # '.rodata'
-// CHECK-NEXT: ('sh_type', 1)
-// CHECK-NEXT: ('sh_flags', 2)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 72)
-// CHECK-NEXT: ('sh_size', 0)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 8)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK-NEXT: # Section 0x00000004
+// CHECK-NEXT: (('sh_name', 0x00000012) # '.rodata'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000002)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000048)
+// CHECK-NEXT: ('sh_size', 0x00000000)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000008)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
diff --git a/test/MC/ELF/basic-elf.ll b/test/MC/ELF/basic-elf.ll
index f130ced7bb..f478b3235c 100644
--- a/test/MC/ELF/basic-elf.ll
+++ b/test/MC/ELF/basic-elf.ll
@@ -12,100 +12,100 @@ define i32 @main() nounwind {
declare i32 @puts(i8* nocapture) nounwind
-; 32: ('e_indent[EI_CLASS]', 1)
-; 32: ('e_indent[EI_DATA]', 1)
-; 32: ('e_indent[EI_VERSION]', 1)
+; 32: ('e_indent[EI_CLASS]', 0x00000001)
+; 32: ('e_indent[EI_DATA]', 0x00000001)
+; 32: ('e_indent[EI_VERSION]', 0x00000001)
; 32: ('_sections', [
; 32: # Section 0
-; 32: (('sh_name', 0) # ''
+; 32: (('sh_name', 0x00000000) # ''
; 32: # '.text'
-; 32: ('st_bind', 0)
-; 32: ('st_type', 3)
+; 32: ('st_bind', 0x00000000)
+; 32: ('st_type', 0x00000003)
-; 32: ('st_bind', 0)
-; 32: ('st_type', 3)
+; 32: ('st_bind', 0x00000000)
+; 32: ('st_type', 0x00000003)
-; 32: ('st_bind', 0)
-; 32: ('st_type', 3)
+; 32: ('st_bind', 0x00000000)
+; 32: ('st_type', 0x00000003)
; 32: # 'main'
-; 32: ('st_bind', 1)
-; 32-NEXT: ('st_type', 2)
+; 32: ('st_bind', 0x00000001)
+; 32-NEXT: ('st_type', 0x00000002)
; 32: # 'puts'
-; 32: ('st_bind', 1)
-; 32-NEXT: ('st_type', 0)
+; 32: ('st_bind', 0x00000001)
+; 32-NEXT: ('st_type', 0x00000000)
; 32: # '.rel.text'
; 32: ('_relocations', [
-; 32: # Relocation 0
-; 32: (('r_offset', 6)
-; 32: ('r_type', 1)
+; 32: # Relocation 0x00000000
+; 32: (('r_offset', 0x00000006)
+; 32: ('r_type', 0x00000001)
; 32: ),
-; 32: # Relocation 1
-; 32: (('r_offset', 11)
-; 32: ('r_type', 2)
+; 32: # Relocation 0x00000001
+; 32: (('r_offset', 0x0000000b)
+; 32: ('r_type', 0x00000002)
; 32: ),
-; 32: # Relocation 2
-; 32: (('r_offset', 18)
-; 32: ('r_type', 1)
+; 32: # Relocation 0x00000002
+; 32: (('r_offset', 0x00000012)
+; 32: ('r_type', 0x00000001)
; 32: ),
-; 32: # Relocation 3
-; 32: (('r_offset', 23)
-; 32: ('r_type', 2)
+; 32: # Relocation 0x00000003
+; 32: (('r_offset', 0x00000017)
+; 32: ('r_type', 0x00000002)
; 32: ),
; 32: ])
-; 64: ('e_indent[EI_CLASS]', 2)
-; 64: ('e_indent[EI_DATA]', 1)
-; 64: ('e_indent[EI_VERSION]', 1)
+; 64: ('e_indent[EI_CLASS]', 0x00000002)
+; 64: ('e_indent[EI_DATA]', 0x00000001)
+; 64: ('e_indent[EI_VERSION]', 0x00000001)
; 64: ('_sections', [
; 64: # Section 0
-; 64: (('sh_name', 0) # ''
+; 64: (('sh_name', 0x00000000) # ''
; 64: # '.text'
-; 64: ('st_bind', 0)
-; 64: ('st_type', 3)
+; 64: ('st_bind', 0x00000000)
+; 64: ('st_type', 0x00000003)
-; 64: ('st_bind', 0)
-; 64: ('st_type', 3)
+; 64: ('st_bind', 0x00000000)
+; 64: ('st_type', 0x00000003)
-; 64: ('st_bind', 0)
-; 64: ('st_type', 3)
+; 64: ('st_bind', 0x00000000)
+; 64: ('st_type', 0x00000003)
; 64: # 'main'
-; 64-NEXT: ('st_bind', 1)
-; 64-NEXT: ('st_type', 2)
+; 64-NEXT: ('st_bind', 0x00000001)
+; 64-NEXT: ('st_type', 0x00000002)
; 64: # 'puts'
-; 64-NEXT: ('st_bind', 1)
-; 64-NEXT: ('st_type', 0)
+; 64-NEXT: ('st_bind', 0x00000001)
+; 64-NEXT: ('st_type', 0x00000000)
; 64: # '.rela.text'
; 64: ('_relocations', [
-; 64: # Relocation 0
-; 64: (('r_offset', 5)
-; 64: ('r_type', 10)
-; 64: ('r_addend', 0)
+; 64: # Relocation 0x00000000
+; 64: (('r_offset', 0x00000005)
+; 64: ('r_type', 0x0000000a)
+; 64: ('r_addend', 0x00000000)
; 64: ),
-; 64: # Relocation 1
-; 64: (('r_offset', 10)
-; 64: ('r_type', 2)
-; 64: ('r_addend', -4)
+; 64: # Relocation 0x00000001
+; 64: (('r_offset', 0x0000000a)
+; 64: ('r_type', 0x00000002)
+; 64: ('r_addend', 0xfffffffc)
; 64: ),
-; 64: # Relocation 2
-; 64: (('r_offset', 15)
-; 64: ('r_type', 10)
-; 64: ('r_addend', 6)
+; 64: # Relocation 0x00000002
+; 64: (('r_offset', 0x0000000f)
+; 64: ('r_type', 0x0000000a)
+; 64: ('r_addend', 0x00000006)
; 64: ),
-; 64: # Relocation 3
-; 64: (('r_offset', 20)
-; 64: ('r_type', 2)
-; 64: ('r_addend', -4)
+; 64: # Relocation 0x00000003
+; 64: (('r_offset', 0x00000014)
+; 64: ('r_type', 0x00000002)
+; 64: ('r_addend', 0xfffffffc)
; 64: ),
; 64: ])
diff --git a/test/MC/ELF/common.s b/test/MC/ELF/common.s
index 18b3af5afa..9aa0c06298 100644
--- a/test/MC/ELF/common.s
+++ b/test/MC/ELF/common.s
@@ -8,13 +8,13 @@
.local common1
.comm common1,1,1
-// CHECK: ('st_name', 1) # 'common1'
-// CHECK-NEXT: ('st_bind', 0)
-// CHECK-NEXT: ('st_type', 1)
-// CHECK-NEXT: ('st_other', 0)
+// CHECK: ('st_name', 0x00000001) # 'common1'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000001)
+// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx',
-// CHECK-NEXT: ('st_value', 0)
-// CHECK-NEXT: ('st_size', 1)
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000001)
// Same as common1, but with directives in a different order.
@@ -22,25 +22,25 @@
.type common2,@object
.comm common2,1,1
-// CHECK: ('st_name', 9) # 'common2'
-// CHECK-NEXT: ('st_bind', 0)
-// CHECK-NEXT: ('st_type', 1)
-// CHECK-NEXT: ('st_other', 0)
+// CHECK: ('st_name', 0x00000009) # 'common2'
+// CHECK-NEXT: ('st_bind', 0x00000000)
+// CHECK-NEXT: ('st_type', 0x00000001)
+// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx',
-// CHECK-NEXT: ('st_value', 1)
-// CHECK-NEXT: ('st_size', 1)
+// CHECK-NEXT: ('st_value', 0x00000001)
+// CHECK-NEXT: ('st_size', 0x00000001)
// Test that without an explicit .local we produce a global.
.type common3,@object
.comm common3,4,4
-// CHECK: ('st_name', 17) # 'common3'
-// CHECK-NEXT: ('st_bind', 1)
-// CHECK-NEXT: ('st_type', 1)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 65522)
-// CHECK-NEXT: ('st_value', 4)
-// CHECK-NEXT: ('st_size', 4)
+// CHECK: ('st_name', 0x00000011) # 'common3'
+// CHECK-NEXT: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000001)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x0000fff2)
+// CHECK-NEXT: ('st_value', 0x00000004)
+// CHECK-NEXT: ('st_size', 0x00000004)
// Test that without an explicit .local we produce a global, even if the first
@@ -54,10 +54,10 @@ foo:
.type common4,@object
.comm common4,40,16
-// CHECK: ('st_name', 29) # 'common4'
-// CHECK-NEXT: ('st_bind', 1)
-// CHECK-NEXT: ('st_type', 1)
-// CHECK-NEXT: ('st_other', 0)
-// CHECK-NEXT: ('st_shndx', 65522)
-// CHECK-NEXT: ('st_value', 16)
-// CHECK-NEXT: ('st_size', 40)
+// CHECK: ('st_name', 0x0000001d) # 'common4'
+// CHECK-NEXT: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000001)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x0000fff2)
+// CHECK-NEXT: ('st_value', 0x00000010)
+// CHECK-NEXT: ('st_size', 0x00000028)
diff --git a/test/MC/ELF/common2.s b/test/MC/ELF/common2.s
index a95daa518f..b54cdfe143 100644
--- a/test/MC/ELF/common2.s
+++ b/test/MC/ELF/common2.s
@@ -9,12 +9,12 @@
.zero 1
.align 8
-// CHECK: (('sh_name', 13) # '.bss'
+// CHECK: (('sh_name', 0x0000000d) # '.bss'
// CHECK-NEXT: ('sh_type',
// CHECK-NEXT: ('sh_flags'
// CHECK-NEXT: ('sh_addr',
// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 9)
+// CHECK-NEXT: ('sh_size', 0x00000009)
// CHECK-NEXT: ('sh_link',
// CHECK-NEXT: ('sh_info',
// CHECK-NEXT: ('sh_addralign',
diff --git a/test/MC/ELF/diff.s b/test/MC/ELF/diff.s
index 671652cf4a..1879a39e8b 100644
--- a/test/MC/ELF/diff.s
+++ b/test/MC/ELF/diff.s
@@ -8,8 +8,8 @@ bar:
zed:
mov zed+(bar-foo), %eax
-// CHECK: # Relocation 0
-// CHECK-NEXT: (('r_offset', 5)
-// CHECK-NEXT: ('r_sym', 6)
-// CHECK-NEXT: ('r_type', 11)
-// CHECK-NEXT: ('r_addend', 1)
+// CHECK: # Relocation 0x00000000
+// CHECK-NEXT: (('r_offset', 0x00000005)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x0000000b)
+// CHECK-NEXT: ('r_addend', 0x00000001)
diff --git a/test/MC/ELF/empty.s b/test/MC/ELF/empty.s
index 62cbb275e0..e351936b90 100644
--- a/test/MC/ELF/empty.s
+++ b/test/MC/ELF/empty.s
@@ -3,68 +3,68 @@
// 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', 1) # '.text'
-// CHECK-NEXT: ('sh_type', 1)
-// CHECK-NEXT: ('sh_flags', 6)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 64)
-// CHECK-NEXT: ('sh_size', 0)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 4)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK: ('sh_name', 0x00000001) # '.text'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000006)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x00000000)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000004)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
-// CHECK: ('sh_name', 7) # '.data'
-// CHECK-NEXT: ('sh_type', 1)
-// CHECK-NEXT: ('sh_flags', 3)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 64)
-// CHECK-NEXT: ('sh_size', 0)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 4)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK: ('sh_name', 0x00000007) # '.data'
+// CHECK-NEXT: ('sh_type', 0x00000001)
+// CHECK-NEXT: ('sh_flags', 0x00000003)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x00000000)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000004)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
-// CHECK: ('sh_name', 13) # '.bss'
-// CHECK-NEXT: ('sh_type', 8)
-// CHECK-NEXT: ('sh_flags', 3)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 64)
-// CHECK-NEXT: ('sh_size', 0)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 4)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK: ('sh_name', 0x0000000d) # '.bss'
+// CHECK-NEXT: ('sh_type', 0x00000008)
+// CHECK-NEXT: ('sh_flags', 0x00000003)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x00000000)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000004)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
-// CHECK: ('sh_name', 18) # '.shstrtab'
-// CHECK-NEXT: ('sh_type', 3)
-// CHECK-NEXT: ('sh_flags', 0)
-// CHECK-NEXT: ('sh_addr', 0)
-// CHECK-NEXT: ('sh_offset', 64)
-// CHECK-NEXT: ('sh_size', 44)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 1)
-// CHECK-NEXT: ('sh_entsize', 0)
+// CHECK: ('sh_name', 0x00000012) # '.shstrtab'
+// CHECK-NEXT: ('sh_type', 0x00000003)
+// CHECK-NEXT: ('sh_flags', 0x00000000)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
+// CHECK-NEXT: ('sh_offset', 0x00000040)
+// CHECK-NEXT: ('sh_size', 0x0000002c)
+// CHECK-NEXT: ('sh_link', 0x00000000)
+// CHECK-NEXT: ('sh_info', 0x00000000)
+// CHECK-NEXT: ('sh_addralign', 0x00000001)
+// CHECK-NEXT: ('sh_entsize', 0x00000000)
-// CHECK: ('sh_name', 28) # '.symtab'
-// CHECK-NEXT: ('sh_type', 2)
-// CHECK-NEXT: ('sh_flags', 0)
-// CHECK-NEXT: ('sh_addr', 0)
+// CHECK: ('sh_name', 0x0000001c) # '.symtab'
+// CHECK-NEXT: ('sh_type', 0x00000002)
+// CHECK-NEXT: ('sh_flags', 0x00000000)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 96)
-// CHECK-NEXT: ('sh_link', 6)
-// CHECK-NEXT: ('sh_info', 4)
-// CHECK-NEXT: ('sh_addralign', 8)
-// CHECK-NEXT: ('sh_entsize', 24)
+// CHECK-NEXT: ('sh_size', 0x00000060)
+// CHECK-NEXT: ('sh_link', 0x00000006)
+// CHECK-NEXT: ('sh_info', 0x00000004)
+// CHECK-NEXT: ('sh_addralign', 0x00000008)
+// CHECK-NEXT: ('sh_entsize', 0x00000018)
-// CHECK: ('sh_name', 36) # '.strtab'
-// CHECK-NEXT: ('sh_type', 3)
-// CHECK-NEXT: ('sh_flags', 0)
-// CHECK-NEXT: ('sh_addr', 0)
+// CHECK: ('sh_name', 0x00000024) # '.strtab'
+// CHECK-NEXT: ('sh_type', 0x00000003)
+// CHECK-NEXT: ('sh_flags', 0x00000000)
+// CHECK-NEXT: ('sh_addr', 0x00000000)
// CHECK-NEXT: ('sh_offset',
-// CHECK-NEXT: ('sh_size', 1)
-// CHECK-NEXT: ('sh_link', 0)
-// CHECK-NEXT: ('sh_info', 0)
-// CHECK-NEXT: ('sh_addralign', 1)
-// CHECK-NEXT: ('sh_entsize', 0)
+// 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)
diff --git a/test/MC/ELF/entsize.ll b/test/MC/ELF/entsize.ll
index bb289d359d..62683af035 100644
--- a/test/MC/ELF/entsize.ll
+++ b/test/MC/ELF/entsize.ll
@@ -20,25 +20,25 @@ declare void @foo(i64* nocapture) nounwind
;;;;;
-; 64: (('sh_name', 18) # '.rodata.str1.1'
-; 64-NEXT: ('sh_type', 1)
-; 64-NEXT: ('sh_flags', 50)
+; 64: (('sh_name', 0x00000012) # '.rodata.str1.1'
+; 64-NEXT: ('sh_type', 0x00000001)
+; 64-NEXT: ('sh_flags', 0x00000032)
; 64-NEXT: ('sh_addr',
; 64-NEXT: ('sh_offset',
-; 64-NEXT: ('sh_size', 13)
+; 64-NEXT: ('sh_size', 0x0000000d)
; 64-NEXT: ('sh_link',
; 64-NEXT: ('sh_info',
-; 64-NEXT: ('sh_addralign', 1)
-; 64-NEXT: ('sh_entsize', 1)
+; 64-NEXT: ('sh_addralign', 0x00000001)
+; 64-NEXT: ('sh_entsize', 0x00000001)
-; 64: (('sh_name', 33) # '.rodata.cst8'
-; 64-NEXT: ('sh_type', 1)
-; 64-NEXT: ('sh_flags', 18)
+; 64: (('sh_name', 0x00000021) # '.rodata.cst8'
+; 64-NEXT: ('sh_type', 0x00000001)
+; 64-NEXT: ('sh_flags', 0x00000012)
; 64-NEXT: ('sh_addr',
; 64-NEXT: ('sh_offset',
-; 64-NEXT: ('sh_size', 16)
+; 64-NEXT: ('sh_size', 0x00000010)
; 64-NEXT: ('sh_link',
; 64-NEXT: ('sh_info',
-; 64-NEXT: ('sh_addralign', 8)
-; 64-NEXT: ('sh_entsize', 8)
+; 64-NEXT: ('sh_addralign', 0x00000008)
+; 64-NEXT: ('sh_entsize', 0x00000008)
diff --git a/test/MC/ELF/entsize.s b/test/MC/ELF/entsize.s
index 0a30fde6a8..e8eb62eb2e 100644
--- a/test/MC/ELF/entsize.s
+++ b/test/MC/ELF/entsize.s
@@ -32,38 +32,38 @@
.quad 42
.quad 42