mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
a804e4760a
This provides a linker generated __tls_get_addr_desc wrapper function preserving registers around a __tls_get_addr call. The idea being to support __tls_get_addr_desc without requiring a glibc update. bfd/ * elf64-ppc.c (struct ppc_link_hash_table): Add tga_group. (ppc64_elf_archive_symbol_lookup): Extract __tls_get_addr_opt for __tls_get_addr_desc. (ppc64_elf_size_stubs): Add section for linker generated __tls_get_addr_desc wrapper function. Loop at least once if generating this function. (emit_tga_desc, emit_tga_desc_eh_frame): New functions. (ppc64_elf_build_stubs): Generate __tls_get_addr_desc. ld/ * testsuite/ld-powerpc/tlsdesc3.d, * testsuite/ld-powerpc/tlsdesc3.wf, * testsuite/ld-powerpc/tlsdesc4.d, * testsuite/ld-powerpc/tlsdesc4.s, * testsuite/ld-powerpc/tlsdesc4.wf: New tests. * testsuite/ld-powerpc/powerpc.exp: Run them.
19 lines
285 B
ArmAsm
19 lines
285 B
ArmAsm
.text
|
|
.globl _start
|
|
_start:
|
|
.cfi_startproc
|
|
addi 3,2,gd@got@tlsgd
|
|
bl __tls_get_addr_desc(gd@tlsgd)
|
|
nop
|
|
.cfi_endproc
|
|
|
|
.section .text.pad1,"ax"
|
|
.space 0x1ffff90
|
|
|
|
.section .text.far,"ax"
|
|
.cfi_startproc
|
|
addi 3,2,gd@got@tlsgd
|
|
bl __tls_get_addr_desc(gd@tlsgd)
|
|
nop
|
|
.cfi_endproc
|