old-cross-binutils/ld/testsuite/ld-sparc/tlssunbin32.dd

274 lines
8.9 KiB
Text
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-24 23:44:45 +00:00
#source: tlssunbin32.s
#as: --32
#ld: -shared -melf32_sparc tmpdir/libtlslib32.so tmpdir/tlssunbinpic32.o
#objdump: -drj.text
#target: sparc*-*-*
.*: +file format elf32-sparc
Disassembly of section .text:
0+11000 <fn2-0x8>:
+11000: 81 c3 e0 08 retl *
+11004: ae 03 c0 17 add %o7, %l7, %l7
0+11008 <fn2>:
+11008: 9d e3 bf 98 save %sp, -104, %sp
+1100c: 2f 00 00 50 sethi %hi\(0x14000\), %l7
+11010: 7f ff ff fc call 11000 <.*>
+11014: ae 05 e0 d0 add %l7, 0xd0, %l7 ! 140d0 <.*>
+11018: 01 00 00 00 nop *
+1101c: 01 00 00 00 nop *
+11020: 01 00 00 00 nop *
+11024: 01 00 00 00 nop *
+11028: 23 00 00 00 sethi %hi\(0\), %l1
+1102c: 01 00 00 00 nop *
+11030: a4 04 60 10 add %l1, 0x10, %l2
+11034: 01 00 00 00 nop *
+11038: d0 05 c0 12 ld \[ %l7 \+ %l2 \], %o0
+1103c: 01 00 00 00 nop *
+11040: 90 01 c0 08 add %g7, %o0, %o0
+11044: 01 00 00 00 nop *
+11048: 01 00 00 00 nop *
+1104c: 01 00 00 00 nop *
+11050: 01 00 00 00 nop *
+11054: 01 00 00 00 nop *
+11058: 11 00 00 00 sethi %hi\(0\), %o0
+1105c: 92 02 20 08 add %o0, 8, %o1 ! 8 <.*>
+11060: d0 05 c0 09 ld \[ %l7 \+ %o1 \], %o0
+11064: 90 01 c0 08 add %g7, %o0, %o0
+11068: 01 00 00 00 nop *
+1106c: 01 00 00 00 nop *
+11070: 01 00 00 00 nop *
+11074: 01 00 00 00 nop *
+11078: 01 00 00 00 nop *
+1107c: 21 00 00 04 sethi %hi\(0x1000\), %l0
+11080: aa 1c 3f 60 xor %l0, -160, %l5
+11084: 90 01 c0 15 add %g7, %l5, %o0
+11088: 01 00 00 00 nop *
+1108c: 01 00 00 00 nop *
+11090: 01 00 00 00 nop *
+11094: 01 00 00 00 nop *
+11098: 01 00 00 00 nop *
+1109c: 01 00 00 00 nop *
+110a0: 11 00 00 00 sethi %hi\(0\), %o0
+110a4: 92 1a 3f 80 xor %o0, -128, %o1
+110a8: 90 01 c0 09 add %g7, %o1, %o0
+110ac: 01 00 00 00 nop *
+110b0: 01 00 00 00 nop *
+110b4: 01 00 00 00 nop *
+110b8: 01 00 00 00 nop *
+110bc: 01 00 00 00 nop *
+110c0: 01 00 00 00 nop *
+110c4: 11 00 00 00 sethi %hi\(0\), %o0
+110c8: 92 1a 3f a0 xor %o0, -96, %o1
+110cc: 90 01 c0 09 add %g7, %o1, %o0
+110d0: 01 00 00 00 nop *
+110d4: 01 00 00 00 nop *
+110d8: 01 00 00 00 nop *
+110dc: 01 00 00 00 nop *
+110e0: 01 00 00 00 nop *
+110e4: 01 00 00 00 nop *
+110e8: 01 00 00 00 nop *
+110ec: 01 00 00 00 nop *
+110f0: 01 00 00 00 nop *
+110f4: 01 00 00 00 nop *
+110f8: 01 00 00 00 nop *
+110fc: 01 00 00 00 nop *
+11100: 90 10 00 00 mov %g0, %o0
+11104: 01 00 00 00 nop *
+11108: 27 00 00 00 sethi %hi\(0\), %l3
+1110c: 01 00 00 00 nop *
+11110: a8 1c ff 80 xor %l3, -128, %l4
+11114: 01 00 00 00 nop *
+11118: aa 01 c0 14 add %g7, %l4, %l5
+1111c: 01 00 00 00 nop *
+11120: 25 00 00 00 sethi %hi\(0\), %l2
+11124: 01 00 00 00 nop *
+11128: a6 1c bf 86 xor %l2, -122, %l3
+1112c: 01 00 00 00 nop *
+11130: ec 11 c0 13 lduh \[ %g7 \+ %l3 \], %l6
+11134: 01 00 00 00 nop *
+11138: 01 00 00 00 nop *
+1113c: 01 00 00 00 nop *
+11140: 01 00 00 00 nop *
+11144: 01 00 00 00 nop *
+11148: 27 00 00 00 sethi %hi\(0\), %l3
+1114c: 01 00 00 00 nop *
+11150: 25 00 00 00 sethi %hi\(0\), %l2
+11154: 01 00 00 00 nop *
+11158: a8 1c ff a0 xor %l3, -96, %l4
+1115c: 90 10 00 00 mov %g0, %o0
+11160: a6 1c bf a5 xor %l2, -91, %l3
+11164: aa 01 c0 14 add %g7, %l4, %l5
+11168: ec 09 c0 13 ldub \[ %g7 \+ %l3 \], %l6
+1116c: 01 00 00 00 nop *
+11170: 01 00 00 00 nop *
+11174: 01 00 00 00 nop *
+11178: 01 00 00 00 nop *
+1117c: 23 00 00 00 sethi %hi\(0\), %l1
+11180: 01 00 00 00 nop *
+11184: a4 04 60 08 add %l1, 8, %l2
+11188: 01 00 00 00 nop *
+1118c: e4 05 c0 12 ld \[ %l7 \+ %l2 \], %l2
+11190: 01 00 00 00 nop *
+11194: a4 01 c0 12 add %g7, %l2, %l2
+11198: 01 00 00 00 nop *
+1119c: 01 00 00 00 nop *
+111a0: 01 00 00 00 nop *
+111a4: 01 00 00 00 nop *
+111a8: 17 00 00 04 sethi %hi\(0x1000\), %o3
+111ac: 96 1a ff 60 xor %o3, -160, %o3
+111b0: 01 00 00 00 nop *
+111b4: 98 01 c0 0b add %g7, %o3, %o4
+111b8: 01 00 00 00 nop *
+111bc: 01 00 00 00 nop *
+111c0: 01 00 00 00 nop *
+111c4: 01 00 00 00 nop *
+111c8: 29 00 00 00 sethi %hi\(0\), %l4
+111cc: a2 1d 3f 80 xor %l4, -128, %l1
+111d0: a6 10 00 11 mov %l1, %l3
+111d4: a6 01 c0 13 add %g7, %l3, %l3
+111d8: 01 00 00 00 nop *
+111dc: 01 00 00 00 nop *
+111e0: 01 00 00 00 nop *
+111e4: 01 00 00 00 nop *
+111e8: 13 00 00 00 sethi %hi\(0\), %o1
+111ec: 96 1a 7f a0 xor %o1, -96, %o3
+111f0: 90 10 00 0b mov %o3, %o0
+111f4: 96 01 c0 08 add %g7, %o0, %o3
+111f8: 01 00 00 00 nop *
+111fc: 01 00 00 00 nop *
+11200: 01 00 00 00 nop *
+11204: 01 00 00 00 nop *
+11208: 17 00 00 00 sethi %hi\(0\), %o3
+1120c: 96 02 e0 04 add %o3, 4, %o3 ! 4 <.*>
+11210: d4 05 c0 0b ld \[ %l7 \+ %o3 \], %o2
+11214: d8 01 c0 0a ld \[ %g7 \+ %o2 \], %o4
+11218: 01 00 00 00 nop *
+1121c: 01 00 00 00 nop *
+11220: 01 00 00 00 nop *
+11224: 01 00 00 00 nop *
+11228: 17 00 00 00 sethi %hi\(0\), %o3
+1122c: 96 1a ff 90 xor %o3, -112, %o3
+11230: 94 10 00 0b mov %o3, %o2
+11234: d8 29 c0 0a stb %o4, \[ %g7 \+ %o2 \]
+11238: 01 00 00 00 nop *
+1123c: 01 00 00 00 nop *
+11240: 01 00 00 00 nop *
+11244: 01 00 00 00 nop *
+11248: 1b 00 00 00 sethi %hi\(0\), %o5
+1124c: 96 1b 7f b0 xor %o5, -80, %o3
+11250: 94 10 00 0b mov %o3, %o2
+11254: d8 49 c0 0a ldsb \[ %g7 \+ %o2 \], %o4
+11258: 01 00 00 00 nop *
+1125c: 01 00 00 00 nop *
+11260: 01 00 00 00 nop *
+11264: 01 00 00 00 nop *
+11268: 81 c7 e0 08 ret *
+1126c: 81 e8 00 00 restore *
#...
00012000 <_start>:
+12000: 9d e3 bf 98 save %sp, -104, %sp
+12004: 29 00 00 94 sethi %hi\(0x25000\), %l4
+12008: a8 15 20 e0 or %l4, 0xe0, %l4 ! 250e0 <.*>
+1200c: 01 00 00 00 nop *
+12010: 01 00 00 00 nop *
+12014: 01 00 00 00 nop *
+12018: 01 00 00 00 nop *
+1201c: 17 00 00 00 sethi %hi\(0\), %o3
+12020: 96 02 e0 0c add %o3, 0xc, %o3 ! c <.*>
+12024: d4 05 00 0b ld \[ %l4 \+ %o3 \], %o2
+12028: 98 01 c0 0a add %g7, %o2, %o4
+1202c: 01 00 00 00 nop *
+12030: 01 00 00 00 nop *
+12034: 01 00 00 00 nop *
+12038: 01 00 00 00 nop *
+1203c: 17 00 00 00 sethi %hi\(0\), %o3
+12040: 9a 1a ff d4 xor %o3, -44, %o5
+12044: 94 10 00 0d mov %o5, %o2
+12048: 98 01 c0 0a add %g7, %o2, %o4
+1204c: 01 00 00 00 nop *
+12050: 01 00 00 00 nop *
+12054: 01 00 00 00 nop *
+12058: 01 00 00 00 nop *
+1205c: 17 00 00 00 sethi %hi\(0\), %o3
+12060: 9a 1a ff f4 xor %o3, -12, %o5
+12064: a4 10 00 0d mov %o5, %l2
+12068: a4 01 c0 12 add %g7, %l2, %l2
+1206c: 01 00 00 00 nop *
+12070: 01 00 00 00 nop *
+12074: 01 00 00 00 nop *
+12078: 01 00 00 00 nop *
+1207c: 17 00 00 00 sethi %hi\(0\), %o3
+12080: 9a 1a ff fc xor %o3, -4, %o5
+12084: a4 10 00 0d mov %o5, %l2
+12088: e4 01 c0 12 ld \[ %g7 \+ %l2 \], %l2
+1208c: 01 00 00 00 nop *
+12090: 01 00 00 00 nop *
+12094: 01 00 00 00 nop *
+12098: 01 00 00 00 nop *
+1209c: 17 00 00 00 sethi %hi\(0\), %o3
+120a0: 9a 1a ff b4 xor %o3, -76, %o5
+120a4: a4 10 00 0d mov %o5, %l2
+120a8: a4 01 c0 12 add %g7, %l2, %l2
+120ac: 01 00 00 00 nop *
+120b0: 01 00 00 00 nop *
+120b4: 01 00 00 00 nop *
+120b8: 01 00 00 00 nop *
+120bc: 17 00 00 00 sethi %hi\(0\), %o3
+120c0: 9a 1a ff fc xor %o3, -4, %o5
+120c4: a4 10 00 0d mov %o5, %l2
+120c8: e2 29 c0 12 stb %l1, \[ %g7 \+ %l2 \]
+120cc: 01 00 00 00 nop *
+120d0: 01 00 00 00 nop *
+120d4: 01 00 00 00 nop *
+120d8: 01 00 00 00 nop *
+120dc: 23 00 00 00 sethi %hi\(0\), %l1
+120e0: 01 00 00 00 nop *
+120e4: a4 1c 7f 64 xor %l1, -156, %l2
+120e8: 01 00 00 00 nop *
+120ec: a6 01 c0 12 add %g7, %l2, %l3
+120f0: 01 00 00 00 nop *
+120f4: 01 00 00 00 nop *
+120f8: 01 00 00 00 nop *
+120fc: 01 00 00 00 nop *
+12100: 11 00 00 00 sethi %hi\(0\), %o0
+12104: 90 1a 3f e6 xor %o0, -26, %o0
+12108: 90 01 c0 08 add %g7, %o0, %o0
+1210c: 01 00 00 00 nop *
+12110: 01 00 00 00 nop *
+12114: 01 00 00 00 nop *
+12118: 01 00 00 00 nop *
+1211c: 23 00 00 00 sethi %hi\(0\), %l1
+12120: 9a 1c 7f a5 xor %l1, -91, %o5
+12124: 92 01 c0 0d add %g7, %o5, %o1
+12128: 01 00 00 00 nop *
+1212c: 01 00 00 00 nop *
+12130: 01 00 00 00 nop *
+12134: 01 00 00 00 nop *
+12138: 23 00 00 00 sethi %hi\(0\), %l1
+1213c: 9a 1c 7f 68 xor %l1, -152, %o5
+12140: d2 01 c0 0d ld \[ %g7 \+ %o5 \], %o1
+12144: 01 00 00 00 nop *
+12148: 01 00 00 00 nop *
+1214c: 01 00 00 00 nop *
+12150: 01 00 00 00 nop *
+12154: 11 00 00 00 sethi %hi\(0\), %o0
+12158: 90 1a 3f eb xor %o0, -21, %o0
+1215c: d2 29 c0 08 stb %o1, \[ %g7 \+ %o0 \]
+12160: 01 00 00 00 nop *
+12164: 01 00 00 00 nop *
+12168: 01 00 00 00 nop *
+1216c: 01 00 00 00 nop *
+12170: 15 00 00 00 sethi %hi\(0\), %o2
+12174: 98 1a bf ab xor %o2, -85, %o4
+12178: da 69 c0 0c ldstub \[ %g7 \+ %o4 \], %o5
+1217c: 01 00 00 00 nop *
+12180: 01 00 00 00 nop *
+12184: 01 00 00 00 nop *
+12188: 01 00 00 00 nop *
+1218c: 81 c7 e0 08 ret *
+12190: 81 e8 00 00 restore *