diff options
author | Alan Modra <amodra@gmail.com> | 2009-09-21 11:51:02 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-09-21 11:51:02 +0000 |
commit | a7f2871e66570d025ce909c16bd53be5ff814191 (patch) | |
tree | dad2750ab64db9b81da21b0f7fb646de7b1bad85 /ld/testsuite/ld-powerpc/tlsexe.d | |
parent | e0d602ecffb0256181ea45c653d261973c819d2b (diff) | |
download | gdb-a7f2871e66570d025ce909c16bd53be5ff814191.zip gdb-a7f2871e66570d025ce909c16bd53be5ff814191.tar.gz gdb-a7f2871e66570d025ce909c16bd53be5ff814191.tar.bz2 |
include/elf/
* ppc.h (DT_PPC_TLSOPT): Define.
* ppc64.h (DT_PPC64_TLSOPT): Define.
bfd/
* elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
(ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
(MR_0_3, MR_3_0): Define.
(struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
(ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
(ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
table. Check for presense of __tls_get_addr_opt
(allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
(ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
(write_glink_stub): Add param p.
(ppc_elf_relocate_section): Adjust write_glink_stub call.
(ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
__tls_get_addr.
* elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
* elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
(ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
table. Check for presense of __tls_get_addr_opt.
(ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
(LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
LD_R2_0R1, MTLR_R11): Define.
(build_tls_get_addr_stub): New function.
(ppc_build_one_stub): Call it.
(ppc_size_one_stub): Add extra size for __tls_get_addr stub.
(ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
__tls_get_addr plt call.
* elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
binutils/
* readelf.c (get_ppc_dynamic_type): Add TLSOPT.
(get_ppc64_dynamic_type): Likewise.
ld/
* emultempl/ppc32elf.em (no_tls_get_addr_opt): New var.
(ppc_before_allocation): Pass to ppc_elf_tls_setup.
(OPTION_NO_TLS_GET_ADDR_OPT): Define. Redefine other options in
terms of previous option.
(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add
--no-tls-get-addr-optimize.
(PARSE_AND_LIST_ARGS_CASES): Handle it.
* emultempl/ppc64elf.em (no_tls_get_addr_opt): New var.
(ppc_before_allocation): Pass to ppc64_elf_tls_setup.
(OPTION_NO_TLS_GET_ADDR_OPT): Define.
(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add
--no-tls-get-addr-optimize.
(PARSE_AND_LIST_ARGS_CASES): Handle it.
ld/testsuite/
* ld-powerpc/tlslib.s: Delete dot-symbol entry syms. Add
__tls_get_addr_opt.
* ld-powerpc/tlslib32.s: Add __tls_get_addr_opt.
* ld-powerpc/oldtlslib.s: New file, old-abi version of tlslib.s.
* ld-powerpc/powerpc.exp: Build old-abi library and use it in
two new link tests.
* ld-powerpc/tlsexe.d: Update for new __tls_get_addr stub.
* ld-powerpc/tlsexe.g, * ld-powerpc/tlsexe.r, *ld-powerpc/tlsexe32.d,
* ld-powerpc/tlsexe32.g, * ld-powerpc/tlsexe32.r,
* ld-powerpc/tlsexetoc.d, * ld-powerpc/tlsexetoc.g,
* ld-powerpc/tlsexetoc.r: Likewise.
Diffstat (limited to 'ld/testsuite/ld-powerpc/tlsexe.d')
-rw-r--r-- | ld/testsuite/ld-powerpc/tlsexe.d | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/ld/testsuite/ld-powerpc/tlsexe.d b/ld/testsuite/ld-powerpc/tlsexe.d index 825434e..e7f1e4c 100644 --- a/ld/testsuite/ld-powerpc/tlsexe.d +++ b/ld/testsuite/ld-powerpc/tlsexe.d @@ -8,21 +8,34 @@ Disassembly of section \.text: -.* <_start-0x18>: +.* <_start-0x4c>: +.* e9 63 00 00 ld r11,0\(r3\) +.* e9 83 00 08 ld r12,8\(r3\) +.* 7c 60 1b 78 mr r0,r3 +.* 2c 2b 00 00 cmpdi r11,0 +.* 7c 6c 6a 14 add r3,r12,r13 +.* 4d 82 00 20 beqlr +.* 7c 03 03 78 mr r3,r0 +.* 7d 68 02 a6 mflr r11 +.* f9 61 00 20 std r11,32\(r1\) .* f8 41 00 28 std r2,40\(r1\) .* e9 62 80 48 ld r11,-32696\(r2\) .* 7d 69 03 a6 mtctr r11 .* e9 62 80 58 ld r11,-32680\(r2\) .* e8 42 80 50 ld r2,-32688\(r2\) -.* 4e 80 04 20 bctr +.* 4e 80 04 21 bctrl +.* e9 61 00 20 ld r11,32\(r1\) +.* e8 41 00 28 ld r2,40\(r1\) +.* 7d 68 03 a6 mtlr r11 +.* 4e 80 00 20 blr .* <_start>: .* e8 62 80 10 ld r3,-32752\(r2\) .* 60 00 00 00 nop .* 7c 63 6a 14 add r3,r3,r13 .* 38 62 80 18 addi r3,r2,-32744 -.* 4b ff ff d9 bl .* -.* e8 41 00 28 ld r2,40\(r1\) +.* 4b ff ff a5 bl .* +.* 60 00 00 00 nop .* 3c 6d 00 00 addis r3,r13,0 .* 60 00 00 00 nop .* 38 63 90 38 addi r3,r3,-28616 @@ -55,8 +68,9 @@ Disassembly of section \.text: .* e9 4d 90 2a lwa r10,-28632\(r13\) .* 3d 2d 00 00 addis r9,r13,0 .* a9 49 90 30 lha r10,-28624\(r9\) +.* 60 00 00 00 nop .* 00 00 00 00 .* -.* 00 01 01 f0 .* +.* 00 01 02 00 .* .* 7d 88 02 a6 mflr r12 .* 42 9f 00 05 bcl- 20,4\*cr7\+so,.* .* 7d 68 02 a6 mflr r11 |