mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
259364adb8
The linker relaxation logic will be: Code sequence I (tiny): 0x00 adr x0, :tlsldm:x 0x04 bl __tls_get_addr | V 0x00 mrs x0, tpidr_el0 0x04 add x0, x0, TCB_SIZE Code sequence II (small): 0x00 adrp a0, :tlsldm:x 0x04 add a0, #:tlsldm_lo12:x 0x08 bl __tls_get_addr | V 0x00 mrs x0, tpidr_el0 0x04 add x0, x0, TCB_SIZE 0x08 nop 2015-09-09 Jiong Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three TLS local dynamic traditional relocations types. (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to local executable relaxation. ld/testsuite/ * ld-aarch64/tls-relax-ld-le-tiny.s: New testcase. * ld-aarch64/tls-relax-ld-le-small.s: Likewise. * ld-aarch64/tls-relax-ld-le-tiny.d: New expectation file. * ld-aarch64/tls-relax-ld-le-small.d: Likewise. * ld-aarch64/aarch64-elf.exp: Run new testcases.
14 lines
368 B
Makefile
14 lines
368 B
Makefile
#source: tls-relax-ld-le-small.s
|
|
#ld: -T relocs.ld -e0
|
|
#objdump: -dr
|
|
#...
|
|
+10000: 910003fd mov x29, sp
|
|
+10004: d53bd040 mrs x0, tpidr_el0
|
|
+10008: 91004000 add x0, x0, #0x10
|
|
+1000c: d503201f nop
|
|
+10010: d503201f nop
|
|
+10014: 91400001 add x1, x0, #0x0, lsl #12
|
|
+10018: 91000021 add x1, x1, #0x0
|
|
+1001c: 90000000 adrp x0, 10000 <.*>
|
|
+10020: d65f03c0 ret
|