mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
d4aaa2a074
Since the __tls_get_addr_opt stub saves LR and makes a call, eh_frame info should be generated to describe how to unwind through the stub. The patch also changes the way the backend iterates over stubs, from looking at all sections in stub_bfd to which all dynamic sections are attached as well, to iterating over the group list, which gets just the stub sections. Most binaries will have just one or two stub groups, so this is a little faster. bfd/ * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl. (stub_eh_frame_size): New function. (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl. (group_sections): Init group tls_get_addr_opt_bctrl. (ppc64_elf_size_stubs): Update sizing and initialization of .eh_frame. Iteration over stubs via group list. (ppc64_elf_build_stubs): Iterate over stubs via group list. (ppc64_elf_finish_dynamic_sections): Update finalization of .eh_frame. ld/ * testsuite/ld-powerpc/tlsopt5.s: Add cfi. * testsuite/ld-powerpc/tlsopt5.d: Update. * testsuite/ld-powerpc/tlsopt5.wf: New file. * testsuite/ld-powerpc/powerpc.exp: Perform new tlsopt5 test.
8 lines
110 B
ArmAsm
8 lines
110 B
ArmAsm
.globl _start
|
|
_start:
|
|
.cfi_startproc
|
|
addi 3,2,gd@got@tlsgd
|
|
bl __tls_get_addr(gd@tlsgd)
|
|
nop
|
|
.cfi_endproc
|