From 1dcb1eafbc0c94dc0cb9cd0d3f002524de8a5a92 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 19 Oct 2010 00:19:49 +0000 Subject: [PATCH] Speculatively revert 116753 and 116756 to attempt to fix the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116777 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/ELF/alias.s | 124 +++++++++++++++++------------------ test/MC/ELF/align-bss.s | 20 +++--- test/MC/ELF/align-nops.s | 32 ++++----- test/MC/ELF/align-size.s | 12 ++-- test/MC/ELF/align-text.s | 20 +++--- test/MC/ELF/align.s | 44 ++++++------- test/MC/ELF/basic-elf.ll | 112 +++++++++++++++---------------- test/MC/ELF/common.s | 52 +++++++-------- test/MC/ELF/common2.s | 4 +- test/MC/ELF/diff.s | 10 +-- test/MC/ELF/empty.s | 116 ++++++++++++++++---------------- test/MC/ELF/entsize.ll | 24 +++---- test/MC/ELF/entsize.s | 42 ++++++------ test/MC/ELF/file.s | 32 ++++----- test/MC/ELF/got.s | 12 ++-- test/MC/ELF/local-reloc.s | 24 +++---- test/MC/ELF/merge.s | 66 +++++++++---------- test/MC/ELF/norelocation.s | 20 +++--- test/MC/ELF/pic-diff.s | 26 ++++---- test/MC/ELF/plt.s | 4 +- test/MC/ELF/relax.s | 34 +++++----- test/MC/ELF/relocation-386.s | 48 +++++++------- test/MC/ELF/relocation.s | 64 +++++++++--------- test/MC/ELF/section.s | 6 +- test/MC/ELF/size.s | 6 +- test/MC/ELF/sleb.s | 4 +- test/MC/ELF/uleb.s | 4 +- test/MC/ELF/undef.s | 44 ++++++------- test/MC/ELF/undef2.s | 6 +- test/MC/ELF/weak.s | 32 ++++----- test/MC/ELF/zero.s | 20 +++--- test/Scripts/elf-dump | 96 +++++++++++++-------------- 32 files changed, 580 insertions(+), 580 deletions(-) diff --git a/test/MC/ELF/alias.s b/test/MC/ELF/alias.s index fa2d732b68d..4842d2746a6 100644 --- a/test/MC/ELF/alias.s +++ b/test/MC/ELF/alias.s @@ -15,70 +15,70 @@ bar3 = foo3 foo4: bar4 = foo4 -// CHECK: # Symbol 0x1 -// CHECK-NEXT: (('st_name', 0x5) # 'bar' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// 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-NEXT: ), -// CHECK-NEXT: # Symbol 0x2 -// CHECK-NEXT: (('st_name', 0x1d) # 'bar4' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x2) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// 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: ), -// CHECK-NEXT: # Symbol 0x3 -// CHECK-NEXT: (('st_name', 0x1) # 'foo' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// 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: ), -// CHECK-NEXT: # Symbol 0x4 -// CHECK-NEXT: (('st_name', 0xe) # 'foo3' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// 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: ), -// CHECK-NEXT: # Symbol 0x5 -// CHECK-NEXT: (('st_name', 0x18) # 'foo4' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x2) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// 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: ), -// CHECK-NEXT: # Symbol 0x6 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x7 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x8 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x9 -// CHECK-NEXT: (('st_name', 0x13) # 'bar3' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) -// CHECK: # Symbol 0xa -// CHECK-NEXT: (('st_name', 0x9) # 'bar2' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x0) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// 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) diff --git a/test/MC/ELF/align-bss.s b/test/MC/ELF/align-bss.s index 893ef806eea..b6a3ba8cc42 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', 0xd) # '.bss' -// CHECK-NEXT: ('sh_type', 0x8) -// CHECK-NEXT: ('sh_flags', 0x3) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x800) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x10) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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) diff --git a/test/MC/ELF/align-nops.s b/test/MC/ELF/align-nops.s index bf65fa485a8..b6793ecb675 100644 --- a/test/MC/ELF/align-nops.s +++ b/test/MC/ELF/align-nops.s @@ -15,26 +15,26 @@ f0: .long 0 .align 8 -// CHECK: (('sh_name', 0x1) # '.text' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x6) +// CHECK: (('sh_name', 1) # '.text' +// CHECK-NEXT: ('sh_type', 1) +// CHECK-NEXT: ('sh_flags', 6) // CHECK-NEXT: ('sh_addr', // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x10) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x8) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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: ('_section_data', '00000000 0f1f4000 00000000 0f1f4000') -// CHECK: (('sh_name', 0x7) # '.data' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x3) +// CHECK: (('sh_name', 7) # '.data' +// CHECK-NEXT: ('sh_type', 1) +// CHECK-NEXT: ('sh_flags', 3) // CHECK-NEXT: ('sh_addr', // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x10) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x8) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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: ('_section_data', '00000000 90909090 00000000 00000000') diff --git a/test/MC/ELF/align-size.s b/test/MC/ELF/align-size.s index 3616d3b3721..4d705cf77b0 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', 0x1) # '.text' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x6) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x8) +// 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) diff --git a/test/MC/ELF/align-text.s b/test/MC/ELF/align-text.s index 1f2c9f9ef8d..4f4497c82ba 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', 0x1) # '.text' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x6) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x2) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x4) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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-NEXT: ), diff --git a/test/MC/ELF/align.s b/test/MC/ELF/align.s index e1cd3400cb5..d375c4aa4f8 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 0x3 -// CHECK-NEXT: (('sh_name', 0xd) # '.bss' -// CHECK-NEXT: ('sh_type', 0x8) -// CHECK-NEXT: ('sh_flags', 0x3) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x44) -// CHECK-NEXT: ('sh_size', 0x0) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x4) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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-NEXT: ), -// CHECK-NEXT: # Section 0x4 -// CHECK-NEXT: (('sh_name', 0x12) # '.rodata' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x2) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x48) -// CHECK-NEXT: ('sh_size', 0x0) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x8) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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) diff --git a/test/MC/ELF/basic-elf.ll b/test/MC/ELF/basic-elf.ll index 187a1f671a5..f130ced7bbb 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]', 0x1) -; 32: ('e_indent[EI_DATA]', 0x1) -; 32: ('e_indent[EI_VERSION]', 0x1) +; 32: ('e_indent[EI_CLASS]', 1) +; 32: ('e_indent[EI_DATA]', 1) +; 32: ('e_indent[EI_VERSION]', 1) ; 32: ('_sections', [ ; 32: # Section 0 -; 32: (('sh_name', 0x0) # '' +; 32: (('sh_name', 0) # '' ; 32: # '.text' -; 32: ('st_bind', 0x0) -; 32: ('st_type', 0x3) +; 32: ('st_bind', 0) +; 32: ('st_type', 3) -; 32: ('st_bind', 0x0) -; 32: ('st_type', 0x3) +; 32: ('st_bind', 0) +; 32: ('st_type', 3) -; 32: ('st_bind', 0x0) -; 32: ('st_type', 0x3) +; 32: ('st_bind', 0) +; 32: ('st_type', 3) ; 32: # 'main' -; 32: ('st_bind', 0x1) -; 32-NEXT: ('st_type', 0x2) +; 32: ('st_bind', 1) +; 32-NEXT: ('st_type', 2) ; 32: # 'puts' -; 32: ('st_bind', 0x1) -; 32-NEXT: ('st_type', 0x0) +; 32: ('st_bind', 1) +; 32-NEXT: ('st_type', 0) ; 32: # '.rel.text' ; 32: ('_relocations', [ -; 32: # Relocation 0x0 -; 32: (('r_offset', 0x6) -; 32: ('r_type', 0x1) +; 32: # Relocation 0 +; 32: (('r_offset', 6) +; 32: ('r_type', 1) ; 32: ), -; 32: # Relocation 0x1 -; 32: (('r_offset', 0xb) -; 32: ('r_type', 0x2) +; 32: # Relocation 1 +; 32: (('r_offset', 11) +; 32: ('r_type', 2) ; 32: ), -; 32: # Relocation 0x2 -; 32: (('r_offset', 0x12) -; 32: ('r_type', 0x1) +; 32: # Relocation 2 +; 32: (('r_offset', 18) +; 32: ('r_type', 1) ; 32: ), -; 32: # Relocation 0x3 -; 32: (('r_offset', 0x17) -; 32: ('r_type', 0x2) +; 32: # Relocation 3 +; 32: (('r_offset', 23) +; 32: ('r_type', 2) ; 32: ), ; 32: ]) -; 64: ('e_indent[EI_CLASS]', 0x2) -; 64: ('e_indent[EI_DATA]', 0x1) -; 64: ('e_indent[EI_VERSION]', 0x1) +; 64: ('e_indent[EI_CLASS]', 2) +; 64: ('e_indent[EI_DATA]', 1) +; 64: ('e_indent[EI_VERSION]', 1) ; 64: ('_sections', [ ; 64: # Section 0 -; 64: (('sh_name', 0x0) # '' +; 64: (('sh_name', 0) # '' ; 64: # '.text' -; 64: ('st_bind', 0x0) -; 64: ('st_type', 0x3) +; 64: ('st_bind', 0) +; 64: ('st_type', 3) -; 64: ('st_bind', 0x0) -; 64: ('st_type', 0x3) +; 64: ('st_bind', 0) +; 64: ('st_type', 3) -; 64: ('st_bind', 0x0) -; 64: ('st_type', 0x3) +; 64: ('st_bind', 0) +; 64: ('st_type', 3) ; 64: # 'main' -; 64-NEXT: ('st_bind', 0x1) -; 64-NEXT: ('st_type', 0x2) +; 64-NEXT: ('st_bind', 1) +; 64-NEXT: ('st_type', 2) ; 64: # 'puts' -; 64-NEXT: ('st_bind', 0x1) -; 64-NEXT: ('st_type', 0x0) +; 64-NEXT: ('st_bind', 1) +; 64-NEXT: ('st_type', 0) ; 64: # '.rela.text' ; 64: ('_relocations', [ -; 64: # Relocation 0x0 -; 64: (('r_offset', 0x5) -; 64: ('r_type', 0xa) -; 64: ('r_addend', 0x0) +; 64: # Relocation 0 +; 64: (('r_offset', 5) +; 64: ('r_type', 10) +; 64: ('r_addend', 0) ; 64: ), -; 64: # Relocation 0x1 -; 64: (('r_offset', 0xa) -; 64: ('r_type', 0x2) -; 64: ('r_addend', -0x4) +; 64: # Relocation 1 +; 64: (('r_offset', 10) +; 64: ('r_type', 2) +; 64: ('r_addend', -4) ; 64: ), -; 64: # Relocation 0x2 -; 64: (('r_offset', 0xf) -; 64: ('r_type', 0xa) -; 64: ('r_addend', 0x6) +; 64: # Relocation 2 +; 64: (('r_offset', 15) +; 64: ('r_type', 10) +; 64: ('r_addend', 6) ; 64: ), -; 64: # Relocation 0x3 -; 64: (('r_offset', 0x14) -; 64: ('r_type', 0x2) -; 64: ('r_addend', -0x4) +; 64: # Relocation 3 +; 64: (('r_offset', 20) +; 64: ('r_type', 2) +; 64: ('r_addend', -4) ; 64: ), ; 64: ]) diff --git a/test/MC/ELF/common.s b/test/MC/ELF/common.s index 8d92d982bf7..18b3af5afa6 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', 0x1) # 'common1' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x0) +// CHECK: ('st_name', 1) # 'common1' +// CHECK-NEXT: ('st_bind', 0) +// CHECK-NEXT: ('st_type', 1) +// CHECK-NEXT: ('st_other', 0) // CHECK-NEXT: ('st_shndx', -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x1) +// CHECK-NEXT: ('st_value', 0) +// CHECK-NEXT: ('st_size', 1) // Same as common1, but with directives in a different order. @@ -22,25 +22,25 @@ .type common2,@object .comm common2,1,1 -// CHECK: ('st_name', 0x9) # 'common2' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x0) +// CHECK: ('st_name', 9) # 'common2' +// CHECK-NEXT: ('st_bind', 0) +// CHECK-NEXT: ('st_type', 1) +// CHECK-NEXT: ('st_other', 0) // CHECK-NEXT: ('st_shndx', -// CHECK-NEXT: ('st_value', 0x1) -// CHECK-NEXT: ('st_size', 0x1) +// CHECK-NEXT: ('st_value', 1) +// CHECK-NEXT: ('st_size', 1) // Test that without an explicit .local we produce a global. .type common3,@object .comm common3,4,4 -// CHECK: ('st_name', 0x11) # 'common3' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0xfff2) -// CHECK-NEXT: ('st_value', 0x4) -// CHECK-NEXT: ('st_size', 0x4) +// 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) // 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', 0x1d) # 'common4' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0xfff2) -// CHECK-NEXT: ('st_value', 0x10) -// CHECK-NEXT: ('st_size', 0x28) +// 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) diff --git a/test/MC/ELF/common2.s b/test/MC/ELF/common2.s index 70f51d89915..a95daa518f6 100644 --- a/test/MC/ELF/common2.s +++ b/test/MC/ELF/common2.s @@ -9,12 +9,12 @@ .zero 1 .align 8 -// CHECK: (('sh_name', 0xd) # '.bss' +// CHECK: (('sh_name', 13) # '.bss' // CHECK-NEXT: ('sh_type', // CHECK-NEXT: ('sh_flags' // CHECK-NEXT: ('sh_addr', // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x9) +// CHECK-NEXT: ('sh_size', 9) // 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 9b662ecd178..671652cf4a3 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 0x0 -// CHECK-NEXT: (('r_offset', 0x5) -// CHECK-NEXT: ('r_sym', 0x6) -// CHECK-NEXT: ('r_type', 0xb) -// CHECK-NEXT: ('r_addend', 0x1) +// CHECK: # Relocation 0 +// CHECK-NEXT: (('r_offset', 5) +// CHECK-NEXT: ('r_sym', 6) +// CHECK-NEXT: ('r_type', 11) +// CHECK-NEXT: ('r_addend', 1) diff --git a/test/MC/ELF/empty.s b/test/MC/ELF/empty.s index bfc7d3b7b24..62cbb275e08 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', 0x1) # '.text' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x6) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x0) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x4) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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', 0x7) # '.data' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x3) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x0) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x4) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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', 0xd) # '.bss' -// CHECK-NEXT: ('sh_type', 0x8) -// CHECK-NEXT: ('sh_flags', 0x3) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x0) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x4) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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', 0x12) # '.shstrtab' -// CHECK-NEXT: ('sh_type', 0x3) -// CHECK-NEXT: ('sh_flags', 0x0) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x2c) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x1) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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', 0x1c) # '.symtab' -// CHECK-NEXT: ('sh_type', 0x2) -// CHECK-NEXT: ('sh_flags', 0x0) -// CHECK-NEXT: ('sh_addr', 0x0) +// CHECK: ('sh_name', 28) # '.symtab' +// CHECK-NEXT: ('sh_type', 2) +// CHECK-NEXT: ('sh_flags', 0) +// CHECK-NEXT: ('sh_addr', 0) // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x60) -// CHECK-NEXT: ('sh_link', 0x6) -// CHECK-NEXT: ('sh_info', 0x4) -// CHECK-NEXT: ('sh_addralign', 0x8) -// CHECK-NEXT: ('sh_entsize', 0x18) +// 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: ('sh_name', 0x24) # '.strtab' -// CHECK-NEXT: ('sh_type', 0x3) -// CHECK-NEXT: ('sh_flags', 0x0) -// CHECK-NEXT: ('sh_addr', 0x0) +// CHECK: ('sh_name', 36) # '.strtab' +// CHECK-NEXT: ('sh_type', 3) +// CHECK-NEXT: ('sh_flags', 0) +// CHECK-NEXT: ('sh_addr', 0) // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x1) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x1) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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) diff --git a/test/MC/ELF/entsize.ll b/test/MC/ELF/entsize.ll index c53fcce27b6..bb289d359d4 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', 0x12) # '.rodata.str1.1' -; 64-NEXT: ('sh_type', 0x1) -; 64-NEXT: ('sh_flags', 0x32) +; 64: (('sh_name', 18) # '.rodata.str1.1' +; 64-NEXT: ('sh_type', 1) +; 64-NEXT: ('sh_flags', 50) ; 64-NEXT: ('sh_addr', ; 64-NEXT: ('sh_offset', -; 64-NEXT: ('sh_size', 0xd) +; 64-NEXT: ('sh_size', 13) ; 64-NEXT: ('sh_link', ; 64-NEXT: ('sh_info', -; 64-NEXT: ('sh_addralign', 0x1) -; 64-NEXT: ('sh_entsize', 0x1) +; 64-NEXT: ('sh_addralign', 1) +; 64-NEXT: ('sh_entsize', 1) -; 64: (('sh_name', 0x21) # '.rodata.cst8' -; 64-NEXT: ('sh_type', 0x1) -; 64-NEXT: ('sh_flags', 0x12) +; 64: (('sh_name', 33) # '.rodata.cst8' +; 64-NEXT: ('sh_type', 1) +; 64-NEXT: ('sh_flags', 18) ; 64-NEXT: ('sh_addr', ; 64-NEXT: ('sh_offset', -; 64-NEXT: ('sh_size', 0x10) +; 64-NEXT: ('sh_size', 16) ; 64-NEXT: ('sh_link', ; 64-NEXT: ('sh_info', -; 64-NEXT: ('sh_addralign', 0x8) -; 64-NEXT: ('sh_entsize', 0x8) +; 64-NEXT: ('sh_addralign', 8) +; 64-NEXT: ('sh_entsize', 8) diff --git a/test/MC/ELF/entsize.s b/test/MC/ELF/entsize.s index 896082d6b1b..0a30fde6a86 100644 --- a/test/MC/ELF/entsize.s +++ b/test/MC/ELF/entsize.s @@ -32,38 +32,38 @@ .quad 42 .quad 42 -// CHECK: # Section 0x4 -// CHECK-NEXT: ('sh_name', 0x12) # '.rodata.str1.1' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x32) +// CHECK: # Section 4 +// CHECK-NEXT: ('sh_name', 18) # '.rodata.str1.1' +// CHECK-NEXT: ('sh_type', 1) +// CHECK-NEXT: ('sh_flags', 50) // CHECK-NEXT: ('sh_addr', // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0xd) +// CHECK-NEXT: ('sh_size', 13) // CHECK-NEXT: ('sh_link', // CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', 0x1) -// CHECK-NEXT: ('sh_entsize', 0x1) +// CHECK-NEXT: ('sh_addralign', 1) +// CHECK-NEXT: ('sh_entsize', 1) -// CHECK: # Section 0x5 -// CHECK-NEXT: ('sh_name', 0x21) # '.rodata.str2.1' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x32) +// CHECK: # Section 5 +// CHECK-NEXT: ('sh_name', 33) # '.rodata.str2.1' +// CHECK-NEXT: ('sh_type', 1) +// CHECK-NEXT: ('sh_flags', 50) // CHECK-NEXT: ('sh_addr', // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x10) +// CHECK-NEXT: ('sh_size', 16) // CHECK-NEXT: ('sh_link', // CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', 0x1) -// CHECK-NEXT: ('sh_entsize', 0x2) +// CHECK-NEXT: ('sh_addralign', 1) +// CHECK-NEXT: ('sh_entsize', 2) -// CHECK: # Section 0x6 -// CHECK-NEXT: ('sh_name', 0x30) # '.rodata.cst8 -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x12) +// CHECK: # Section 6 +// CHECK-NEXT: ('sh_name', 48) # '.rodata.cst8 +// CHECK-NEXT: ('sh_type', 1) +// CHECK-NEXT: ('sh_flags', 18) // CHECK-NEXT: ('sh_addr', // CHECK-NEXT: ('sh_offset', -// CHECK-NEXT: ('sh_size', 0x10) +// CHECK-NEXT: ('sh_size', 16) // CHECK-NEXT: ('sh_link', // CHECK-NEXT: ('sh_info', -// CHECK-NEXT: ('sh_addralign', 0x1) -// CHECK-NEXT: ('sh_entsize', 0x8) +// CHECK-NEXT: ('sh_addralign', 1) +// CHECK-NEXT: ('sh_entsize', 8) diff --git a/test/MC/ELF/file.s b/test/MC/ELF/file.s index 26b9974eff5..1e10531c204 100644 --- a/test/MC/ELF/file.s +++ b/test/MC/ELF/file.s @@ -4,20 +4,20 @@ .file "foo" foa: -// CHECK: # Symbol 0x1 -// CHECK-NEXT: (('st_name', 0x1) # 'foo' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x4) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0xfff1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// CHECK: # Symbol 1 +// CHECK-NEXT: (('st_name', 1) # 'foo' +// CHECK-NEXT: ('st_bind', 0) +// CHECK-NEXT: ('st_type', 4) +// CHECK-NEXT: ('st_other', 0) +// CHECK-NEXT: ('st_shndx', 65521) +// CHECK-NEXT: ('st_value', 0) +// CHECK-NEXT: ('st_size', 0) // CHECK-NEXT: ), -// CHECK-NEXT: # Symbol 0x2 -// CHECK-NEXT: (('st_name', 0x5) # 'foa' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// CHECK-NEXT: # Symbol 2 +// CHECK-NEXT: (('st_name', 5) # 'foa' +// 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) diff --git a/test/MC/ELF/got.s b/test/MC/ELF/got.s index e807ab10e28..866d25b8e05 100644 --- a/test/MC/ELF/got.s +++ b/test/MC/ELF/got.s @@ -6,20 +6,20 @@ movl foo@GOT, %eax movl foo@GOTPCREL(%rip), %eax -// CHECK: (('st_name', 0x5) # '_GLOBAL_OFFSET_TABLE_' -// CHECK-NEXT: ('st_bind', 0x1) +// CHECK: (('st_name', 5) # '_GLOBAL_OFFSET_TABLE_' +// CHECK-NEXT: ('st_bind', 1) // CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0x0 +// CHECK-NEXT: # Relocation 0 // CHECK-NEXT: (('r_offset', // CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x3) +// CHECK-NEXT: ('r_type', 3) // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x1 +// CHECK-NEXT: # Relocation 1 // CHECK-NEXT: (('r_offset', // CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x9) +// CHECK-NEXT: ('r_type', 9) // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), // CHECK-NEXT: ]) diff --git a/test/MC/ELF/local-reloc.s b/test/MC/ELF/local-reloc.s index 5d4cc25af87..30c0f68455d 100644 --- a/test/MC/ELF/local-reloc.s +++ b/test/MC/ELF/local-reloc.s @@ -7,24 +7,24 @@ foo: // Section number 1 is .text -// CHECK: # Section 0x1 -// CHECK-next: (('sh_name', 0x1) # '.text' +// CHECK: # Section 1 +// CHECK-next: (('sh_name', 1) # '.text' // Symbol number 2 is section number 1 -// CHECK: # Symbol 0x2 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x1) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// CHECK: # Symbol 2 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK-NEXT: ('st_bind', 0) +// CHECK-NEXT: ('st_type', 3) +// CHECK-NEXT: ('st_other', 0) +// CHECK-NEXT: ('st_shndx', 1) +// CHECK-NEXT: ('st_value', 0) +// CHECK-NEXT: ('st_size', 0) // Relocation refers to symbol number 2 // CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0x0 +// CHECK-NEXT: # Relocation 0 // CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x2) +// CHECK-NEXT: ('r_sym', 2) // CHECK-NEXT: ('r_type', // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), diff --git a/test/MC/ELF/merge.s b/test/MC/ELF/merge.s index 12a9438dd71..f9cbc1eb797 100644 --- a/test/MC/ELF/merge.s +++ b/test/MC/ELF/merge.s @@ -23,75 +23,75 @@ zed: foo: // Section 4 is "sec1" -// CHECK: # Section 0x4 -// CHECK-NEXT: (('sh_name', 0x12) # '.sec1' +// CHECK: # Section 4 +// CHECK-NEXT: (('sh_name', 18) # '.sec1' // Symbol number 1 is .Lfoo -// CHECK: # Symbol 0x1 -// CHECK-NEXT: (('st_name', 0x1) # '.Lfoo' +// CHECK: # Symbol 1 +// CHECK-NEXT: (('st_name', 1) # '.Lfoo' // Symbol number 2 is foo -// CHECK: # Symbol 0x2 -// CHECK-NEXT: (('st_name', 0x7) # 'foo' +// CHECK: # Symbol 2 +// CHECK-NEXT: (('st_name', 7) # 'foo' // Symbol number 6 is section 4 -// CHECK: # Symbol 0x6 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x4) +// CHECK: # Symbol 6 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK-NEXT: ('st_bind', 0) +// CHECK-NEXT: ('st_type', 3) +// CHECK-NEXT: ('st_other', 0) +// CHECK-NEXT: ('st_shndx', 4) // Symbol number 8 is zed -// CHECK: # Symbol 0x8 -// CHECK-NEXT: (('st_name', 0xb) # 'zed' +// CHECK: # Symbol 8 +// CHECK-NEXT: (('st_name', 11) # 'zed' // Relocation 0 refers to symbol 1 // CHECK: ('_relocations', [ // CHECK-NEXT: # Relocation 0 // CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x1) -// CHECK-NEXT: ('r_type', 0x2 +// CHECK-NEXT: ('r_sym', 1) +// CHECK-NEXT: ('r_type', 2 // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), // Relocation 1 refers to symbol 6 -// CHECK-NEXT: # Relocation 0x1 +// CHECK-NEXT: # Relocation 1 // CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x6) -// CHECK-NEXT: ('r_type', 0xa) +// CHECK-NEXT: ('r_sym', 6) +// CHECK-NEXT: ('r_type', 10) // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), // Relocation 2 refers to symbol 1 -// CHECK-NEXT: # Relocation 0x2 +// CHECK-NEXT: # Relocation 2 // CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x1) -// CHECK-NEXT: ('r_type', 0xa +// CHECK-NEXT: ('r_sym', 1) +// CHECK-NEXT: ('r_type', 10 // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), // Relocation 3 refers to symbol 2 -// CHECK-NEXT: # Relocation 0x3 +// CHECK-NEXT: # Relocation 3 // CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0x4 +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 4 // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), // Relocation 4 refers to symbol 2 -// CHECK-NEXT: # Relocation 0x4 +// CHECK-NEXT: # Relocation 4 // CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0x9 +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 9 // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), // Relocation 5 refers to symbol 8 -// CHECK-NEXT: # Relocation 0x5 -// CHECK-NEXT: (('r_offset', 0x23) -// CHECK-NEXT: ('r_sym', 0x8) -// CHECK-NEXT: ('r_type', 0xb) -// CHECK-NEXT: ('r_addend', 0x0) +// CHECK-NEXT: # Relocation 5 +// CHECK-NEXT: (('r_offset', 35) +// CHECK-NEXT: ('r_sym', 8) +// CHECK-NEXT: ('r_type', 11) +// CHECK-NEXT: ('r_addend', 0) // CHECK-NEXT: ), // CHECK-NEXT: ]) diff --git a/test/MC/ELF/norelocation.s b/test/MC/ELF/norelocation.s index 6d6a9a174d5..3e9f6e09443 100644 --- a/test/MC/ELF/norelocation.s +++ b/test/MC/ELF/norelocation.s @@ -3,16 +3,16 @@ call bar bar: -// CHECK: ('sh_name', 0x1) # '.text' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x6) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x5) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x4) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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', 5) +// CHECK-NEXT: ('sh_link', 0) +// CHECK-NEXT: ('sh_info', 0) +// CHECK-NEXT: ('sh_addralign', 4) +// CHECK-NEXT: ('sh_entsize', 0) // CHECK-NEXT: ('_section_data', 'e8000000 00') // CHECK-NOT: .rela.text // CHECK: shstrtab diff --git a/test/MC/ELF/pic-diff.s b/test/MC/ELF/pic-diff.s index 176948ca7ad..50117d420bf 100644 --- a/test/MC/ELF/pic-diff.s +++ b/test/MC/ELF/pic-diff.s @@ -1,21 +1,21 @@ // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s -// CHECK: # Symbol 0x5 -// CHECK-NEXT: (('st_name', 0x5) # 'baz' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x0) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x0) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// CHECK: # Symbol 5 +// CHECK-NEXT: (('st_name', 5) # 'baz' +// 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: ), // CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0x0 -// CHECK-NEXT: (('r_offset', 0xc) -// CHECK-NEXT: ('r_sym', 0x5) -// CHECK-NEXT: ('r_type', 0x2) -// CHECK-NEXT: ('r_addend', 0x8) +// CHECK-NEXT: # Relocation 0 +// CHECK-NEXT: (('r_offset', 12) +// CHECK-NEXT: ('r_sym', 5) +// CHECK-NEXT: ('r_type', 2) +// CHECK-NEXT: ('r_addend', 8) // CHECK-NEXT: ), // CHECK-NEXT: ]) diff --git a/test/MC/ELF/plt.s b/test/MC/ELF/plt.s index 92d03b1d173..2cbcf5a816b 100644 --- a/test/MC/ELF/plt.s +++ b/test/MC/ELF/plt.s @@ -5,10 +5,10 @@ jmp foo@PLT // CHECK: ('_relocations', [ -// CHECK-NEXT: # Relocation 0x0 +// CHECK-NEXT: # Relocation 0 // CHECK-NEXT: (('r_offset', // CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x4) +// CHECK-NEXT: ('r_type', 4) // CHECK-NEXT: ('r_addend', // CHECK-NEXT: ), // CHECK-NEXT: ]) diff --git a/test/MC/ELF/relax.s b/test/MC/ELF/relax.s index ed9b7dcaffb..5c5e7e30dac 100644 --- a/test/MC/ELF/relax.s +++ b/test/MC/ELF/relax.s @@ -12,27 +12,27 @@ foo: jmp bar jmp foo -// CHECK: ('sh_name', 0x1) # '.text' -// CHECK-NEXT: ('sh_type', 0x1) -// CHECK-NEXT: ('sh_flags', 0x6) -// CHECK-NEXT: ('sh_addr', 0x0) -// CHECK-NEXT: ('sh_offset', 0x40) -// CHECK-NEXT: ('sh_size', 0x7) -// CHECK-NEXT: ('sh_link', 0x0) -// CHECK-NEXT: ('sh_info', 0x0) -// CHECK-NEXT: ('sh_addralign', 0x4) -// CHECK-NEXT: ('sh_entsize', 0x0) +// 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', 7) +// CHECK-NEXT: ('sh_link', 0) +// CHECK-NEXT: ('sh_info', 0) +// CHECK-NEXT: ('sh_addralign', 4) +// CHECK-NEXT: ('sh_entsize', 0) // CHECK-NEXT: ('_section_data', 'ebfee900 000000') -// CHECK: # Symbol 0x5 -// CHECK-NEXT: (('st_name', 0x5) # 'foo' +// CHECK: # Symbol 5 +// CHECK-NEXT: (('st_name', 5) # 'foo' // CHECK: .rela.text // CHECK: ('_relocations', [ -// CHECK-NEXT: Relocation 0x0 -// CHECK-NEXT: (('r_offset', 0x3) -// CHECK-NEXT: ('r_sym', 0x5) -// CHECK-NEXT: ('r_type', 0x2) -// CHECK-NEXT: ('r_addend', -0x4) +// CHECK-NEXT: Relocation 0 +// CHECK-NEXT: (('r_offset', 3) +// CHECK-NEXT: ('r_sym', 5) +// CHECK-NEXT: ('r_type', 2) +// CHECK-NEXT: ('r_addend', -4) // CHECK-NEXT: ), // CHECK-NEXT: ]) diff --git a/test/MC/ELF/relocation-386.s b/test/MC/ELF/relocation-386.s index e87c25a7739..43a9befcecb 100644 --- a/test/MC/ELF/relocation-386.s +++ b/test/MC/ELF/relocation-386.s @@ -4,50 +4,50 @@ // to .Lfoo uses the symbol and not the section. // Section 3 is bss -// CHECK: # Section 0x3 -// CHECK-NEXT: (('sh_name', 0xd) # '.bss' +// CHECK: # Section 3 +// CHECK-NEXT: (('sh_name', 13) # '.bss' -// CHECK: # Symbol 0x1 -// CHECK-NEXT: (('st_name', 0x5) # '.Lfoo' +// CHECK: # Symbol 1 +// CHECK-NEXT: (('st_name', 5) # '.Lfoo' // Symbol 6 is section 3 -// CHECK: # Symbol 0x6 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) -// CHECK-NEXT: ('st_bind', 0x0) -// CHECK-NEXT: ('st_type', 0x3) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x3) +// CHECK: # Symbol 6 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK-NEXT: ('st_value', 0) +// CHECK-NEXT: ('st_size', 0) +// CHECK-NEXT: ('st_bind', 0) +// CHECK-NEXT: ('st_type', 3) +// CHECK-NEXT: ('st_other', 0) +// CHECK-NEXT: ('st_shndx', 3) -// CHECK: # Relocation 0x0 -// CHECK-NEXT: (('r_offset', 0x2) -// CHECK-NEXT: ('r_sym', 0x1) -// CHECK-NEXT: ('r_type', 0x9) +// CHECK: # Relocation 0 +// CHECK-NEXT: (('r_offset', 2) +// CHECK-NEXT: ('r_sym', 1) +// CHECK-NEXT: ('r_type', 9) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x1 +// CHECK-NEXT: # Relocation 1 // CHECK-NEXT: (('r_offset', // CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x4) +// CHECK-NEXT: ('r_type', 4) // CHECK-NEXT: ), -// CHECK-NEXT: # Relocation 0x2 +// CHECK-NEXT: # Relocation 2 // CHECK-NEXT: (('r_offset', // CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0xa) +// CHECK-NEXT: ('r_type', 10) // CHECK-NEXT: ), // Relocation 3 (bar3@GOTOFF) is done with symbol 6 (bss) -// CHECK-NEXT: # Relocation 0x3 +// CHECK-NEXT: # Relocation 3 // CHECK-NEXT: (('r_offset', -// CHECK-NEXT: ('r_sym', 0x6 +// CHECK-NEXT: ('r_sym', 6 // CHECK-NEXT: ('r_type', // CHECK-NEXT: ), // Relocation 4 (bar2@GOT) is of type R_386_GOT32 -// CHECK-NEXT: # Relocation 0x4 +// CHECK-NEXT: # Relocation 4 // CHECK-NEXT: (('r_offset', // CHECK-NEXT: ('r_sym', -// CHECK-NEXT: ('r_type', 0x3 +// CHECK-NEXT: ('r_type', 3 // CHECK-NEXT: ), .text diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s index 265c7f72ae6..45c863e6de5 100644 --- a/test/MC/ELF/relocation.s +++ b/test/MC/ELF/relocation.s @@ -10,48 +10,48 @@ bar: movq bar, %rdx // R_X86_64_32S .long bar // R_X86_64_32 -// CHECK: # Section 0x1 -// CHECK: (('sh_name', 0x1) # '.text' +// CHECK: # Section 1 +// CHECK: (('sh_name', 1) # '.text' -// CHECK: # Symbol 0x2 -// CHECK: (('st_name', 0x0) # '' -// CHECK: ('st_bind', 0x0) -// CHECK ('st_type', 0x3) -// CHECK: ('st_other', 0x0) -// CHECK: ('st_shndx', 0x1) +// CHECK: # Symbol 2 +// CHECK: (('st_name', 0) # '' +// CHECK: ('st_bind', 0) +// CHECK ('st_type', 3) +// CHECK: ('st_other', 0) +// CHECK: ('st_shndx', 1) -// CHECK: # Relocation 0x0 -// CHECK-NEXT: (('r_offset', 0x1) -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0xa) +// CHECK: # Relocation 0 +// CHECK-NEXT: (('r_offset', 1) +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 10) // CHECK-NEXT: ('r_addend', -// CHECK: # Relocation 0x1 -// CHECK-NEXT: (('r_offset', 0x8) -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0xb) +// CHECK: # Relocation 1 +// CHECK-NEXT: (('r_offset', 8) +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 11) // CHECK-NEXT: ('r_addend', -// CHECK: # Relocation 0x2 -// CHECK-NEXT: (('r_offset', 0x13) -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0xb) +// CHECK: # Relocation 2 +// CHECK-NEXT: (('r_offset', 19) +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 11) // CHECK-NEXT: ('r_addend', -// CHECK: # Relocation 0x3 -// CHECK-NEXT: (('r_offset', 0x1a) -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0xb) +// CHECK: # Relocation 3 +// CHECK-NEXT: (('r_offset', 26) +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 11) // CHECK-NEXT: ('r_addend', -// CHECK: # Relocation 0x4 -// CHECK-NEXT: (('r_offset', 0x22) -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0xb) +// CHECK: # Relocation 4 +// CHECK-NEXT: (('r_offset', 34) +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 11) // CHECK-NEXT: ('r_addend', -// CHECK: # Relocation 0x5 -// CHECK-NEXT: (('r_offset', 0x26) -// CHECK-NEXT: ('r_sym', 0x2) -// CHECK-NEXT: ('r_type', 0xa) +// CHECK: # Relocation 5 +// CHECK-NEXT: (('r_offset', 38) +// CHECK-NEXT: ('r_sym', 2) +// CHECK-NEXT: ('r_type', 10) // CHECK-NEXT: ('r_addend', diff --git a/test/MC/ELF/section.s b/test/MC/ELF/section.s index e5a8e279d91..4622cb41592 100644 --- a/test/MC/ELF/section.s +++ b/test/MC/ELF/section.s @@ -6,6 +6,6 @@ .section .note.GNU-,"",@progbits .section -.note.GNU,"",@progbits -// CHECK: ('sh_name', 0x12) # '.note.GNU-stack' -// CHECK: ('sh_name', 0x22) # '.note.GNU-' -// CHECK: ('sh_name', 0x2d) # '-.note.GNU' +// CHECK: ('sh_name', 18) # '.note.GNU-stack' +// CHECK: ('sh_name', 34) # '.note.GNU-' +// CHECK: ('sh_name', 45) # '-.note.GNU' diff --git a/test/MC/ELF/size.s b/test/MC/ELF/size.s index c5f5222e26b..a19bce08f1a 100644 --- a/test/MC/ELF/size.s +++ b/test/MC/ELF/size.s @@ -2,8 +2,8 @@ // Mostly a test that this doesn't crash anymore. -// CHECK: # Symbol 0x4 -// CHECK-NEXT: (('st_name', 0x1) # 'foo' -// CHECK-NEXT: ('st_bind', 0x1) +// CHECK: # Symbol 4 +// CHECK-NEXT: (('st_name', 1) # 'foo' +// CHECK-NEXT: ('st_bind', 1) .size foo, .Lbar-foo diff --git a/test/MC/ELF/sleb.s b/test/MC/ELF/sleb.s index 99631bfb4f6..c3e471f6250 100644 --- a/test/MC/ELF/sleb.s +++ b/test/MC/ELF/sleb.s @@ -19,9 +19,9 @@ foo: .sleb128 8193 -// ELF_32: ('sh_name', 0x1) # '.text' +// ELF_32: ('sh_name', 1) # '.text' // ELF_32: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000') -// ELF_64: ('sh_name', 0x1) # '.text' +// ELF_64: ('sh_name', 1) # '.text' // ELF_64: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000') // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // MACHO_32: ('_section_data', '00017f3f 40c000bf 7fff3f80 4081c000') diff --git a/test/MC/ELF/uleb.s b/test/MC/ELF/uleb.s index 80e48b36db7..d8d1727af7c 100644 --- a/test/MC/ELF/uleb.s +++ b/test/MC/ELF/uleb.s @@ -12,9 +12,9 @@ foo: .uleb128 16383 .uleb128 16384 -// ELF_32: ('sh_name', 0x1) # '.text' +// ELF_32: ('sh_name', 1) # '.text' // ELF_32: ('_section_data', '00017f80 01ff7f80 8001') -// ELF_64: ('sh_name', 0x1) # '.text' +// ELF_64: ('sh_name', 1) # '.text' // ELF_64: ('_section_data', '00017f80 01ff7f80 8001') // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') diff --git a/test/MC/ELF/undef.s b/test/MC/ELF/undef.s index 9c2564f8659..1f6a52bffe5 100644 --- a/test/MC/ELF/undef.s +++ b/test/MC/ELF/undef.s @@ -19,27 +19,27 @@ movsd .Lsym8(%rip), %xmm1 // CHECK: ('_symbols', [ -// CHECK-NEXT: # Symbol 0x0 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x1 -// CHECK-NEXT: (('st_name', 0xd) # '.Lsym8' -// CHECK: # Symbol 0x2 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x3 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x4 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x5 -// CHECK-NEXT: (('st_name', 0x0) # '' -// CHECK: # Symbol 0x6 -// CHECK-NEXT: (('st_name', 0x1) # '.Lsym1' -// CHECK: # Symbol 0x7 -// CHECK-NEXT: (('st_name', 0x8) # 'sym6' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK-NEXT: ('st_type', 0x1) -// CHECK-NEXT: ('st_other', 0x0) -// CHECK-NEXT: ('st_shndx', 0x0) -// CHECK-NEXT: ('st_value', 0x0) -// CHECK-NEXT: ('st_size', 0x0) +// CHECK-NEXT: # Symbol 0 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK: # Symbol 1 +// CHECK-NEXT: (('st_name', 13) # '.Lsym8' +// CHECK: # Symbol 2 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK: # Symbol 3 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK: # Symbol 4 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK: # Symbol 5 +// CHECK-NEXT: (('st_name', 0) # '' +// CHECK: # Symbol 6 +// CHECK-NEXT: (('st_name', 1) # '.Lsym1' +// CHECK: # Symbol 7 +// CHECK-NEXT: (('st_name', 8) # 'sym6' +// CHECK-NEXT: ('st_bind', 1) +// CHECK-NEXT: ('st_type', 1) +// CHECK-NEXT: ('st_other', 0) +// CHECK-NEXT: ('st_shndx', 0) +// CHECK-NEXT: ('st_value', 0) +// CHECK-NEXT: ('st_size', 0) // CHECK-NEXT: ), // CHECK-NEXT: ]) diff --git a/test/MC/ELF/undef2.s b/test/MC/ELF/undef2.s index a02b8b19ebe..764f1d7bd3d 100644 --- a/test/MC/ELF/undef2.s +++ b/test/MC/ELF/undef2.s @@ -5,6 +5,6 @@ je .Lfoo // CHECK: ('_symbols', [ -// CHECK: (('st_name', 0x1) # '.Lfoo' -// CHECK-NEXT: ('st_bind', 0x1) -// CHECK: (('sh_name', 0x24) # '.strtab' +// CHECK: (('st_name', 1) # '.Lfoo' +// CHECK-NEXT: ('st_bind', 1) +// CHECK: (('sh_name', 36) # '.strtab' diff --git a/test/MC/ELF/weak.s b/test/MC/ELF/weak.s index 7f1abd9c516..0b93a871183 100644 --- a/test/MC/ELF/weak.s +++ b/test/MC/ELF/weak.s @@ -9,22 +9,22 @@ .weak bar bar: -//CHECK: # Symbol 0x4 -//CHECK-NEXT: (('st_name', 0x5) # 'bar' -//CHECK-NEXT: ('st_bind', 0x2) -//CHECK-NEXT: ('st_type', 0x0) -//CHECK-NEXT: ('st_other', 0x0) -//CHECK-NEXT: ('st_shndx', 0x1) -//CHECK-NEXT: ('st_value', 0x0) -//CHECK-NEXT: ('st_size', 0x0) +//CHECK: # Symbol 4 +//CHECK-NEXT: (('st_name', 5) # 'bar' +//CHECK-NEXT: ('st_bind', 2) +//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: ), -//CHECK-NEXT: # Symbol 0x5 -//CHECK: (('st_name', 0x1) # 'foo' -//CHECK-NEXT: ('st_bind', 0x2) -//CHECK-NEXT: ('st_type', 0x0) -//CHECK-NEXT: ('st_other', 0x0) -//CHECK-NEXT: ('st_shndx', 0x0) -//CHECK-NEXT: ('st_value', 0x0) -//CHECK-NEXT: ('st_size', 0x0) +//CHECK-NEXT: # Symbol 5 +//CHECK: (('st_name', 1) # 'foo' +//CHECK-NEXT: ('st_bind', 2) +//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: ), //CHECK-NEXT: ]) diff --git a/test/MC/ELF/zero.s b/test/MC/ELF/zero.s index 77223c3ca81..a7518e1e4fd 100644 --- a/test/MC/ELF/zero.s +++ b/test/MC/ELF/zero.s @@ -3,14 +3,14 @@ .zero 4 .zero 1,42 -// CHECK: ('sh_name', 0x1) # '.text' -// CHECK: ('sh_type', 0x1) -// CHECK: ('sh_flags', 0x6) -// CHECK: ('sh_addr', 0x0) -// CHECK: ('sh_offset', 0x40) -// CHECK: ('sh_size', 0x5) -// CHECK: ('sh_link', 0x0) -// CHECK: ('sh_info', 0x0) -// CHECK: ('sh_addralign', 0x4) -// CHECK: ('sh_entsize', 0x0) +// CHECK: ('sh_name', 1) # '.text' +// CHECK: ('sh_type', 1) +// CHECK: ('sh_flags', 6) +// CHECK: ('sh_addr', 0) +// CHECK: ('sh_offset', 64) +// CHECK: ('sh_size', 5) +// CHECK: ('sh_link', 0) +// CHECK: ('sh_info', 0) +// CHECK: ('sh_addralign', 4) +// CHECK: ('sh_entsize', 0) // CHECK: ('_section_data', '00000000 2a') diff --git a/test/Scripts/elf-dump b/test/Scripts/elf-dump index f6ec186e50d..1db4c49cc6b 100755 --- a/test/Scripts/elf-dump +++ b/test/Scripts/elf-dump @@ -77,16 +77,16 @@ class Section: self.sh_entsize = f.readWord() def dump(self, shstrtab, f, strtab, dumpdata): - print " (('sh_name', %s)" % hex(self.sh_name), "# %r" % shstrtab[self.sh_name] - print " ('sh_type', %s)" % hex(self.sh_type) - print " ('sh_flags', %s)" % hex(self.sh_flags) - print " ('sh_addr', %s)" % hex(self.sh_addr) - print " ('sh_offset', %s)" % hex(self.sh_offset) - print " ('sh_size', %s)" % hex(self.sh_size) - print " ('sh_link', %s)" % hex(self.sh_link) - print " ('sh_info', %s)" % hex(self.sh_info) - print " ('sh_addralign', %s)" % hex(self.sh_addralign) - print " ('sh_entsize', %s)" % hex(self.sh_entsize) + print " (('sh_name', %d) # %r" % (self.sh_name, shstrtab[self.sh_name]) + print " ('sh_type', %d)" % self.sh_type + print " ('sh_flags', %d)" % self.sh_flags + print " ('sh_addr', %d)" % self.sh_addr + print " ('sh_offset', %d)" % self.sh_offset + print " ('sh_size', %d)" % self.sh_size + print " ('sh_link', %d)" % self.sh_link + print " ('sh_info', %d)" % self.sh_info + print " ('sh_addralign', %d)" % self.sh_addralign + print " ('sh_entsize', %d)" % self.sh_entsize if self.sh_type == 2: # SHT_SYMTAB print " ('_symbols', [" dumpSymtab(f, self, strtab) @@ -106,20 +106,20 @@ def dumpSymtab(f, section, strtab): for index in range(entries): f.seek(section.sh_offset + index * section.sh_entsize) - print " # Symbol %s" % hex(index) + print " # Symbol %d" % index name = f.read32() - print " (('st_name', %s)" % hex(name), "# %r" % strtab[name] + print " (('st_name', %d) # %r" % (name, strtab[name]) if not f.is64Bit: - print " ('st_value', %s)" % hex(f.read32()) - print " ('st_size', %s)" % hex(f.read32()) + print " ('st_value', %d)" % f.read32() + print " ('st_size', %d)" % f.read32() st_info = f.read8() - print " ('st_bind', %s)" % hex((st_info >> 4)) - print " ('st_type', %s)" % hex((st_info & 0xf)) - print " ('st_other', %s)" % hex(f.read8()) - print " ('st_shndx', %s)" % hex(f.read16()) + print " ('st_bind', %d)" % (st_info >> 4) + print " ('st_type', %d)" % (st_info & 0xf) + print " ('st_other', %d)" % f.read8() + print " ('st_shndx', %d)" % f.read16() if f.is64Bit: - print " ('st_value', %s)" % hex(f.read64()) - print " ('st_size', %s)" % hex(f.read64()) + print " ('st_value', %d)" % f.read64() + print " ('st_size', %d)" % f.read64() print " )," def dumpRel(f, section, dumprela = False): @@ -127,17 +127,17 @@ def dumpRel(f, section, dumprela = False): for index in range(entries): f.seek(section.sh_offset + index * section.sh_entsize) - print " # Relocation %s" % hex(index) - print " (('r_offset', %s)" % hex(f.readWord()) + print " # Relocation %d" % index + print " (('r_offset', %d)" % f.readWord() r_info = f.readWord() if f.is64Bit: - print " ('r_sym', %s)" % hex((r_info >> 32)) - print " ('r_type', %s)" % hex((r_info & 0xffffffff)) + print " ('r_sym', %d)" % (r_info >> 32) + print " ('r_type', %d)" % (r_info & 0xffffffff) else: - print " ('r_sym', %s)" % hex((r_info >> 8)) - print " ('r_type', %s)" % hex((r_info & 0xff)) + print " ('r_sym', %d)" % (r_info >> 8) + print " ('r_type', %d)" % (r_info & 0xff) if dumprela: - print " ('r_addend', %s)" % hex(f.readWordS()) + print " ('r_addend', %d)" % f.readWordS() print " )," def dumpELF(path, opts): @@ -152,8 +152,8 @@ def dumpELF(path, opts): elif fileclass == 2: # ELFCLASS64 f.is64Bit = True else: - raise ValueError, "Unknown file class %s" % hex(fileclass) - print "('e_indent[EI_CLASS]', %s)" % hex(fileclass) + raise ValueError, "Unknown file class %d" % fileclass + print "('e_indent[EI_CLASS]', %d)" % fileclass byteordering = f.read8() if byteordering == 1: # ELFDATA2LSB @@ -161,32 +161,32 @@ def dumpELF(path, opts): elif byteordering == 2: # ELFDATA2MSB f.isLSB = False else: - raise ValueError, "Unknown byte ordering %s" % hex(byteordering) - print "('e_indent[EI_DATA]', %s)" % hex(byteordering) + raise ValueError, "Unknown byte ordering %d" % byteordering + print "('e_indent[EI_DATA]', %d)" % byteordering - print "('e_indent[EI_VERSION]', %s)" % hex(f.read8()) - print "('e_indent[EI_OSABI]', %s)" % hex(f.read8()) - print "('e_indent[EI_ABIVERSION]', %s)" % hex(f.read8()) + print "('e_indent[EI_VERSION]', %d)" % f.read8() + print "('e_indent[EI_OSABI]', %d)" % f.read8() + print "('e_indent[EI_ABIVERSION]', %d)" % f.read8() f.seek(16) # Seek to end of e_ident. - print "('e_type', %s)" % hex(f.read16()) - print "('e_machine', %s)" % hex(f.read16()) - print "('e_version', %s)" % hex(f.read32()) - print "('e_entry', %s)" % hex(f.readWord()) - print "('e_phoff', %s)" % hex(f.readWord()) + print "('e_type', %d)" % f.read16() + print "('e_machine', %d)" % f.read16() + print "('e_version', %d)" % f.read32() + print "('e_entry', %d)" % f.readWord() + print "('e_phoff', %d)" % f.readWord() e_shoff = f.readWord() - print "('e_shoff', %s)" % hex(e_shoff) - print "('e_flags', %s)" % hex(f.read32()) - print "('e_ehsize', %s)" % hex(f.read16()) - print "('e_phentsize', %s)" % hex(f.read16()) - print "('e_phnum', %s)" % hex(f.read16()) + print "('e_shoff', %d)" % e_shoff + print "('e_flags', %d)" % f.read32() + print "('e_ehsize', %d)" % f.read16() + print "('e_phentsize', %d)" % f.read16() + print "('e_phnum', %d)" % f.read16() e_shentsize = f.read16() - print "('e_shentsize', %s)" % hex(e_shentsize) + print "('e_shentsize', %d)" % e_shentsize e_shnum = f.read16() - print "('e_shnum', %s)" % hex(e_shnum) + print "('e_shnum', %d)" % e_shnum e_shstrndx = f.read16() - print "('e_shstrndx', %s)" % hex(e_shstrndx) + print "('e_shstrndx', %d)" % e_shstrndx # Read all section headers sections = [] @@ -209,7 +209,7 @@ def dumpELF(path, opts): print "('_sections', [" for index in range(e_shnum): - print " # Section %s" % hex(index) + print " # Section %d" % index sections[index].dump(shstrtab, f, strtab, opts.dumpSectionData) print "])"