Files
clang-p2996/lld/test/ELF/aarch64-thunk-execute-only.s
Csanád Hajdú 6e457c2001 [LLD][ELF][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (3/3) (#125689)
Add support for the new SHF_AARCH64_PURECODE ELF section flag:
https://github.com/ARM-software/abi-aa/pull/304

The general implementation follows the existing one for ARM targets. The
output section only has the `SHF_AARCH64_PURECODE` flag set if all input
sections have it set.

Related PRs:
* LLVM: https://github.com/llvm/llvm-project/pull/125687
* Clang: https://github.com/llvm/llvm-project/pull/125688
2025-02-21 09:01:38 -08:00

23 lines
814 B
ArmAsm

// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
// RUN: ld.lld %t.o --defsym big=0x1111222233334444 -o %t
// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
.section .text,"axy",@progbits,unique,0
.globl _start
_start:
bl big
b big
// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-LABEL: <_start>:
// CHECK-NEXT: bl {{.*}} <__AArch64AbsXOLongThunk_big>
// CHECK-NEXT: b {{.*}} <__AArch64AbsXOLongThunk_big>
// CHECK-LABEL: <__AArch64AbsXOLongThunk_big>:
// CHECK-NEXT: mov x16, #0x4444
// CHECK-NEXT: movk x16, #0x3333, lsl #16
// CHECK-NEXT: movk x16, #0x2222, lsl #32
// CHECK-NEXT: movk x16, #0x1111, lsl #48
// CHECK-NEXT: br x16