Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lld/test/ELF/arm-tls-le32.s
// REQUIRES: arm | // REQUIRES: arm | ||||
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=armv7a-linux-gnueabi | // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=armv7a-linux-gnueabi | ||||
// RUN: ld.lld %t.o -o %t | // RUN: ld.lld %t.o -o %t | ||||
// RUN: llvm-readobj -S --dyn-relocations %t | FileCheck --check-prefix=SEC %s | // RUN: llvm-readobj -S --dyn-relocations %t | FileCheck --check-prefix=SEC %s | ||||
// RUN: llvm-objdump -d --triple=armv7a-linux-gnueabi %t | FileCheck %s | // RUN: llvm-objdump -d --triple=armv7a-linux-gnueabi %t | FileCheck %s | ||||
/// Test the handling of the local exec TLS model. TLS can be resolved | /// Test the handling of the local exec TLS model. TLS can be resolved | ||||
/// statically for an application. The code sequences assume a thread pointer | /// statically for an application. The code sequences assume a thread pointer | ||||
/// in r9 | /// in r9 | ||||
/// Reject local-exec TLS relocations for -shared. | |||||
// RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error: | |||||
// ERR: error: relocation R_ARM_TLS_LE32 against x cannot be used with -shared | |||||
// ERR: error: relocation R_ARM_TLS_LE32 against y cannot be used with -shared | |||||
// ERR: error: relocation R_ARM_TLS_LE32 against z cannot be used with -shared | |||||
.text | .text | ||||
.syntax unified | .syntax unified | ||||
.globl _start | .globl _start | ||||
.p2align 2 | .p2align 2 | ||||
.type _start,%function | .type _start,%function | ||||
_start: | _start: | ||||
.p2align 2 | .p2align 2 | ||||
/// Generate R_ARM_TLS_LE32 relocations. These resolve statically to the offset | /// Generate R_ARM_TLS_LE32 relocations. These resolve statically to the offset | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |