aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-powerpc/tlsmark.d
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-03-04 05:50:50 +0000
committerAlan Modra <amodra@gmail.com>2009-03-04 05:50:50 +0000
commit727fc41e077139570ea8b8ddfd6c546b2a55627c (patch)
treecb2e0c6f5409224e1658daa9ca5b8e8fea3a4503 /ld/testsuite/ld-powerpc/tlsmark.d
parent51dec22749b3733b1fa3df0c1290a50967887ccf (diff)
downloadgdb-727fc41e077139570ea8b8ddfd6c546b2a55627c.zip
gdb-727fc41e077139570ea8b8ddfd6c546b2a55627c.tar.gz
gdb-727fc41e077139570ea8b8ddfd6c546b2a55627c.tar.bz2
include/elf/
* 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.
Diffstat (limited to 'ld/testsuite/ld-powerpc/tlsmark.d')
-rw-r--r--ld/testsuite/ld-powerpc/tlsmark.d42
1 files changed, 42 insertions, 0 deletions
diff --git a/ld/testsuite/ld-powerpc/tlsmark.d b/ld/testsuite/ld-powerpc/tlsmark.d
new file mode 100644
index 0000000..8ba350e
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/tlsmark.d
@@ -0,0 +1,42 @@
+#source: tlsmark.s
+#source: tlslib.s
+#as: -a64
+#ld: -melf64ppc
+#objdump: -dr
+#target: powerpc64*-*-*
+
+.*: +file format elf64-powerpc
+
+Disassembly of section \.text:
+
+0+100000e8 <_start>:
+ 100000e8: 48 00 00 18 b 10000100 <_start\+0x18>
+ 100000ec: 60 00 00 00 nop
+ 100000f0: 38 63 90 00 addi r3,r3,-28672
+ 100000f4: e8 83 00 00 ld r4,0\(r3\)
+ 100000f8: 3c 6d 00 00 addis r3,r13,0
+ 100000fc: 48 00 00 0c b 10000108 <_start\+0x20>
+ 10000100: 3c 6d 00 00 addis r3,r13,0
+ 10000104: 4b ff ff e8 b 100000ec <_start\+0x4>
+ 10000108: 60 00 00 00 nop
+ 1000010c: 38 63 10 00 addi r3,r3,4096
+ 10000110: e8 83 80 00 ld r4,-32768\(r3\)
+ 10000114: 3c 6d 00 00 addis r3,r13,0
+ 10000118: 48 00 00 0c b 10000124 <_start\+0x3c>
+ 1000011c: 3c 6d 00 00 addis r3,r13,0
+ 10000120: 48 00 00 14 b 10000134 <_start\+0x4c>
+ 10000124: 60 00 00 00 nop
+ 10000128: 38 63 90 04 addi r3,r3,-28668
+ 1000012c: e8 a3 00 00 ld r5,0\(r3\)
+ 10000130: 4b ff ff ec b 1000011c <_start\+0x34>
+ 10000134: 60 00 00 00 nop
+ 10000138: 38 63 10 00 addi r3,r3,4096
+ 1000013c: e8 a3 80 04 ld r5,-32764\(r3\)
+ 10000140: 38 62 80 28 addi r3,r2,-32728
+ 10000144: 3f a0 10 01 lis r29,4097
+ 10000148: 3b bd 01 68 addi r29,r29,360
+ 1000014c: 48 00 00 09 bl 10000154 <\.__tls_get_addr>
+ 10000150: 60 00 00 00 nop
+
+0+10000154 <\.__tls_get_addr>:
+ 10000154: 4e 80 00 20 blr