Add tests for NEON encoding of vsubhn and vrsubhn.
[oota-llvm.git] / test / MC / ELF / relocation-386.s
1 // RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck  %s
2
3 // Test that we produce the correct relocation types and that the relocation
4 // to .Lfoo uses the symbol and not the section.
5
6 // Section 3 is bss
7 // CHECK:      # Section 0x00000003
8 // CHECK-NEXT: (('sh_name', 0x0000000d) # '.bss'
9
10 // CHECK:      # Symbol 0x00000001
11 // CHECK-NEXT: (('st_name', 0x00000005) # '.Lfoo'
12
13 // Symbol 6 is section 3
14 // CHECK:      # Symbol 0x00000006
15 // CHECK-NEXT: (('st_name', 0x00000000) # ''
16 // CHECK-NEXT:  ('st_value', 0x00000000)
17 // CHECK-NEXT:  ('st_size', 0x00000000)
18 // CHECK-NEXT:  ('st_bind', 0x00000000)
19 // CHECK-NEXT:  ('st_type', 0x00000003)
20 // CHECK-NEXT:  ('st_other', 0x00000000)
21 // CHECK-NEXT:  ('st_shndx', 0x00000003)
22
23 // CHECK:      # Relocation 0x00000000
24 // CHECK-NEXT: (('r_offset', 0x00000002)
25 // CHECK-NEXT:  ('r_sym', 0x00000001)
26 // CHECK-NEXT:  ('r_type', 0x00000009)
27 // CHECK-NEXT: ),
28 // CHECK-NEXT:  # Relocation 0x00000001
29 // CHECK-NEXT: (('r_offset',
30 // CHECK-NEXT:  ('r_sym',
31 // CHECK-NEXT:  ('r_type', 0x00000004)
32 // CHECK-NEXT: ),
33 // CHECK-NEXT:  # Relocation 0x00000002
34 // CHECK-NEXT: (('r_offset',
35 // CHECK-NEXT:  ('r_sym',
36 // CHECK-NEXT:  ('r_type', 0x0000000a)
37 // CHECK-NEXT: ),
38
39 // Relocation 3 (bar3@GOTOFF) is done with symbol 6 (bss)
40 // CHECK-NEXT:  # Relocation 0x00000003
41 // CHECK-NEXT: (('r_offset',
42 // CHECK-NEXT:  ('r_sym', 0x00000006
43 // CHECK-NEXT:  ('r_type',
44 // CHECK-NEXT: ),
45
46 // Relocation 4 (bar2@GOT) is of type R_386_GOT32
47 // CHECK-NEXT:  # Relocation 0x00000004
48 // CHECK-NEXT: (('r_offset',
49 // CHECK-NEXT:  ('r_sym',
50 // CHECK-NEXT:  ('r_type', 0x00000003
51 // CHECK-NEXT: ),
52
53         .text
54 bar:
55         leal    .Lfoo@GOTOFF(%ebx), %eax
56
57         .global bar2
58 bar2:
59         calll   bar2@PLT
60         addl    $_GLOBAL_OFFSET_TABLE_, %ebx
61         movb    bar3@GOTOFF(%ebx), %al
62
63         .type   bar3,@object
64         .local  bar3
65         .comm   bar3,1,1
66
67         movl    bar2j@GOT(%eax), %eax
68
69         .section        .rodata.str1.16,"aMS",@progbits,1
70 .Lfoo:
71         .asciz   "bool llvm::llvm_start_multithreaded()"