aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ELF/relocation-386.s
blob: 68dc13268dfc68589136dd2e3a40972c5477ab76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck  %s

// Test that we produce the correct relocation types and that the relocation
// to .Lfoo uses the symbol and not the section.


// CHECK:      # Symbol 1
// CHECK-NEXT: (('st_name', 5) # '.Lfoo'

// CHECK:      # Relocation 0
// CHECK-NEXT: (('r_offset', 2)
// CHECK-NEXT:  ('r_sym', 1)
// CHECK-NEXT:  ('r_type', 9)
// CHECK-NEXT: ),
// CHECK-NEXT:  # Relocation 1
// CHECK-NEXT: (('r_offset',
// CHECK-NEXT:  ('r_sym',
// CHECK-NEXT:  ('r_type', 4)
// CHECK-NEXT: ),
// CHECK-NEXT:  # Relocation 2
// CHECK-NEXT: (('r_offset',
// CHECK-NEXT:  ('r_sym',
// CHECK-NEXT:  ('r_type', 10)
// CHECK-NEXT: ),

        .text
bar:
	leal	.Lfoo@GOTOFF(%ebx), %eax

        .global bar2
bar2:
	calll	bar2@PLT
	addl	$_GLOBAL_OFFSET_TABLE_, %ebx

        .section	.rodata.str1.16,"aMS",@progbits,1
.Lfoo:
	.asciz	 "bool llvm::llvm_start_multithreaded()"