diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/Makefile.am binutils-2.13.90.0.4/bfd/Makefile.am *** binutils-2.13.90.0.4.bak/bfd/Makefile.am Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/bfd/Makefile.am Sun Sep 29 16:45:56 2002 *************** *** 213,218 **** --- 213,219 ---- elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ + elf32-i386-fbsd.lo \ elf32-i386qnx.lo \ elf32-i860.lo \ elf32-i960.lo \ *************** *** 373,378 **** --- 374,380 ---- elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ + elf32-i386-fbsd.c \ elf32-i386qnx.c \ elf32-i860.c \ elf32-i960.c \ *************** *** 481,486 **** --- 483,489 ---- efi-app-ia64.lo \ elf64-x86-64.lo \ elf64-alpha.lo \ + elf64-alpha-fbsd.lo \ elf64-hppa.lo \ elf64-ia64.lo \ elf64-gen.lo \ *************** *** 507,512 **** --- 510,516 ---- efi-app-ia64.c \ elf64-x86-64.c \ elf64-alpha.c \ + elf64-alpha-fbsd.c \ elf64-hppa.c \ elf64-gen.c \ elfn32-mips.c \ *************** *** 1152,1157 **** --- 1156,1165 ---- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h + elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ *************** *** 1508,1513 **** --- 1516,1528 ---- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ libecoff.h ecoffswap.h elf64-target.h + elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c elf64-alpha.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ + libecoff.h ecoffswap.h elf64-target.h elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/Makefile.in binutils-2.13.90.0.4/bfd/Makefile.in *** binutils-2.13.90.0.4.bak/bfd/Makefile.in Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/bfd/Makefile.in Sun Sep 29 16:45:56 2002 *************** *** 341,346 **** --- 341,347 ---- elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ + elf32-i386-fbsd.lo \ elf32-i386qnx.lo \ elf32-i860.lo \ elf32-i960.lo \ *************** *** 502,507 **** --- 503,509 ---- elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ + elf32-i386-fbsd.c \ elf32-i386qnx.c \ elf32-i860.c \ elf32-i960.c \ *************** *** 611,616 **** --- 613,619 ---- efi-app-ia64.lo \ elf64-x86-64.lo \ elf64-alpha.lo \ + elf64-alpha-fbsd.lo \ elf64-hppa.lo \ elf64-ia64.lo \ elf64-gen.lo \ *************** *** 638,643 **** --- 641,647 ---- efi-app-ia64.c \ elf64-x86-64.c \ elf64-alpha.c \ + elf64-alpha-fbsd.c \ elf64-hppa.c \ elf64-gen.c \ elfn32-mips.c \ *************** *** 1682,1687 **** --- 1686,1695 ---- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h + elf32-i386-fbsd.lo: elf32-i386-fbsd.c elf32-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-i386qnx.lo: elf32-i386qnx.c elf32-i386.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h \ *************** *** 2038,2043 **** --- 2046,2058 ---- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ libecoff.h ecoffswap.h elf64-target.h + elf64-alpha-fbsd.lo: elf64-alpha-fbsd.c elf64-alpha.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ + libecoff.h ecoffswap.h elf64-target.h elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/config.bfd binutils-2.13.90.0.4/bfd/config.bfd *** binutils-2.13.90.0.4.bak/bfd/config.bfd Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/bfd/config.bfd Sun Sep 29 16:45:56 2002 *************** *** 70,76 **** case "${targ}" in # START OF targmatch.h #ifdef BFD64 ! alpha*-*-netbsd* | alpha*-*-freebsd* | alpha*-*-openbsd*) targ_defvec=bfd_elf64_alpha_vec targ_selvecs=ecoffalpha_little_vec ;; --- 70,85 ---- case "${targ}" in # START OF targmatch.h #ifdef BFD64 ! alpha*-*-freebsd*) ! targ_defvec=bfd_elf64_alpha_freebsd_vec ! targ_selvecs=ecoffalpha_little_vec ! # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling. ! case "${targ}" in ! alpha*-*-freebsd3* | alpha*-*-freebsd4 | alpha*-*-freebsd4.0*) ! targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;; ! esac ! ;; ! alpha*-*-netbsd* | alpha*-*-openbsd*) targ_defvec=bfd_elf64_alpha_vec targ_selvecs=ecoffalpha_little_vec ;; *************** *** 392,399 **** targ_underscore=yes ;; i[3456]86-*-freebsd*) ! targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; i[3456]86-*-netbsdelf*) targ_defvec=bfd_elf32_i386_vec --- 401,413 ---- targ_underscore=yes ;; i[3456]86-*-freebsd*) ! targ_defvec=bfd_elf32_i386_freebsd_vec targ_selvecs=i386coff_vec + # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling. + case "${targ}" in + i[3456]86-*-freebsd3* | i[3456]86-*-freebsd4 | i[3456]86-*-freebsd4.0*) + targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;; + esac ;; i[3456]86-*-netbsdelf*) targ_defvec=bfd_elf32_i386_vec diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/configure binutils-2.13.90.0.4/bfd/configure *** binutils-2.13.90.0.4.bak/bfd/configure Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/bfd/configure Sun Sep 29 16:45:56 2002 *************** *** 6069,6074 **** --- 6069,6075 ---- bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;; bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; *************** *** 6125,6130 **** --- 6126,6132 ---- bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; + bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha-fbsd.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/configure.in binutils-2.13.90.0.4/bfd/configure.in *** binutils-2.13.90.0.4.bak/bfd/configure.in Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/bfd/configure.in Sun Sep 29 16:45:56 2002 *************** *** 576,581 **** --- 576,582 ---- bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386-fbsd.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf32_i386qnx_vec) tb="$tb elf32-i386qnx.lo elf32.lo $elf" ;; bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; *************** *** 632,637 **** --- 633,639 ---- bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; bfd_elf32_vax_vec) tb="$tb elf32-vax.lo elf32.lo $elf" ;; bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; + bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha-fbsd.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/elf32-i386-fbsd.c binutils-2.13.90.0.4/bfd/elf32-i386-fbsd.c *** binutils-2.13.90.0.4.bak/bfd/elf32-i386-fbsd.c Thu Jan 1 01:00:00 1970 --- binutils-2.13.90.0.4/bfd/elf32-i386-fbsd.c Sun Sep 29 16:45:56 2002 *************** *** 0 **** --- 1,57 ---- + /* Intel IA-32 specific support for 32-bit ELF on FreeBSD. + Copyright 2002 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + #define TARGET_LITTLE_SYM bfd_elf32_i386_freebsd_vec + #define TARGET_LITTLE_NAME "elf32-i386-freebsd" + #define ELF_ARCH bfd_arch_i386 + #define ELF_MACHINE_CODE EM_386 + #define ELF_MAXPAGESIZE 0x1000 + + #include "bfd.h" + #include "sysdep.h" + #include "elf-bfd.h" + + /* The kernel recognizes executables as valid only if they carry a + "FreeBSD" label in the ELF header. So we put this label on all + executables and (for simplicity) also all other object files. */ + + static void elf_i386_post_process_headers + PARAMS ((bfd *, struct bfd_link_info *)); + + static void + elf_i386_post_process_headers (abfd, link_info) + bfd * abfd; + struct bfd_link_info * link_info ATTRIBUTE_UNUSED; + { + Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */ + + i_ehdrp = elf_elfheader (abfd); + + #ifdef OLD_FREEBSD_ABI_LABEL + /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */ + memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8); + #else + /* Put an ABI label supported by FreeBSD >= 4.1. */ + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD; + #endif + } + + #define elf_backend_post_process_headers elf_i386_post_process_headers + + #include "elf32-i386.c" diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/elf32-i386.c binutils-2.13.90.0.4/bfd/elf32-i386.c *** binutils-2.13.90.0.4.bak/bfd/elf32-i386.c Fri Aug 9 07:49:55 2002 --- binutils-2.13.90.0.4/bfd/elf32-i386.c Sun Sep 29 16:45:56 2002 *************** *** 3113,3123 **** --- 3113,3125 ---- return true; } + #ifndef ELF_ARCH #define TARGET_LITTLE_SYM bfd_elf32_i386_vec #define TARGET_LITTLE_NAME "elf32-i386" #define ELF_ARCH bfd_arch_i386 #define ELF_MACHINE_CODE EM_386 #define ELF_MAXPAGESIZE 0x1000 + #endif /* ELF_ARCH */ #define elf_backend_can_gc_sections 1 #define elf_backend_can_refcount 1 diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/elf64-alpha-fbsd.c binutils-2.13.90.0.4/bfd/elf64-alpha-fbsd.c *** binutils-2.13.90.0.4.bak/bfd/elf64-alpha-fbsd.c Thu Jan 1 01:00:00 1970 --- binutils-2.13.90.0.4/bfd/elf64-alpha-fbsd.c Sun Sep 29 16:45:56 2002 *************** *** 0 **** --- 1,57 ---- + /* Alpha specific support for 64-bit ELF on FreeBSD. + Copyright 2002 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + #define TARGET_LITTLE_SYM bfd_elf64_alpha_freebsd_vec + #define TARGET_LITTLE_NAME "elf64-alpha-freebsd" + #define ELF_ARCH bfd_arch_alpha + #define ELF_MACHINE_CODE EM_ALPHA + #define ELF_MAXPAGESIZE 0x10000 + + #include "bfd.h" + #include "sysdep.h" + #include "elf-bfd.h" + + /* The kernel recognizes executables as valid only if they carry a + "FreeBSD" label in the ELF header. So we put this label on all + executables and (for simplicity) also all other object files. */ + + static void elf_alpha_post_process_headers + PARAMS ((bfd *, struct bfd_link_info *)); + + static void + elf_alpha_post_process_headers (abfd, link_info) + bfd * abfd; + struct bfd_link_info * link_info ATTRIBUTE_UNUSED; + { + Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */ + + i_ehdrp = elf_elfheader (abfd); + + #ifdef OLD_FREEBSD_ABI_LABEL + /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */ + memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8); + #else + /* Put an ABI label supported by FreeBSD >= 4.1. */ + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD; + #endif + } + + #define elf_backend_post_process_headers elf_alpha_post_process_headers + + #include "elf64-alpha.c" diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/elf64-alpha.c binutils-2.13.90.0.4/bfd/elf64-alpha.c *** binutils-2.13.90.0.4.bak/bfd/elf64-alpha.c Mon Jul 29 17:19:16 2002 --- binutils-2.13.90.0.4/bfd/elf64-alpha.c Sun Sep 29 16:45:56 2002 *************** *** 5509,5519 **** --- 5509,5521 ---- NULL }; + #ifndef ELF_ARCH #define TARGET_LITTLE_SYM bfd_elf64_alpha_vec #define TARGET_LITTLE_NAME "elf64-alpha" #define ELF_ARCH bfd_arch_alpha #define ELF_MACHINE_CODE EM_ALPHA #define ELF_MAXPAGESIZE 0x10000 + #endif /* ELF_ARCH */ #define bfd_elf64_bfd_link_hash_table_create \ elf64_alpha_bfd_link_hash_table_create diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/elfcode.h binutils-2.13.90.0.4/bfd/elfcode.h *** binutils-2.13.90.0.4.bak/bfd/elfcode.h Wed Jul 17 20:38:29 2002 --- binutils-2.13.90.0.4/bfd/elfcode.h Sun Sep 29 16:45:56 2002 *************** *** 663,670 **** } } if (i_ehdrp->e_type == ET_EXEC) ! abfd->flags |= EXEC_P; else if (i_ehdrp->e_type == ET_DYN) abfd->flags |= DYNAMIC; --- 663,684 ---- } } + /* Determine whether the file is an executable or a shared object. + It can even be both: The dynamic loader "ld.so*" is declared as an + executable (so the kernel can exec it) but at the same time we + treat it as a shared object (for symbol versioning purposes). */ if (i_ehdrp->e_type == ET_EXEC) ! { ! const char *file_name = abfd->filename; ! const char *last_slash = strrchr (file_name, '/'); ! const char *base_name = (last_slash ? last_slash + 1 : file_name); ! if (strncmp (base_name, "ld.so", 5) == 0) ! /* The dynamic loader. */ ! abfd->flags |= DYNAMIC; ! else ! /* Normal executable. */ ! abfd->flags |= EXEC_P; ! } else if (i_ehdrp->e_type == ET_DYN) abfd->flags |= DYNAMIC; diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/bfd/targets.c binutils-2.13.90.0.4/bfd/targets.c *** binutils-2.13.90.0.4.bak/bfd/targets.c Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/bfd/targets.c Sun Sep 29 16:45:56 2002 *************** *** 520,525 **** --- 520,526 ---- extern const bfd_target bfd_elf32_hppa_linux_vec; extern const bfd_target bfd_elf32_hppa_vec; extern const bfd_target bfd_elf32_i370_vec; + extern const bfd_target bfd_elf32_i386_freebsd_vec; extern const bfd_target bfd_elf32_i386_vec; extern const bfd_target bfd_elf32_i386qnx_vec; extern const bfd_target bfd_elf32_i860_little_vec; *************** *** 573,578 **** --- 574,580 ---- extern const bfd_target bfd_elf32_v850_vec; extern const bfd_target bfd_elf32_vax_vec; extern const bfd_target bfd_elf32_xstormy16_vec; + extern const bfd_target bfd_elf64_alpha_freebsd_vec; extern const bfd_target bfd_elf64_alpha_vec; extern const bfd_target bfd_elf64_big_generic_vec; extern const bfd_target bfd_elf64_bigmips_vec; *************** *** 790,795 **** --- 792,798 ---- &bfd_elf32_hppa_linux_vec, &bfd_elf32_hppa_vec, &bfd_elf32_i370_vec, + &bfd_elf32_i386_freebsd_vec, &bfd_elf32_i386_vec, &bfd_elf32_i386qnx_vec, &bfd_elf32_i860_little_vec, *************** *** 849,854 **** --- 852,858 ---- &bfd_elf32_vax_vec, &bfd_elf32_xstormy16_vec, #ifdef BFD64 + &bfd_elf64_alpha_freebsd_vec, &bfd_elf64_alpha_vec, &bfd_elf64_big_generic_vec, &bfd_elf64_bigmips_vec, diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/configure.in binutils-2.13.90.0.4/configure.in *** binutils-2.13.90.0.4.bak/configure.in Fri Aug 9 07:49:55 2002 --- binutils-2.13.90.0.4/configure.in Sun Sep 29 16:45:56 2002 *************** *** 1156,1162 **** powerpc-*-netware*) target_makefile_frag="config/mt-netware" ;; ! *-*-linux*) target_makefile_frag="config/mt-linux" ;; *-*-aix4.[3456789]* | *-*-aix[56789].*) --- 1156,1162 ---- powerpc-*-netware*) target_makefile_frag="config/mt-netware" ;; ! *-*-linux* | *-*-freebsd*-gnu*) target_makefile_frag="config/mt-linux" ;; *-*-aix4.[3456789]* | *-*-aix[56789].*) diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/gas/config/tc-alpha.h binutils-2.13.90.0.4/gas/config/tc-alpha.h *** binutils-2.13.90.0.4.bak/gas/config/tc-alpha.h Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/gas/config/tc-alpha.h Sun Sep 29 16:45:56 2002 *************** *** 28,37 **** #define TARGET_ARCH bfd_arch_alpha #define TARGET_FORMAT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \ ? "ecoff-littlealpha" \ : OUTPUT_FLAVOR == bfd_target_elf_flavour \ ! ? "elf64-alpha" \ : OUTPUT_FLAVOR == bfd_target_evax_flavour \ ? "vms-alpha" \ : "unknown-format") --- 28,44 ---- #define TARGET_ARCH bfd_arch_alpha + #ifdef TE_FreeBSD + #define ELF_TARGET_FORMAT "elf64-alpha-freebsd" + #endif + #ifndef ELF_TARGET_FORMAT + #define ELF_TARGET_FORMAT "elf64-alpha" + #endif + #define TARGET_FORMAT (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \ ? "ecoff-littlealpha" \ : OUTPUT_FLAVOR == bfd_target_elf_flavour \ ! ? ELF_TARGET_FORMAT \ : OUTPUT_FLAVOR == bfd_target_evax_flavour \ ? "vms-alpha" \ : "unknown-format") diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/gas/config/tc-i386.c binutils-2.13.90.0.4/gas/config/tc-i386.c *** binutils-2.13.90.0.4.bak/gas/config/tc-i386.c Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/gas/config/tc-i386.c Sun Sep 29 16:45:56 2002 *************** *** 4960,4966 **** { if (flag_code == CODE_64BIT) use_rela_relocations = 1; ! return flag_code == CODE_64BIT ? "elf64-x86-64" : "elf32-i386"; } #endif default: --- 4960,4966 ---- { if (flag_code == CODE_64BIT) use_rela_relocations = 1; ! return flag_code == CODE_64BIT ? "elf64-x86-64" : ELF_TARGET_FORMAT; } #endif default: diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/gas/config/tc-i386.h binutils-2.13.90.0.4/gas/config/tc-i386.h *** binutils-2.13.90.0.4.bak/gas/config/tc-i386.h Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/gas/config/tc-i386.h Sun Sep 29 16:45:56 2002 *************** *** 60,72 **** #define AOUT_TARGET_FORMAT "a.out-i386" #endif #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) extern const char *i386_target_format PARAMS ((void)); #define TARGET_FORMAT i386_target_format () #else #ifdef OBJ_ELF ! #define TARGET_FORMAT "elf32-i386" #endif #ifdef OBJ_AOUT #define TARGET_FORMAT AOUT_TARGET_FORMAT --- 60,79 ---- #define AOUT_TARGET_FORMAT "a.out-i386" #endif + #ifdef TE_FreeBSD + #define ELF_TARGET_FORMAT "elf32-i386-freebsd" + #endif + #ifndef ELF_TARGET_FORMAT + #define ELF_TARGET_FORMAT "elf32-i386" + #endif + #if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) extern const char *i386_target_format PARAMS ((void)); #define TARGET_FORMAT i386_target_format () #else #ifdef OBJ_ELF ! #define TARGET_FORMAT ELF_TARGET_FORMAT #endif #ifdef OBJ_AOUT #define TARGET_FORMAT AOUT_TARGET_FORMAT diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/gas/configure binutils-2.13.90.0.4/gas/configure *** binutils-2.13.90.0.4.bak/gas/configure Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/gas/configure Sun Sep 29 16:45:56 2002 *************** *** 2415,2420 **** --- 2415,2421 ---- i386-*-freebsdaout*) fmt=aout em=386bsd ;; i386-*-freebsd[12].*) fmt=aout em=386bsd ;; i386-*-freebsd[12]) fmt=aout em=386bsd ;; + i386-*-freebsd*-gnu*) fmt=elf em=freebsd ;; i386-*-sysv*) fmt=coff ;; i386-*-sco3.2v5*coff) fmt=coff ;; i386-*-isc*) fmt=coff ;; diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/gas/configure.in binutils-2.13.90.0.4/gas/configure.in *** binutils-2.13.90.0.4.bak/gas/configure.in Wed Aug 14 19:35:11 2002 --- binutils-2.13.90.0.4/gas/configure.in Sun Sep 29 16:45:56 2002 *************** *** 273,278 **** --- 273,279 ---- i386-*-freebsd[12].*) fmt=aout em=386bsd ;; i386-*-freebsd[12]) fmt=aout em=386bsd ;; changequote([,])dnl + i386-*-freebsd*-gnu*) fmt=elf em=freebsd ;; i386-*-sysv*) fmt=coff ;; i386-*-sco3.2v5*coff) fmt=coff ;; i386-*-isc*) fmt=coff ;; diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/ld/emulparams/elf64alpha_fbsd.sh binutils-2.13.90.0.4/ld/emulparams/elf64alpha_fbsd.sh *** binutils-2.13.90.0.4.bak/ld/emulparams/elf64alpha_fbsd.sh Thu Mar 7 20:52:39 2002 --- binutils-2.13.90.0.4/ld/emulparams/elf64alpha_fbsd.sh Sun Sep 29 16:45:56 2002 *************** *** 1,2 **** --- 1,3 ---- . ${srcdir}/emulparams/elf64alpha.sh . ${srcdir}/emulparams/elf_fbsd.sh + OUTPUT_FORMAT="elf64-alpha-freebsd" diff -r -c3 --unidirectional-new-file binutils-2.13.90.0.4.bak/ld/emulparams/elf_i386_fbsd.sh binutils-2.13.90.0.4/ld/emulparams/elf_i386_fbsd.sh *** binutils-2.13.90.0.4.bak/ld/emulparams/elf_i386_fbsd.sh Thu Mar 7 20:52:39 2002 --- binutils-2.13.90.0.4/ld/emulparams/elf_i386_fbsd.sh Sun Sep 29 16:45:56 2002 *************** *** 1,2 **** --- 1,3 ---- . ${srcdir}/emulparams/elf_i386.sh . ${srcdir}/emulparams/elf_fbsd.sh + OUTPUT_FORMAT="elf32-i386-freebsd"