Fixed some bugs.
[llvm/zpu.git] / test / MC / ELF / weak.s
blobf1a66b5e03c172b79248a7664b792804b0172bf1
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
3 // Test that this produces a weak undefined symbol.
5 .weak foo
6 .long foo
8 // And that bar is after all local symbols and has non zero value.
9 .weak bar
10 bar:
12 //CHECK: # Symbol 0x00000004
13 //CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
14 //CHECK-NEXT: ('st_bind', 0x00000002)
15 //CHECK-NEXT: ('st_type', 0x00000000)
16 //CHECK-NEXT: ('st_other', 0x00000000)
17 //CHECK-NEXT: ('st_shndx', 0x00000001)
18 //CHECK-NEXT: ('st_value', 0x00000004)
19 //CHECK-NEXT: ('st_size', 0x00000000)
20 //CHECK-NEXT: ),
21 //CHECK-NEXT: # Symbol 0x00000005
22 //CHECK: (('st_name', 0x00000001) # 'foo'
23 //CHECK-NEXT: ('st_bind', 0x00000002)
24 //CHECK-NEXT: ('st_type', 0x00000000)
25 //CHECK-NEXT: ('st_other', 0x00000000)
26 //CHECK-NEXT: ('st_shndx', 0x00000000)
27 //CHECK-NEXT: ('st_value', 0x00000000)
28 //CHECK-NEXT: ('st_size', 0x00000000)
29 //CHECK-NEXT: ),
30 //CHECK-NEXT: ])