Handle GOTOFF correctly on i386.
[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 a GOTOFF and that the relocation uses the symbol and not
4 // the section.
5
6
7 // CHECK:      # Symbol 1
8 // CHECK-NEXT: (('st_name', 5) # '.Lfoo'
9
10 // CHECK:      # Relocation 0
11 // CHECK-NEXT: (('r_offset', 2)
12 // CHECK-NEXT:  ('r_sym', 1)
13 // CHECK-NEXT:  ('r_type', 9)
14
15         .text
16 bar:
17         leal    .Lfoo@GOTOFF(%ebx), %eax
18         .section        .rodata.str1.16,"aMS",@progbits,1
19 .Lfoo:
20         .asciz   "bool llvm::llvm_start_multithreaded()"