1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s 2 3 // Test that we emit the correct value. 4 5 .set kernbase,0xffffffff80000000 6 7 // CHECK: (('st_name', 0x00000001) # 'kernbase' 8 // CHECK-NEXT: ('st_bind', 0x0) 9 // CHECK-NEXT: ('st_type', 0x0) 10 // CHECK-NEXT: ('st_other', 0x00) 11 // CHECK-NEXT: ('st_shndx', 0xfff1) 12 // CHECK-NEXT: ('st_value', 0xffffffff80000000) 13 // CHECK-NEXT: ('st_size', 0x0000000000000000) 14 // CHECK-NEXT: ), 15 16 // Test that we accept .set of a symbol after it has been used in a statement. 17 18 jmp foo 19 .set foo, bar 20 21 // or a .quad 22 23 .quad foo2 24 .set foo2,bar2 25 26 // Test that there is an undefined reference to bar 27 // CHECK: (('st_name', 0x0000000a) # 'bar' 28 // CHECK-NEXT: ('st_bind', 0x1) 29 // CHECK-NEXT: ('st_type', 0x0) 30 // CHECK-NEXT: ('st_other', 0x00) 31 // CHECK-NEXT: ('st_shndx', 0x0000) 32 // CHECK-NEXT: ('st_value', 0x0000000000000000) 33 // CHECK-NEXT: ('st_size', 0x0000000000000000) 34 // CHECK-NEXT: ), 35