brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 1d8ea5f Raw
38 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o3// RUN: llvm-readobj -r %t.o | FileCheck %s --check-prefix=RELOC4// RUN: ld.lld -shared %t.o -o %t2.so --target1-rel5// RUN: llvm-objdump -t -d %t2.so | FileCheck %s \6// RUN:   --check-prefix=RELATIVE7// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s \8// RUN:   --check-prefix=ABS9 10// RUN: ld.lld -shared %t.o -o %t2.so --target1-abs --target1-rel11// RUN: llvm-objdump -t -d %t2.so | FileCheck %s \12// RUN:   --check-prefix=RELATIVE13// RUN: not ld.lld -shared %t.o -o /dev/null --target1-rel --target1-abs 2>&1 \14// RUN:   | FileCheck %s --check-prefix=ABS15 16// RELOC: Relocations [17// RELOC:   .rel.text {18// RELOC:     0x0 R_ARM_TARGET1 patatino19// RELOC:   }20// RELOC: ]21 22.text23  .word patatino(target1)24  patatino:25        .word 3226// Force generation of $d.0 as section is not all data27  nop28// RELATIVE: SYMBOL TABLE:29// RELATIVE: 00010154 l       .text           00000000 patatino30// RELATIVE: Disassembly of section .text:31// RELATIVE-EMPTY:32// RELATIVE: <.text>:33// RELATIVE:     10150:       04 00 00 00     .word   0x0000000434 35// ABS: relocation R_ARM_TARGET1 cannot be used against symbol 'patatino'; recompile with -fPIC36// ABS: >>> defined in {{.*}}.o37// ABS: >>> referenced by {{.*}}.o:(.text+0x0)38