brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 0628d94 Raw
39 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o3// RUN: ld.lld %t.o --pie -o %t4// RUN: llvm-readobj -r %t | FileCheck %s5// RUN: llvm-readelf -x .got %t | FileCheck %s --check-prefix=GOT6// RUN: ld.lld %t.o --pie --image-base=0x80000000 --check-dynamic-relocations -o %t1 2>&1 | \7// RUN:   FileCheck %s -allow-empty -check-prefix=NOERR8// RUN: llvm-readobj -r %t1 | FileCheck %s --check-prefix=CHECK19// RUN: llvm-readelf -x .got %t1 | FileCheck %s --check-prefix=GOT110 11// Test that a R_ARM_GOT_BREL relocation with PIE results in a R_ARM_RELATIVE12// dynamic relocation13 .syntax unified14 .text15 .global _start16_start:17 .word sym(GOT)18 19 .data20 .global sym21sym:22 .word 023 24// CHECK:      Relocations [25// CHECK-NEXT:   Section (5) .rel.dyn {26// CHECK-NEXT:     0x201E4 R_ARM_RELATIVE27 28// GOT:      section '.got':29// GOT-NEXT: 0x000201e4 e801030030 31// NOERR-NOT: internal linker error32 33// CHECK1:      Relocations [34// CHECK1-NEXT:   Section (5) .rel.dyn {35// CHECK1-NEXT:     0x800201E4 R_ARM_RELATIVE36 37// GOT1:      section '.got':38// GOT1-NEXT: 0x800201e4 e801038039