+2010-10-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * elfxx-sparc.c (tpoff): Define bed, static_tls_size.
+ Consider static_tls_alignment.
+
+ * elf32-sparc.c (TARGET_BIG_SYM): Redefine to
+ bfd_elf32_sparc_sol2_vec.
+ (TARGET_BIG_NAME): Redefine to elf32-sparc-sol2.
+ (elf32_bed): Redefine to elf32_sparc_sol2_bed.
+ (elf_backend_static_tls_alignment): Redefine to 8.
+ Include elf32-target.h.
+ (elf_backend_static_tls_alignment): Undef again for VxWorks.
+
+ * elf64-sparc.c (TARGET_BIG_SYM): Redefine to
+ bfd_elf64_sparc_sol2_vec.
+ (TARGET_BIG_NAME): Redefine to elf64-sparc-sol2.
+ (ELF_OSABI): Undef.
+ (elf64_bed): Redefine to elf64_sparc_sol2_bed.
+ (elf_backend_static_tls_alignment): Redefine to 16.
+ Include elf64-target.h.
+
+ * config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*.
+ Set targ_defvec to bfd_elf32_sparc_sol2_vec.
+ [BFD64] (sparc-*-solaris2*): Set targ_defvec to
+ bfd_elf32_sparc_sol2_vec.
+ Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in
+ targ_selvecs.
+
+ * configure.in: Handle bfd_elf32_sparc_sol2_vec,
+ bfd_elf64_sparc_sol2_vec.
+ * configure: Regenerate.
+
+ * targets.c (bfd_elf32_sparc_sol2_vec): Declare.
+ (bfd_elf64_sparc_sol2_vec): Declare.
+ (_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec,
+ bfd_elf64_sparc_sol2_vec.
+
2010-10-21 Joseph Myers <joseph@codesourcery.com>
* elf32-tic6x.c (elf32_tic6x_merge_arch_attributes): Update for
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs=sparcnetbsd_vec
;;
- sparc-*-elf* | sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
+ sparc-*-elf*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs=sunos_big_vec
;;
+ sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
+ targ_defvec=bfd_elf32_sparc_sol2_vec
+ targ_selvecs=sunos_big_vec
+ ;;
#ifdef BFD64
sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
- targ_defvec=bfd_elf32_sparc_vec
- targ_selvecs="bfd_elf64_sparc_vec sunos_big_vec"
+ targ_defvec=bfd_elf32_sparc_sol2_vec
+ targ_selvecs="bfd_elf64_sparc_sol2_vec sunos_big_vec"
want64=true
;;
#endif
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_sparc_sol2_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_sparc_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tic6x_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_sparc_sol2_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_sparc_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tic6x_be_vec) tb="$tb elf32-tic6x.lo elf32.lo $elf" ;;
bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sparc_sol2_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
/* SPARC-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#include "elf32-target.h"
+/* Solaris 2. */
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf32_sparc_sol2_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf32-sparc-sol2"
+
+#undef elf32_bed
+#define elf32_bed elf32_sparc_sol2_bed
+
+/* The 32-bit static TLS arena size is rounded to the nearest 8-byte
+ boundary. */
+#undef elf_backend_static_tls_alignment
+#define elf_backend_static_tls_alignment 8
+
+#include "elf32-target.h"
+
/* A wrapper around _bfd_sparc_elf_link_hash_table_create that identifies
the target system as VxWorks. */
#undef elf_backend_final_write_processing
#define elf_backend_final_write_processing \
elf32_sparc_vxworks_final_write_processing
+#undef elf_backend_static_tls_alignment
#undef elf32_bed
#define elf32_bed sparc_elf_vxworks_bed
/* SPARC-specific support for 64-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
#include "elf64-target.h"
+/* Solaris 2. */
+
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf64_sparc_sol2_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf64-sparc-sol2"
+
+/* Restore default: we cannot use ELFOSABI_SOLARIS, otherwise ELFOSABI_NONE
+ objects won't be recognized. */
+#undef ELF_OSABI
+
+#undef elf64_bed
+#define elf64_bed elf64_sparc_sol2_bed
+
+/* The 64-bit static TLS arena size is rounded to the nearest 16-byte
+ boundary. */
+#undef elf_backend_static_tls_alignment
+#define elf_backend_static_tls_alignment 16
+
+#include "elf64-target.h"
tpoff (struct bfd_link_info *info, bfd_vma address)
{
struct elf_link_hash_table *htab = elf_hash_table (info);
+ const struct elf_backend_data *bed = get_elf_backend_data (info->output_bfd);
+ bfd_vma static_tls_size;
/* If tls_sec is NULL, we should have signalled an error already. */
if (htab->tls_sec == NULL)
return 0;
- return address - htab->tls_size - htab->tls_sec->vma;
+
+ /* Consider special static TLS alignment requirements. */
+ static_tls_size = BFD_ALIGN (htab->tls_size, bed->static_tls_alignment);
+ return address - static_tls_size - htab->tls_sec->vma;
}
/* Return the relocation value for a %gdop relocation. */
extern const bfd_target bfd_elf32_shnbsd_vec;
extern const bfd_target bfd_elf32_shvxworks_vec;
extern const bfd_target bfd_elf32_sparc_vec;
+extern const bfd_target bfd_elf32_sparc_sol2_vec;
extern const bfd_target bfd_elf32_sparc_vxworks_vec;
extern const bfd_target bfd_elf32_spu_vec;
extern const bfd_target bfd_elf32_tic6x_be_vec;
extern const bfd_target bfd_elf64_sh64nbsd_vec;
extern const bfd_target bfd_elf64_sparc_vec;
extern const bfd_target bfd_elf64_sparc_freebsd_vec;
+extern const bfd_target bfd_elf64_sparc_sol2_vec;
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
extern const bfd_target bfd_elf64_x86_64_freebsd_vec;
&bfd_elf32_sh64blin_vec,
#endif
&bfd_elf32_sparc_vec,
+ &bfd_elf32_sparc_sol2_vec,
&bfd_elf32_sparc_vxworks_vec,
&bfd_elf32_spu_vec,
&bfd_elf32_tic6x_be_vec,
&bfd_elf64_sh64blin_vec,
&bfd_elf64_sparc_vec,
&bfd_elf64_sparc_freebsd_vec,
+ &bfd_elf64_sparc_sol2_vec,
&bfd_elf64_tradbigmips_vec,
&bfd_elf64_tradlittlemips_vec,
&bfd_elf64_x86_64_freebsd_vec,
+2010-10-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * config/tc-sparc.h [TE_SOLARIS] (ELF_TARGET_FORMAT): Define as
+ elf32-sparc-sol2.
+ (ELF64_TARGET_FORMAT): Define as elf64-sparc-sol2.
+
2010-10-21 Joseph Myers <joseph@codesourcery.com>
* config/tc-tic6x.c (tic6x_arch_attribute, tic6x_arches,
/* tc-sparc.h - Macros and type defines for the sparc.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2010
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#define ELF64_TARGET_FORMAT "elf64-sparc-freebsd"
#endif
+#ifdef TE_SOLARIS
+#define ELF_TARGET_FORMAT "elf32-sparc-sol2"
+#define ELF64_TARGET_FORMAT "elf64-sparc-sol2"
+#endif
+
#ifndef ELF_TARGET_FORMAT
#define ELF_TARGET_FORMAT "elf32-sparc"
#endif
+2010-10-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * emulparams/elf32_sparc_sol2.sh (OUTPUT_FORMAT): Set to
+ elf32-sparc-sol2.
+ * emulparams/elf64_sparc_sol2.sh (OUTPUT_FORMAT): Set to
+ elf64-sparc-sol2.
+
2010-10-22 Alan Modra <amodra@gmail.com>
* ldwrite.c (build_link_order <lang_data_statement_enum>): Don't
. ${srcdir}/emulparams/elf32_sparc.sh
. ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE=solaris2
+OUTPUT_FORMAT="elf32-sparc-sol2"
. ${srcdir}/emulparams/elf64_sparc.sh
. ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE=solaris2
+OUTPUT_FORMAT="elf64-sparc-sol2"