Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 174961
Collapse All | Expand All

(-)binutils-2.17/bfd/config.bfd (-2 / +2 lines)
Lines 555-562 Link Here
555
    targ_selvecs="bfd_elf32_i386_vec i386coff_vec"
555
    targ_selvecs="bfd_elf32_i386_vec i386coff_vec"
556
    ;;
556
    ;;
557
  x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
557
  x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
558
    targ_defvec=bfd_elf64_x86_64_vec
558
    targ_defvec=bfd_elf64_x86_64_freebsd_vec
559
    targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec"
559
    targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec bfd_efi_app_ia32_vec"
560
    ;;
560
    ;;
561
  x86_64-*-netbsd* | x86_64-*-openbsd*)
561
  x86_64-*-netbsd* | x86_64-*-openbsd*)
562
    targ_defvec=bfd_elf64_x86_64_vec
562
    targ_defvec=bfd_elf64_x86_64_vec
(-)binutils-2.17/bfd/configure (+1 lines)
Lines 13196-13201 Link Here
13196
    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 ;;
13196
    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 ;;
13197
    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 ;;
13197
    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 ;;
13198
    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
13198
    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
13199
    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
13199
    bfd_mmo_vec)		tb="$tb mmo.lo" target_size=64 ;;
13200
    bfd_mmo_vec)		tb="$tb mmo.lo" target_size=64 ;;
13200
    bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
13201
    bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
13201
    bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
13202
    bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
(-)binutils-2.17/bfd/configure.in (+1 lines)
Lines 709-714 Link Here
709
    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 ;;
709
    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 ;;
710
    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 ;;
710
    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 ;;
711
    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
711
    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
712
    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
712
    bfd_mmo_vec)		tb="$tb mmo.lo" target_size=64 ;;
713
    bfd_mmo_vec)		tb="$tb mmo.lo" target_size=64 ;;
713
    bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
714
    bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
714
    bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
715
    bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
(-)binutils-2.17/bfd/elf64-x86-64.c (+28 lines)
Lines 3686-3689 Link Here
3686
#define elf_backend_additional_program_headers \
3686
#define elf_backend_additional_program_headers \
3687
  elf64_x86_64_additional_program_headers
3687
  elf64_x86_64_additional_program_headers
3688
3688
3689
/* FreeBSD support.  */
3690
3691
#undef TARGET_LITTLE_SYM
3692
#define TARGET_LITTLE_SYM	bfd_elf64_x86_64_freebsd_vec
3693
#undef TARGET_LITTLE_NAME
3694
#define TARGET_LITTLE_NAME	"elf64-x86-64-freebsd"
3695
3696
/* The kernel recognizes executables as valid only if they carry a
3697
   "FreeBSD" label in the ELF header.  So we put this label on all
3698
   executables and (for simplicity) also all other object files.  */
3699
3700
static void
3701
elf_x86_64_post_process_headers (bfd *abfd,
3702
                                struct bfd_link_info *info ATTRIBUTE_UNUSED)
3703
{
3704
  Elf_Internal_Ehdr *i_ehdrp;
3705
3706
  i_ehdrp = elf_elfheader (abfd);
3707
3708
  /* Put an ABI label supported by FreeBSD >= 4.1.  */
3709
  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
3710
}
3711
3712
#undef elf_backend_post_process_headers
3713
#define elf_backend_post_process_headers elf_x86_64_post_process_headers
3714
#undef elf64_bed
3715
#define elf64_bed elf64_x86_64_fbsd_bed
3716
3689
#include "elf64-target.h"
3717
#include "elf64-target.h"
(-)binutils-2.17/bfd/targets.c (+2 lines)
Lines 670-675 Link Here
670
extern const bfd_target bfd_elf64_tradbigmips_vec;
670
extern const bfd_target bfd_elf64_tradbigmips_vec;
671
extern const bfd_target bfd_elf64_tradlittlemips_vec;
671
extern const bfd_target bfd_elf64_tradlittlemips_vec;
672
extern const bfd_target bfd_elf64_x86_64_vec;
672
extern const bfd_target bfd_elf64_x86_64_vec;
673
extern const bfd_target bfd_elf64_x86_64_freebsd_vec;
673
extern const bfd_target bfd_mmo_vec;
674
extern const bfd_target bfd_mmo_vec;
674
extern const bfd_target bfd_powerpc_pe_vec;
675
extern const bfd_target bfd_powerpc_pe_vec;
675
extern const bfd_target bfd_powerpc_pei_vec;
676
extern const bfd_target bfd_powerpc_pei_vec;
Lines 987-992 Link Here
987
	&bfd_elf64_tradbigmips_vec,
988
	&bfd_elf64_tradbigmips_vec,
988
	&bfd_elf64_tradlittlemips_vec,
989
	&bfd_elf64_tradlittlemips_vec,
989
	&bfd_elf64_x86_64_vec,
990
	&bfd_elf64_x86_64_vec,
991
	&bfd_elf64_x86_64_freebsd_vec,
990
	&bfd_mmo_vec,
992
	&bfd_mmo_vec,
991
#endif
993
#endif
992
	&bfd_powerpc_pe_vec,
994
	&bfd_powerpc_pe_vec,
(-)binutils-2.17/gas/config/tc-i386.c (-2 / +2 lines)
Lines 5469-5475 Link Here
5469
5469
5470
	list = bfd_target_list ();
5470
	list = bfd_target_list ();
5471
	for (l = list; *l != NULL; l++)
5471
	for (l = list; *l != NULL; l++)
5472
	  if (strcmp (*l, "elf64-x86-64") == 0)
5472
	  if (strcmp (*l, ELF64_TARGET_FORMAT) == 0)
5473
	    {
5473
	    {
5474
	      default_arch = "x86_64";
5474
	      default_arch = "x86_64";
5475
	      break;
5475
	      break;
Lines 5566-5572 Link Here
5566
	    object_64bit = 1;
5566
	    object_64bit = 1;
5567
	    use_rela_relocations = 1;
5567
	    use_rela_relocations = 1;
5568
	  }
5568
	  }
5569
	return flag_code == CODE_64BIT ? "elf64-x86-64" : ELF_TARGET_FORMAT;
5569
	return flag_code == CODE_64BIT ? ELF64_TARGET_FORMAT : ELF_TARGET_FORMAT;
5570
      }
5570
      }
5571
#endif
5571
#endif
5572
    default:
5572
    default:
(-)binutils-2.17/gas/config/tc-i386.h (+5 lines)
Lines 55-60 Link Here
55
55
56
#ifdef TE_FreeBSD
56
#ifdef TE_FreeBSD
57
#define ELF_TARGET_FORMAT	"elf32-i386-freebsd"
57
#define ELF_TARGET_FORMAT	"elf32-i386-freebsd"
58
#define ELF64_TARGET_FORMAT	"elf64-x86-64-freebsd"
58
#elif defined (TE_VXWORKS)
59
#elif defined (TE_VXWORKS)
59
#define ELF_TARGET_FORMAT	"elf32-i386-vxworks"
60
#define ELF_TARGET_FORMAT	"elf32-i386-vxworks"
60
#endif
61
#endif
Lines 62-67 Link Here
62
#ifndef ELF_TARGET_FORMAT
63
#ifndef ELF_TARGET_FORMAT
63
#define ELF_TARGET_FORMAT	"elf32-i386"
64
#define ELF_TARGET_FORMAT	"elf32-i386"
64
#endif
65
#endif
66
#ifndef ELF64_TARGET_FORMAT
67
#define ELF64_TARGET_FORMAT	"elf64-x86-64"
68
#endif
69
65
70
66
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
71
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
67
     || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
72
     || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
(-)binutils-2.17/ld/emulparams/elf_x86_64_fbsd.sh (+2 lines)
Lines 1-2 Link Here
1
. ${srcdir}/emulparams/elf_x86_64.sh
1
. ${srcdir}/emulparams/elf_x86_64.sh
2
. ${srcdir}/emulparams/elf_fbsd.sh
2
. ${srcdir}/emulparams/elf_fbsd.sh
3
4
OUTPUT_FORMAT="elf64-x86-64-freebsd"

Return to bug 174961