27 lines · plain
1# REQUIRES: aarch642 3# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o4# RUN: ld.lld --hash-style=sysv -shared %t.o -o %t5# RUN: llvm-objdump %t -d --no-show-raw-insn | FileCheck %s --check-prefix=DISASM6# RUN: llvm-readelf %t --symbols | FileCheck %s --check-prefix=SYM7 8# It would be much easier to understand/read this test if llvm-objdump would print9# the immediates in hex.10# IMM = hex(65540) = 0x1000411# PC = 0x1000012# As the relocation is PC-relative, IMM + PC = 0x20004 which is the VA of the13# correct symbol.14 15# DISASM: Disassembly of section .text:16# DISASM-EMPTY:17# DISASM-NEXT: <.text>:18# DISASM-NEXT: 1022c: ldr x8, 0x3029419 20# SYM: Symbol table '.symtab'21# SYM: 0000000000030294 0 NOTYPE LOCAL DEFAULT [[#]] patatino22 23 ldr x8, patatino24 .data25 .zero 426patatino:27