2018-06-27 00:58:19 +08:00
|
|
|
# REQUIRES: aarch64
|
2016-03-11 22:34:44 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %p/Inputs/aarch64-tls-ie.s -o %ttlsie.o
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %s -o %tmain.o
|
|
|
|
# RUN: ld.lld %tmain.o %ttlsie.o -o %tout
|
|
|
|
# RUN: llvm-objdump -d %tout | FileCheck %s
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj -S -r %tout | FileCheck -check-prefix=RELOC %s
|
2016-03-11 22:34:44 +08:00
|
|
|
|
2019-01-09 08:09:59 +08:00
|
|
|
#Local-Dynamic to Local-Exec relax creates no
|
2016-03-11 22:34:44 +08:00
|
|
|
#RELOC: Relocations [
|
|
|
|
#RELOC-NEXT: ]
|
|
|
|
|
2019-01-09 08:09:59 +08:00
|
|
|
# TCB size = 64 and foo is first element from TLS register.
|
2016-05-14 05:58:46 +08:00
|
|
|
# CHECK: Disassembly of section .text:
|
2019-05-01 18:40:48 +08:00
|
|
|
# CHECK-EMPTY:
|
2016-05-14 05:58:46 +08:00
|
|
|
# CHECK: _start:
|
Align AArch64 and i386 image base to superpage
Summary:
As for x86_64, the default image base for AArch64 and i386 should be
aligned to a superpage appropriate for the architecture.
On AArch64, this is 2 MiB, on i386 it is 4 MiB.
Reviewers: emaste, grimar, javed.absar, espindola, ruiu, peter.smith, srhines, rprichard
Reviewed By: ruiu, peter.smith
Subscribers: jfb, markj, arichardson, krytarowski, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D50297
llvm-svn: 342746
2018-09-22 00:58:13 +08:00
|
|
|
# CHECK: 210000: 00 00 a0 d2 movz x0, #0, lsl #16
|
2019-01-09 08:09:59 +08:00
|
|
|
# CHECK: 210004: 00 08 80 f2 movk x0, #64
|
Align AArch64 and i386 image base to superpage
Summary:
As for x86_64, the default image base for AArch64 and i386 should be
aligned to a superpage appropriate for the architecture.
On AArch64, this is 2 MiB, on i386 it is 4 MiB.
Reviewers: emaste, grimar, javed.absar, espindola, ruiu, peter.smith, srhines, rprichard
Reviewed By: ruiu, peter.smith
Subscribers: jfb, markj, arichardson, krytarowski, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D50297
llvm-svn: 342746
2018-09-22 00:58:13 +08:00
|
|
|
# CHECK: 210008: 1f 20 03 d5 nop
|
|
|
|
# CHECK: 21000c: 1f 20 03 d5 nop
|
2016-03-11 22:34:44 +08:00
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
adrp x0, :tlsdesc:foo
|
|
|
|
ldr x1, [x0, :tlsdesc_lo12:foo]
|
|
|
|
add x0, x0, :tlsdesc_lo12:foo
|
|
|
|
.tlsdesccall foo
|
|
|
|
blr x1
|