1 // RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
3 // Test that we produce the correct relocation types and that the relocation
4 // to .Lfoo uses the symbol and not the section.
8 // CHECK-NEXT: (('sh_name', 13) # '.bss'
11 // CHECK-NEXT: (('st_name', 5) # '.Lfoo'
13 // Symbol 6 is section 3
15 // CHECK-NEXT: (('st_name', 0) # ''
16 // CHECK-NEXT: ('st_value', 0)
17 // CHECK-NEXT: ('st_size', 0)
18 // CHECK-NEXT: ('st_bind', 0)
19 // CHECK-NEXT: ('st_type', 3)
20 // CHECK-NEXT: ('st_other', 0)
21 // CHECK-NEXT: ('st_shndx', 3)
23 // CHECK: # Relocation 0
24 // CHECK-NEXT: (('r_offset', 2)
25 // CHECK-NEXT: ('r_sym', 1)
26 // CHECK-NEXT: ('r_type', 9)
28 // CHECK-NEXT: # Relocation 1
29 // CHECK-NEXT: (('r_offset',
30 // CHECK-NEXT: ('r_sym',
31 // CHECK-NEXT: ('r_type', 4)
33 // CHECK-NEXT: # Relocation 2
34 // CHECK-NEXT: (('r_offset',
35 // CHECK-NEXT: ('r_sym',
36 // CHECK-NEXT: ('r_type', 10)
39 // Relocation 3 (bar3@GOTOFF) is done symbol 6 (bss)
40 // CHECK-NEXT: # Relocation 3
41 // CHECK-NEXT: (('r_offset',
42 // CHECK-NEXT: ('r_sym', 6
43 // CHECK-NEXT: ('r_type',
48 leal .Lfoo@GOTOFF(%ebx), %eax
53 addl $_GLOBAL_OFFSET_TABLE_, %ebx
54 movb bar3@GOTOFF(%ebx), %al
60 .section .rodata.str1.16,"aMS",@progbits,1
62 .asciz "bool llvm::llvm_start_multithreaded()"