bfd/
authorJakub Jelinek <jakub@redhat.com>
Fri, 24 Jan 2003 23:44:45 +0000 (23:44 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 24 Jan 2003 23:44:45 +0000 (23:44 +0000)
commitb9734f35729dfe8bba288ff1b6ab2c45fbacc03d
tree8239278e95b0efb28bb27b3cd15df6de41c4f5cb
parentc34ee0383a5eb2b49f172da630431191af4886eb
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.
51 files changed:
bfd/ChangeLog
bfd/bfd-in2.h
bfd/elf32-sparc.c
bfd/elf64-sparc.c
bfd/libbfd.h
bfd/reloc.c
gas/ChangeLog
gas/config/obj-elf.c
gas/config/tc-sparc.c
gas/config/tc-sparc.h
include/ChangeLog
include/elf/sparc.h
ld/testsuite/ChangeLog
ld/testsuite/ld-sparc/sparc.exp [new file with mode: 0644]
ld/testsuite/ld-sparc/tlsg32.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlsg32.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlsg64.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlsg64.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlslib.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlsnopic.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlspic.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin32.dd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin32.rd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin32.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin32.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin32.td [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin64.dd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin64.rd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin64.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin64.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbin64.td [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbinpic32.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunbinpic64.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic32.dd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic32.rd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic32.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic32.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic64.dd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic64.rd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic64.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunnopic64.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic32.dd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic32.rd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic32.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic32.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic32.td [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic64.dd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic64.rd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic64.s [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic64.sd [new file with mode: 0644]
ld/testsuite/ld-sparc/tlssunpic64.td [new file with mode: 0644]