Silence -Wunused-variable in release builds.
[llvm/stm8.git] / test / MC / ELF / set.s
blob69d6c910636f87b785186b0d96fd5c1bccc684c8
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
3 // Test that we emit the correct value.
5 .set kernbase,0xffffffff80000000
7 // CHECK: (('st_name', 0x00000001) # 'kernbase'
8 // CHECK-NEXT: ('st_bind', 0x00000000)
9 // CHECK-NEXT: ('st_type', 0x00000000)
10 // CHECK-NEXT: ('st_other', 0x00000000)
11 // CHECK-NEXT: ('st_shndx', 0x0000fff1)
12 // CHECK-NEXT: ('st_value', 0xffffffff80000000)
13 // CHECK-NEXT: ('st_size', 0x0000000000000000)
14 // CHECK-NEXT: ),
16 // Test that we accept .set of a symbol after it has been used in a statement.
18 jmp foo
19 .set foo, bar
21 // or a .quad
23 .quad foo2
24 .set foo2,bar2
26 // Test that there is an undefined reference to bar
27 // CHECK: (('st_name', 0x0000000a) # 'bar'
28 // CHECK-NEXT: ('st_bind', 0x00000001)
29 // CHECK-NEXT: ('st_type', 0x00000000)
30 // CHECK-NEXT: ('st_other', 0x00000000)
31 // CHECK-NEXT: ('st_shndx', 0x00000000)
32 // CHECK-NEXT: ('st_value', 0x0000000000000000)
33 // CHECK-NEXT: ('st_size', 0x0000000000000000)
34 // CHECK-NEXT: ),