]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/arm-target1.s
Vendor import of lld trunk r290819:
[FreeBSD/FreeBSD.git] / test / ELF / arm-target1.s
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
3 // RUN: llvm-readobj -r %t.o | FileCheck %s --check-prefix=RELOC
4 // RUN: ld.lld -shared %t.o -o %t2.so --target1-rel
5 // RUN: llvm-objdump -t -d %t2.so | FileCheck %s \
6 // RUN:   --check-prefix=RELATIVE
7 // RUN: not ld.lld -shared %t.o -o %t3.so 2>&1 | FileCheck %s \
8 // RUN:   --check-prefix=ABS
9
10 // RUN: ld.lld -shared %t.o -o %t2.so --target1-abs --target1-rel
11 // RUN: llvm-objdump -t -d %t2.so | FileCheck %s \
12 // RUN:   --check-prefix=RELATIVE
13 // RUN: not ld.lld -shared %t.o -o %t3.so --target1-rel --target1-abs 2>&1 \
14 // RUN:   | FileCheck %s --check-prefix=ABS
15
16 // RELOC: Relocations [
17 // RELOC:   .rel.text {
18 // RELOC:     0x0 R_ARM_TARGET1 patatino 0x0
19 // RELOC:   }
20 // RELOC: ]
21
22 .text
23   .word patatino(target1)
24   patatino:
25
26 // RELATIVE: Disassembly of section .text:
27 // RELATIVE: $d.0:
28 // RELATIVE:     1000:       04 00 00 00     .word   0x00000004
29 // RELATIVE: SYMBOL TABLE:
30 // RELATIVE: 00001004         .text           00000000 patatino
31
32 // ABS: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_ARM_TARGET1 against symbol 'patatino' defined in {{.*}}.o