From faed74d627d4e215160a8768943c1677a3960e21 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 7 Mar 2007 21:35:28 +0000 Subject: [PATCH] 2007-03-07 H.J. Lu * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec. (x86_64-*-kfreebsd*-gnu): Likewise. (x86_64-*-netbsd*): Likewise. (x86_64-*-openbsd*): Likewise. (x86_64-*-linux-*): Likewise. * configure.in: Support bfd_efi_app_x86_64_vec. * configure: Regenerated. * efi-app-x86_64.c: New file. * targets.c (bfd_efi_app_x86_64_vec): New. (_bfd_target_vector): Add bfd_efi_app_x86_64_vec. --- bfd/ChangeLog | 16 ++++++++++++++++ bfd/config.bfd | 6 +++--- bfd/configure | 1 + bfd/configure.in | 1 + bfd/efi-app-x86_64.c | 34 ++++++++++++++++++++++++++++++++++ bfd/targets.c | 2 ++ 6 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 bfd/efi-app-x86_64.c diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 920e91ceb38..7252fde03f6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,19 @@ +2007-03-07 H.J. Lu + + * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec. + (x86_64-*-kfreebsd*-gnu): Likewise. + (x86_64-*-netbsd*): Likewise. + (x86_64-*-openbsd*): Likewise. + (x86_64-*-linux-*): Likewise. + + * configure.in: Support bfd_efi_app_x86_64_vec. + * configure: Regenerated. + + * efi-app-x86_64.c: New file. + + * targets.c (bfd_efi_app_x86_64_vec): New. + (_bfd_target_vector): Add bfd_efi_app_x86_64_vec. + 2007-03-07 Kai Tietz * reloc.c (bfd_generic_get_relocated_section_contents): Remove diff --git a/bfd/config.bfd b/bfd/config.bfd index 8d9e9f6c90b..0998139b476 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -577,17 +577,17 @@ case "${targ}" in ;; x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) targ_defvec=bfd_elf64_x86_64_freebsd_vec - targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec" + targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_efi_app_x86_64_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec" want64=true ;; x86_64-*-netbsd* | x86_64-*-openbsd*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec" + targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_efi_app_x86_64_vec" want64=true ;; x86_64-*-linux-*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec" + targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec bfd_efi_app_x86_64_vec" want64=true ;; x86_64-*-mingw*) diff --git a/bfd/configure b/bfd/configure index 00f656925ad..31aee53b3b5 100755 --- a/bfd/configure +++ b/bfd/configure @@ -10828,6 +10828,7 @@ do b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; + bfd_efi_app_x86_64_vec) tb="$tb efi-app-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; diff --git a/bfd/configure.in b/bfd/configure.in index 9251e6494bc..ad203f40a3e 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -603,6 +603,7 @@ do b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; + bfd_efi_app_x86_64_vec) tb="$tb efi-app-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; diff --git a/bfd/efi-app-x86_64.c b/bfd/efi-app-x86_64.c new file mode 100644 index 00000000000..870bbccbc94 --- /dev/null +++ b/bfd/efi-app-x86_64.c @@ -0,0 +1,34 @@ +/* BFD back-end for Intel64 UEFI application files. + Copyright 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include "bfd.h" +#include "sysdep.h" + +#define TARGET_SYM bfd_efi_app_x86_64_vec +#define TARGET_NAME "efi-app-x86_64" +#define COFF_IMAGE_WITH_PE +#define COFF_WITH_PE +#define COFF_WITH_pep +#define PCRELOFFSET TRUE +#define TARGET_UNDERSCORE '_' +#define COFF_LONG_SECTION_NAMES +#define PEI_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_APPLICATION +#define PEI_FORCE_MINIMUM_ALIGNMENT + +#include "coff-x86_64.c" diff --git a/bfd/targets.c b/bfd/targets.c index ae4d4bf4516..68cf553aa47 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -557,6 +557,7 @@ extern const bfd_target armpei_little_vec; extern const bfd_target b_out_vec_big_host; extern const bfd_target b_out_vec_little_host; extern const bfd_target bfd_efi_app_ia32_vec; +extern const bfd_target bfd_efi_app_x86_64_vec; extern const bfd_target bfd_efi_app_ia64_vec; extern const bfd_target bfd_elf32_avr_vec; extern const bfd_target bfd_elf32_bfin_vec; @@ -873,6 +874,7 @@ static const bfd_target * const _bfd_target_vector[] = &b_out_vec_big_host, &b_out_vec_little_host, &bfd_efi_app_ia32_vec, + &bfd_efi_app_x86_64_vec, #ifdef BFD64 &bfd_efi_app_ia64_vec, #endif -- 2.30.2