old-cross-binutils/ld/testsuite/ld-aarch64/tls-relax-large-ie-le.s
Renlin Li 3ebe65c0ff [LD][AARCH64]Add TLSIE relaxation support under large memory model.
bfd/
2015-10-02  Renlin Li <renlin.li@arm.com>

	* elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Add
	TLSIE_MOVW_GOTTPREL_G1.
	(aarch64_tls_transition_without_check): Add
	TLSIE_MOVW_GOTTPREL_G1 to TLSLE_MOVW_TPREL_G2
	transition for local symbol.
	(elfNN_aarch64_tls_relax): Add a argument to pass tp offset.
	Add TLSIE_MOVW_GOTTPREL_G1 relaxation.
	(elfNN_aarch64_relocate_section): Call elfNN_aarch64_tls_relax
	with new argument.

ld/testsuite/
2015-10-02  Renlin Li <renlin.li@arm.com>

	* ld-aarch64/aarch64-elf.exp (tls-relax-large-le-ie): Run new test.
	* ld-aarch64/tls-relax-large-ie-le.d: New.
	* ld-aarch64/tls-relax-large-ie-le.s: New.
2015-10-02 17:56:09 +01:00

19 lines
260 B
ArmAsm

.section .tdata,"awT"
x:
.word 2
y:
.word 4
.text
test:
mrs x1, tpidr_el0
movz x6, #:gottprel_g1:x
movk x6, #:gottprel_g0_nc:x
ldr x6, [x2, x6]
add x6, x6, x1
movz x7, #:gottprel_g1:y
movk x7, #:gottprel_g0_nc:y
ldr x7, [x2, x7]
add x7, x7, x1