Skip to content

Commit

Permalink
Print st_bind with the correct number of bits.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136874 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
espindola committed Aug 4, 2011
1 parent a83f8ef commit d7c2783
Show file tree
Hide file tree
Showing 31 changed files with 101 additions and 99 deletions.
2 changes: 1 addition & 1 deletion test/CodeGen/ARM/2010-12-15-elf-lcomm.ll
Expand Up @@ -21,7 +21,7 @@
; OBJ: 'array00'
; OBJ-NEXT: 'st_value', 0x00000000
; OBJ-NEXT: 'st_size', 0x00000050
; OBJ-NEXT: 'st_bind', 0x00000000
; OBJ-NEXT: 'st_bind', 0x0
; OBJ-NEXT: 'st_type', 0x00000001
; OBJ-NEXT: 'st_other', 0x00000000
; OBJ-NEXT: 'st_shndx', 0x00000004
Expand Down
2 changes: 1 addition & 1 deletion test/MC/ARM/elf-thumbfunc.s
Expand Up @@ -16,5 +16,5 @@ foo:
@CHECK-NEXT: 'st_name', 0x00000001
@CHECK-NEXT: 'st_value', 0x00000001
@CHECK-NEXT: 'st_size', 0x00000000
@CHECK-NEXT: 'st_bind', 0x00000001
@CHECK-NEXT: 'st_bind', 0x1
@CHECK-NEXT: 'st_type', 0x00000002
2 changes: 1 addition & 1 deletion test/MC/ELF/abs.s
Expand Up @@ -8,7 +8,7 @@

// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000001) # 'zed'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x0000fff1)
Expand Down
4 changes: 2 additions & 2 deletions test/MC/ELF/alias-reloc.s
Expand Up @@ -33,7 +33,7 @@ foo2:

// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand All @@ -43,7 +43,7 @@ foo2:

// CHECK: # Symbol 6
// CHECK-NEXT: (('st_name', 0x0000000e) # 'bar2'
// CHECK-NEXT: ('st_bind', 0x00000002)
// CHECK-NEXT: ('st_bind', 0x2)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000004)
Expand Down
14 changes: 7 additions & 7 deletions test/MC/ELF/alias.s
Expand Up @@ -18,7 +18,7 @@ bar4 = foo4
.long foo2
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand All @@ -27,7 +27,7 @@ bar4 = foo4
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 2
// CHECK-NEXT: (('st_name', 0x0000001d) # 'bar4'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000002)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand All @@ -36,7 +36,7 @@ bar4 = foo4
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 3
// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand All @@ -45,7 +45,7 @@ bar4 = foo4
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 4
// CHECK-NEXT: (('st_name', 0x0000000e) # 'foo3'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand All @@ -54,7 +54,7 @@ bar4 = foo4
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 5
// CHECK-NEXT: (('st_name', 0x00000018) # 'foo4'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000002)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand All @@ -69,15 +69,15 @@ bar4 = foo4
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK: # Symbol 9
// CHECK-NEXT: (('st_name', 0x00000013) # 'bar3'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
// CHECK-NEXT: ('st_value', 0x0000000000000000)
// CHECK-NEXT: ('st_size', 0x0000000000000000)
// CHECK: # Symbol 10
// CHECK-NEXT: (('st_name', 0x00000009) # 'bar2'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000000)
Expand Down
10 changes: 5 additions & 5 deletions test/MC/ELF/basic-elf-32.s
Expand Up @@ -60,19 +60,19 @@ main: # @main
// CHECK: ),
// CHECK: ])

// CHECK: ('st_bind', 0x00000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x00000003)

// CHECK: ('st_bind', 0x00000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x00000003)

// CHECK: ('st_bind', 0x00000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x00000003)

// CHECK: # 'main'
// CHECK: ('st_bind', 0x00000001)
// CHECK: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000002)

// CHECK: # 'puts'
// CHECK: ('st_bind', 0x00000001)
// CHECK: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
10 changes: 5 additions & 5 deletions test/MC/ELF/basic-elf-64.s
Expand Up @@ -64,19 +64,19 @@ main: # @main
// CHECK: ),
// CHECK: ])

// CHECK: ('st_bind', 0x00000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x00000003)

// CHECK: ('st_bind', 0x00000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x00000003)

// CHECK: ('st_bind', 0x00000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x00000003)

// CHECK: # 'main'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000002)

// CHECK: # 'puts'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
6 changes: 3 additions & 3 deletions test/MC/ELF/comdat.s
Expand Up @@ -44,7 +44,7 @@

// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000001) # 'g1'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000007)
Expand All @@ -53,7 +53,7 @@
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 2
// CHECK-NEXT: (('st_name', 0x00000004) # 'g2'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000002)
Expand All @@ -63,7 +63,7 @@

// CHECK: # Symbol 13
// CHECK-NEXT: (('st_name', 0x00000007) # 'g3'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000000)
Expand Down
12 changes: 6 additions & 6 deletions test/MC/ELF/common.s
Expand Up @@ -9,7 +9,7 @@
.comm common1,1,1

// CHECK: ('st_name', 0x00000001) # 'common1'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000001)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx',
Expand All @@ -23,7 +23,7 @@
.comm common2,1,1

// CHECK: ('st_name', 0x00000009) # 'common2'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000001)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx',
Expand All @@ -35,7 +35,7 @@

// CHECK: # Symbol 3
// CHECK-NEXT: (('st_name', 0x00000011) # 'common6'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000001)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000004)
Expand All @@ -48,7 +48,7 @@
.comm common3,4,4

// CHECK: ('st_name', 0x00000019) # 'common3'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000001)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x0000fff2)
Expand All @@ -68,7 +68,7 @@ foo:
.comm common4,40,16

// CHECK: ('st_name', 0x00000025) # 'common4'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000001)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x0000fff2)
Expand All @@ -79,7 +79,7 @@ foo:

// CHECK: # Symbol 9
// CHECK-NEXT: (('st_name', 0x0000002d) # 'common5'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000001)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x0000fff2)
Expand Down
4 changes: 2 additions & 2 deletions test/MC/ELF/file.s
Expand Up @@ -6,7 +6,7 @@
foa:
// CHECK: # Symbol 1
// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000004)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x0000fff1)
Expand All @@ -15,7 +15,7 @@ foa:
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 2
// CHECK-NEXT: (('st_name', 0x00000005) # 'foa'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand Down
2 changes: 1 addition & 1 deletion test/MC/ELF/got.s
Expand Up @@ -22,4 +22,4 @@
// CHECK-NEXT: ])

// CHECK: (('st_name', 0x00000005) # '_GLOBAL_OFFSET_TABLE_'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
2 changes: 1 addition & 1 deletion test/MC/ELF/local-reloc.s
Expand Up @@ -23,7 +23,7 @@ foo:
// Symbol number 2 is section number 1
// CHECK: # Symbol 2
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand Down
2 changes: 1 addition & 1 deletion test/MC/ELF/merge.s
Expand Up @@ -87,7 +87,7 @@ foo:
// Symbol number 6 is section 5
// CHECK: # Symbol 6
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000005)
Expand Down
2 changes: 1 addition & 1 deletion test/MC/ELF/noexec.s
Expand Up @@ -15,7 +15,7 @@

// CHECK: # Symbol 4
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000004)
Expand Down
2 changes: 1 addition & 1 deletion test/MC/ELF/pic-diff.s
Expand Up @@ -11,7 +11,7 @@

// CHECK: # Symbol 5
// CHECK-NEXT: (('st_name', 0x00000005) # 'baz'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000000)
Expand Down
4 changes: 2 additions & 2 deletions test/MC/ELF/pr9292.s
Expand Up @@ -8,7 +8,7 @@ mov %eax,bar


// CHECK: (('st_name', 0x00000005) # 'bar'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000000)
Expand All @@ -17,7 +17,7 @@ mov %eax,bar
// CHECK-NEXT: ),
// CHECK-NEXT: # Symbol 5
// CHECK-NEXT: (('st_name', 0x00000001) # 'foo'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000000)
Expand Down
4 changes: 2 additions & 2 deletions test/MC/ELF/relocation-386.s
Expand Up @@ -173,7 +173,7 @@
// CHECK-NEXT: (('st_name', 0x00000035) # 'zed'
// CHECK-NEXT: ('st_value', 0x00000000)
// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000006)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000005)
Expand All @@ -183,7 +183,7 @@
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_value', 0x00000000)
// CHECK-NEXT: ('st_size', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000004)
Expand Down
2 changes: 1 addition & 1 deletion test/MC/ELF/relocation.s
Expand Up @@ -115,7 +115,7 @@ bar:

// CHECK: # Symbol 2
// CHECK: (('st_name', 0x00000000) # ''
// CHECK: ('st_bind', 0x00000000)
// CHECK: ('st_bind', 0x0)
// CHECK: ('st_type', 0x00000003)
// CHECK: ('st_other', 0x00000000)
// CHECK: ('st_shndx', 0x00000001)
2 changes: 1 addition & 1 deletion test/MC/ELF/rename.s
Expand Up @@ -38,7 +38,7 @@ defined3:
// Symbol 2 is section 1
// CHECK: # Symbol 2
// CHECK-NEXT: (('st_name', 0x00000000) # ''
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000003)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000001)
Expand Down
4 changes: 2 additions & 2 deletions test/MC/ELF/set.s
Expand Up @@ -5,7 +5,7 @@
.set kernbase,0xffffffff80000000

// CHECK: (('st_name', 0x00000001) # 'kernbase'
// CHECK-NEXT: ('st_bind', 0x00000000)
// CHECK-NEXT: ('st_bind', 0x0)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x0000fff1)
Expand All @@ -25,7 +25,7 @@

// Test that there is an undefined reference to bar
// CHECK: (('st_name', 0x0000000a) # 'bar'
// CHECK-NEXT: ('st_bind', 0x00000001)
// CHECK-NEXT: ('st_bind', 0x1)
// CHECK-NEXT: ('st_type', 0x00000000)
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000000)
Expand Down

0 comments on commit d7c2783

Please sign in to comment.