Welcome to mirror list, hosted at ThFree Co, Russian Federation.

constant_island_pie_update.s « AArch64 « test « bolt - github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 26e4bd5df69ed6793be0ee6433fe015505ca76d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This test checks that the constant island value is updated if it
// has dynamic relocation.

# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
# RUN:   %s -o %t.o
# RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -Wl,-q -nostdlib -Wl,-z,notext
# RUN: llvm-bolt %t.exe -o %t.bolt -use-old-text=0 -lite=0
# RUN: llvm-objdump -j .text -dR %t.bolt | FileCheck %s

# CHECK: R_AARCH64_RELATIVE *ABS*+0x[[#%x,ADDR:]]
# CHECK: [[#ADDR]] <exitLocal>:
# CHECK: {{.*}} <$d>:
# CHECK-NEXT: {{.*}} .word 0x{{[0]+}}[[#ADDR]]
# CHECK-NEXT: {{.*}} .word 0x00000000

  .text
  .align 4
  .local exitLocal
  .type exitLocal, %function
exitLocal:
  add x1, x1, #1
  add x1, x1, #1
  ret
  .size exitLocal, .-exitLocal

  .global _start
  .type _start, %function
_start:
  mov x0, #0
  adr x1, .Lci
  ldr x1, [x1]
  blr x1
  mov x0, #1
  bl exitLocal
  nop
.Lci:
  .xword exitLocal
  .size _start, .-_start