Browse Source

ld:

* emulparams/elf32_sparc_sol2.sh (OUTPUT_FORMAT): Set to
	elf32-sparc-sol2.
	* emulparams/elf64_sparc_sol2.sh (OUTPUT_FORMAT): Set to
	elf64-sparc-sol2.

	gas:
	* config/tc-sparc.h [TE_SOLARIS] (ELF_TARGET_FORMAT): Define as
	elf32-sparc-sol2.
	(ELF64_TARGET_FORMAT): Define as elf64-sparc-sol2.

	bfd:
	* 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.
binutils-2_21-branch
Rainer Orth 16 years ago
parent
commit
1360ba7676
  1. 37
      bfd/ChangeLog
  2. 10
      bfd/config.bfd
  3. 2
      bfd/configure
  4. 2
      bfd/configure.in
  5. 20
      bfd/elf32-sparc.c
  6. 22
      bfd/elf64-sparc.c
  7. 7
      bfd/elfxx-sparc.c
  8. 4
      bfd/targets.c
  9. 6
      gas/ChangeLog
  10. 7
      gas/config/tc-sparc.h
  11. 7
      ld/ChangeLog
  12. 1
      ld/emulparams/elf32_sparc_sol2.sh
  13. 1
      ld/emulparams/elf64_sparc_sol2.sh

37
bfd/ChangeLog

@ -1,3 +1,40 @@
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

10
bfd/config.bfd

@ -1395,14 +1395,18 @@ case "${targ}" in
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

2
bfd/configure

@ -15148,6 +15148,7 @@ do
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" ;;
@ -15185,6 +15186,7 @@ do
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 ;;

2
bfd/configure.in

@ -783,6 +783,7 @@ do
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" ;;
@ -820,6 +821,7 @@ do
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 ;;

20
bfd/elf32-sparc.c

@ -1,6 +1,6 @@
/* 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.
@ -246,6 +246,23 @@ elf32_sparc_add_symbol_hook (bfd * abfd,
#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. */
@ -305,6 +322,7 @@ elf32_sparc_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
#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

22
bfd/elf64-sparc.c

@ -1,6 +1,6 @@
/* 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.
@ -934,3 +934,23 @@ const struct elf_size_info elf64_sparc_size_info =
#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"

7
bfd/elfxx-sparc.c

@ -2819,11 +2819,16 @@ static bfd_vma
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. */

4
bfd/targets.c

@ -676,6 +676,7 @@ extern const bfd_target bfd_elf32_shlvxworks_vec;
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;
@ -713,6 +714,7 @@ extern const bfd_target bfd_elf64_sh64lnbsd_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;
@ -1025,6 +1027,7 @@ static const bfd_target * const _bfd_target_vector[] =
&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,
@ -1063,6 +1066,7 @@ static const bfd_target * const _bfd_target_vector[] =
&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,

6
gas/ChangeLog

@ -1,3 +1,9 @@
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,

7
gas/config/tc-sparc.h

@ -1,6 +1,6 @@
/* 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.
@ -37,6 +37,11 @@ struct frag;
#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

7
ld/ChangeLog

@ -1,3 +1,10 @@
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

1
ld/emulparams/elf32_sparc_sol2.sh

@ -1,3 +1,4 @@
. ${srcdir}/emulparams/elf32_sparc.sh
. ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE=solaris2
OUTPUT_FORMAT="elf32-sparc-sol2"

1
ld/emulparams/elf64_sparc_sol2.sh

@ -1,3 +1,4 @@
. ${srcdir}/emulparams/elf64_sparc.sh
. ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE=solaris2
OUTPUT_FORMAT="elf64-sparc-sol2"

Loading…
Cancel
Save