727fc41e07
* ppc.h (R_PPC_TLSGD, R_PPC_TLSLD): Add new relocs. * ppc64.h (R_PPC64_TLSGD, R_PPC64_TLSLD): Add new relocs. bfd/ * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New. * section.c (struct bfd_section): Add has_tls_get_addr_call. (BFD_FAKE_SECTION): Init new flag. * ecoff.c (bfd_debug_section): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD. (ppc_elf_reloc_type_lookup): Handle new relocs. (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such without marker relocs. (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs if section has no old-style calls. (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too. Don't try to optimize new-style __tls_get_addr call when handling arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD relocs. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD. (ppc64_elf_reloc_type_lookup): Handle new relocs. (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such without marker relocs. (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs if section has no old-style calls. Set toc_ref for new relocs as appropriate. (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too. Don't try to optimize new-style __tls_get_addr call when handling arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD relocs. gas/ * config/tc-ppc.c (ppc_elf_suffix): Error if ppc32 tls got relocs have non-zero addend. (md_assemble): Parse args of __tls_get_addr calls. (md_apply_fix): Handle BFD_RELOC_PPC_TLSGD and BFD_RELOC_PPC_TLSLD. ld/testsuite/ * ld-powerpc/tlsmark.s, * ld-powerpc/tlsmark.d: New test. * ld-powerpc/tlsmark32.s, * ld-powerpc/tlsmark32.d: New test. * ld-powerpc/powerpc.exp: Run them.
29 lines
No EOL
846 B
Makefile
29 lines
No EOL
846 B
Makefile
#source: tlsmark32.s
|
|
#source: tlslib32.s
|
|
#as: -a32
|
|
#ld: -melf32ppc
|
|
#objdump: -dr
|
|
#target: powerpc*-*-*
|
|
|
|
.*: file format elf32-powerpc
|
|
|
|
Disassembly of section \.text:
|
|
|
|
0+1800094 <_start>:
|
|
1800094: 48 00 00 14 b 18000a8 <_start\+0x14>
|
|
1800098: 38 63 90 00 addi r3,r3,-28672
|
|
180009c: 80 83 00 00 lwz r4,0\(r3\)
|
|
18000a0: 3c 62 00 00 addis r3,r2,0
|
|
18000a4: 48 00 00 0c b 18000b0 <_start\+0x1c>
|
|
18000a8: 3c 62 00 00 addis r3,r2,0
|
|
18000ac: 4b ff ff ec b 1800098 <_start\+0x4>
|
|
18000b0: 38 63 10 00 addi r3,r3,4096
|
|
18000b4: 80 83 80 00 lwz r4,-32768\(r3\)
|
|
18000b8: 38 7f ff f4 addi r3,r31,-12
|
|
18000bc: 3f a0 01 80 lis r29,384
|
|
18000c0: 3b bd 00 c8 addi r29,r29,200
|
|
18000c4: 48 00 00 05 bl 18000c8 <__tls_get_addr>
|
|
|
|
0+18000c8 <__tls_get_addr>:
|
|
18000c8: 4e 80 00 20 blr
|
|
#pass
|