binutils-gdb/ld/testsuite/ld-sparc/tlssunnopic32.dd

85 lines
2.6 KiB
Plaintext
Raw Normal View History

bfd/ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs. (elf32_sparc_rev32_howto): New variable. (sparc_reloc_map): Add TLS relocs. (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto): Handle REV32. (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject): New functions. (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry, struct elf32_sparc_link_hash_table): New structures. (elf32_sparc_tdata, elf32_sparc_local_got_tls_type, elf32_sparc_hash_table): Define. (link_hash_newfunc, elf32_sparc_link_hash_table_create, create_got_section, elf32_sparc_create_dynamic_sections, elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New functions. (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc reference counting. (elf32_sparc_gc_sweep_hook): Likewise. (elf32_sparc_adjust_dynamic_symbol): Likewise. (elf32_sparc_size_dynamic_sections): Likewise. (elf32_sparc_relocate_section): Likewise. (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff): New functions. (elf32_sparc_object_p): Allocate backend private object data. (bfd_elf32_bfd_link_hash_table_create, elf_backend_copy_indirect_symbol, bfd_elf32_mkobject, elf_backend_can_refcount): Define. (elf_backend_create_dynamic_sections): Define to elf32_sparc_create_dynamic_sections. * reloc.c: Add SPARC TLS relocs. * bfd-in2.h, libbfd.h: Rebuilt. * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs. (sparc_reloc_map): Likewise. gas/ * config/tc-sparc.c (sparc_ip): Handle TLS % operators. (tc_gen_reloc): Handle TLS relocs. (sparc_cons, cons_fix_new_sparc): Handle %r_tls_dtpoff. * config/tc-sparc.h (tc_fix_adjustable): Don't adjust TLS relocs. * config/obj-elf.c (obj_elf_section_word): Handle tls. (obj_elf_type): Handle tls_object. include/ * elf/sparc.h: Add TLS relocs. Move R_SPARC_REV32 to 252. ld/testsuite/ * ld-sparc/sparc.exp: New. * ld-sparc/tlsg32.s: New test. * ld-sparc/tlsg32.sd: Likewise. * ld-sparc/tlsg64.s: Likewise. * ld-sparc/tlsg64.sd: Likewise. * ld-sparc/tlslib.s: Likewise. * ld-sparc/tlsnopic.s: Likewise. * ld-sparc/tlspic.s: Likewise. * ld-sparc/tlssunbin32.dd: Likewise. * ld-sparc/tlssunbin32.rd: Likewise. * ld-sparc/tlssunbin32.s: Likewise. * ld-sparc/tlssunbin32.sd: Likewise. * ld-sparc/tlssunbin32.td: Likewise. * ld-sparc/tlssunbin64.dd: Likewise. * ld-sparc/tlssunbin64.rd: Likewise. * ld-sparc/tlssunbin64.s: Likewise. * ld-sparc/tlssunbin64.sd: Likewise. * ld-sparc/tlssunbin64.td: Likewise. * ld-sparc/tlssunbinpic32.s: Likewise. * ld-sparc/tlssunbinpic64.s: Likewise. * ld-sparc/tlssunnopic32.dd: Likewise. * ld-sparc/tlssunnopic32.rd: Likewise. * ld-sparc/tlssunnopic32.s: Likewise. * ld-sparc/tlssunnopic32.sd: Likewise. * ld-sparc/tlssunnopic64.dd: Likewise. * ld-sparc/tlssunnopic64.rd: Likewise. * ld-sparc/tlssunnopic64.s: Likewise. * ld-sparc/tlssunnopic64.sd: Likewise. * ld-sparc/tlssunpic32.dd: Likewise. * ld-sparc/tlssunpic32.rd: Likewise. * ld-sparc/tlssunpic32.s: Likewise. * ld-sparc/tlssunpic32.sd: Likewise. * ld-sparc/tlssunpic32.td: Likewise. * ld-sparc/tlssunpic64.dd: Likewise. * ld-sparc/tlssunpic64.rd: Likewise. * ld-sparc/tlssunpic64.s: Likewise. * ld-sparc/tlssunpic64.sd: Likewise. * ld-sparc/tlssunpic64.td: Likewise.
2003-01-25 00:44:45 +01:00
#source: tlssunnopic32.s
#source: tlsnopic.s
#as: --32
#ld: -shared -melf32_sparc
#objdump: -drj.text
#target: sparc*-*-*
bfd/ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs. (elf32_sparc_rev32_howto): New variable. (sparc_reloc_map): Add TLS relocs. (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto): Handle REV32. (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject): New functions. (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry, struct elf32_sparc_link_hash_table): New structures. (elf32_sparc_tdata, elf32_sparc_local_got_tls_type, elf32_sparc_hash_table): Define. (link_hash_newfunc, elf32_sparc_link_hash_table_create, create_got_section, elf32_sparc_create_dynamic_sections, elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New functions. (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc reference counting. (elf32_sparc_gc_sweep_hook): Likewise. (elf32_sparc_adjust_dynamic_symbol): Likewise. (elf32_sparc_size_dynamic_sections): Likewise. (elf32_sparc_relocate_section): Likewise. (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff): New functions. (elf32_sparc_object_p): Allocate backend private object data. (bfd_elf32_bfd_link_hash_table_create, elf_backend_copy_indirect_symbol, bfd_elf32_mkobject, elf_backend_can_refcount): Define. (elf_backend_create_dynamic_sections): Define to elf32_sparc_create_dynamic_sections. * reloc.c: Add SPARC TLS relocs. * bfd-in2.h, libbfd.h: Rebuilt. * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs. (sparc_reloc_map): Likewise. gas/ * config/tc-sparc.c (sparc_ip): Handle TLS % operators. (tc_gen_reloc): Handle TLS relocs. (sparc_cons, cons_fix_new_sparc): Handle %r_tls_dtpoff. * config/tc-sparc.h (tc_fix_adjustable): Don't adjust TLS relocs. * config/obj-elf.c (obj_elf_section_word): Handle tls. (obj_elf_type): Handle tls_object. include/ * elf/sparc.h: Add TLS relocs. Move R_SPARC_REV32 to 252. ld/testsuite/ * ld-sparc/sparc.exp: New. * ld-sparc/tlsg32.s: New test. * ld-sparc/tlsg32.sd: Likewise. * ld-sparc/tlsg64.s: Likewise. * ld-sparc/tlsg64.sd: Likewise. * ld-sparc/tlslib.s: Likewise. * ld-sparc/tlsnopic.s: Likewise. * ld-sparc/tlspic.s: Likewise. * ld-sparc/tlssunbin32.dd: Likewise. * ld-sparc/tlssunbin32.rd: Likewise. * ld-sparc/tlssunbin32.s: Likewise. * ld-sparc/tlssunbin32.sd: Likewise. * ld-sparc/tlssunbin32.td: Likewise. * ld-sparc/tlssunbin64.dd: Likewise. * ld-sparc/tlssunbin64.rd: Likewise. * ld-sparc/tlssunbin64.s: Likewise. * ld-sparc/tlssunbin64.sd: Likewise. * ld-sparc/tlssunbin64.td: Likewise. * ld-sparc/tlssunbinpic32.s: Likewise. * ld-sparc/tlssunbinpic64.s: Likewise. * ld-sparc/tlssunnopic32.dd: Likewise. * ld-sparc/tlssunnopic32.rd: Likewise. * ld-sparc/tlssunnopic32.s: Likewise. * ld-sparc/tlssunnopic32.sd: Likewise. * ld-sparc/tlssunnopic64.dd: Likewise. * ld-sparc/tlssunnopic64.rd: Likewise. * ld-sparc/tlssunnopic64.s: Likewise. * ld-sparc/tlssunnopic64.sd: Likewise. * ld-sparc/tlssunpic32.dd: Likewise. * ld-sparc/tlssunpic32.rd: Likewise. * ld-sparc/tlssunpic32.s: Likewise. * ld-sparc/tlssunpic32.sd: Likewise. * ld-sparc/tlssunpic32.td: Likewise. * ld-sparc/tlssunpic64.dd: Likewise. * ld-sparc/tlssunpic64.rd: Likewise. * ld-sparc/tlssunpic64.s: Likewise. * ld-sparc/tlssunpic64.sd: Likewise. * ld-sparc/tlssunpic64.td: Likewise.
2003-01-25 00:44:45 +01:00
.*: +file format elf32-sparc
Disassembly of section .text:
00001000 <fn3>:
+1000: 9d e3 bf 98 save %sp, -104, %sp
+1004: 23 00 00 00 sethi %hi\(0\), %l1
+1008: a2 14 60 00 mov %l1, %l1 ! 0 <.*>
+100c: 01 00 00 00 nop *
+1010: 01 00 00 00 nop *
+1014: 01 00 00 00 nop *
+1018: 01 00 00 00 nop *
+101c: 17 00 00 00 sethi %hi\(0\), %o3
+1020: 96 02 e0 0c add %o3, 0xc, %o3 ! c <.*>
+1024: d4 04 40 0b ld \[ %l1 \+ %o3 \], %o2
+1028: 98 01 c0 0a add %g7, %o2, %o4
+102c: 01 00 00 00 nop *
+1030: 01 00 00 00 nop *
+1034: 01 00 00 00 nop *
+1038: 01 00 00 00 nop *
+103c: 11 00 00 00 sethi %hi\(0\), %o0
+1040: 90 02 20 10 add %o0, 0x10, %o0 ! 10 <.*>
+1044: d0 04 40 08 ld \[ %l1 \+ %o0 \], %o0
+1048: d0 01 c0 08 ld \[ %g7 \+ %o0 \], %o0
+104c: 01 00 00 00 nop *
+1050: 01 00 00 00 nop *
+1054: 01 00 00 00 nop *
+1058: 01 00 00 00 nop *
+105c: 11 00 00 00 sethi %hi\(0\), %o0
+1060: 90 02 20 14 add %o0, 0x14, %o0 ! 14 <.*>
+1064: d0 04 40 08 ld \[ %l1 \+ %o0 \], %o0
+1068: 90 01 c0 08 add %g7, %o0, %o0
+106c: 01 00 00 00 nop *
+1070: 01 00 00 00 nop *
+1074: 01 00 00 00 nop *
+1078: 01 00 00 00 nop *
+107c: 1b 00 00 00 sethi %hi\(0\), %o5
+1080: 92 03 60 18 add %o5, 0x18, %o1 ! 18 <.*>
+1084: d4 04 40 09 ld \[ %l1 \+ %o1 \], %o2
+1088: d6 29 c0 0a stb %o3, \[ %g7 \+ %o2 \]
+108c: 01 00 00 00 nop *
+1090: 01 00 00 00 nop *
+1094: 01 00 00 00 nop *
+1098: 01 00 00 00 nop *
+109c: 11 00 00 00 sethi %hi\(0\), %o0
+10a0: 90 02 20 04 add %o0, 4, %o0 ! 4 <.*>
+10a4: d0 04 40 08 ld \[ %l1 \+ %o0 \], %o0
+10a8: 90 01 c0 08 add %g7, %o0, %o0
+10ac: 01 00 00 00 nop *
+10b0: 01 00 00 00 nop *
+10b4: 01 00 00 00 nop *
+10b8: 01 00 00 00 nop *
+10bc: 1b 00 00 00 sethi %hi\(0\), %o5
+10c0: 92 03 60 08 add %o5, 8, %o1 ! 8 <.*>
+10c4: d4 04 40 09 ld \[ %l1 \+ %o1 \], %o2
+10c8: d6 29 c0 0a stb %o3, \[ %g7 \+ %o2 \]
+10cc: 01 00 00 00 nop *
+10d0: 01 00 00 00 nop *
+10d4: 01 00 00 00 nop *
+10d8: 01 00 00 00 nop *
+10dc: 15 00 00 00 sethi %hi\(0\), %o2
+10e0: 98 1a a0 00 xor %o2, 0, %o4
+10e4: 90 01 c0 0c add %g7, %o4, %o0
+10e8: 01 00 00 00 nop *
+10ec: 01 00 00 00 nop *
+10f0: 01 00 00 00 nop *
+10f4: 01 00 00 00 nop *
+10f8: 15 00 00 00 sethi %hi\(0\), %o2
+10fc: 94 1a a0 00 xor %o2, 0, %o2
+1100: d4 01 c0 0a ld \[ %g7 \+ %o2 \], %o2
+1104: 01 00 00 00 nop *
+1108: 01 00 00 00 nop *
+110c: 01 00 00 00 nop *
+1110: 01 00 00 00 nop *
+1114: 81 c7 e0 08 ret *
+1118: 81 e8 00 00 restore *
#pass