aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog20
-rw-r--r--bfd/Makefile.am42
-rw-r--r--bfd/Makefile.in57
-rw-r--r--bfd/config.bfd14
-rwxr-xr-xbfd/configure18
-rw-r--r--bfd/configure.in6
-rw-r--r--bfd/doc/Makefile.in7
-rw-r--r--bfd/efi-bsdrv-ia32.c36
-rw-r--r--bfd/efi-bsdrv-ia64.c37
-rw-r--r--bfd/efi-bsdrv-x86_64.c37
-rw-r--r--bfd/efi-rtdrv-ia32.c36
-rw-r--r--bfd/efi-rtdrv-ia64.c37
-rw-r--r--bfd/efi-rtdrv-x86_64.c37
-rw-r--r--bfd/libpei.h34
-rw-r--r--bfd/peicode.h48
-rw-r--r--bfd/targets.c14
16 files changed, 441 insertions, 39 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 29af7d3..2b415ef 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,23 @@
+2008-02-14 Peter Jones <pjones@redhat.com>
+
+ * efi-rtdrv-ia32.c: New file.
+ * efi-bsdrv-ia32.c: New file.
+ * efi-rtdrv-ia64.c: New file.
+ * efi-bsdrv-ia64.c: New file.
+ * efi-rtdrv-x86_64.c: New file.
+ * efi-bsdrv-x86_64.c: New file.
+ * peicode.h (pe_bfd_object_p): Add support for boot service and
+ runtime service drivers.
+ * libpei.h: Add macros for EFI formats, and rename the efi application
+ format macros to disambiguate.
+ * targets.c: Add bfd_target _vec externs.
+ (_bfd_tar): Add EFI _vec entries.
+ * config.bfd: Add EFI vectors into the selection routines.
+ * configure.in: add EFI _vec entries.
+ * configure: Regenerate.
+ * Makefile.am: Add EFI files.
+ * Makefile.in: Regenerate.
+
2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
* dwarf1.c (struct dwarf1_debug): Add syms member.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index d12a3f0..8e0a79c 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -238,6 +238,8 @@ BFD32_BACKENDS = \
ecoff.lo \
ecofflink.lo \
efi-app-ia32.lo \
+ efi-bsdrv-ia32.lo \
+ efi-rtdrv-ia32.lo \
elf.lo \
elf32-am33lin.lo \
elf32-arc.lo \
@@ -417,6 +419,8 @@ BFD32_BACKENDS_CFILES = \
ecoff.c \
ecofflink.c \
efi-app-ia32.c \
+ efi-bsdrv-ia32.c \
+ efi-rtdrv-ia32.c \
elf.c \
elf32-am33lin.c \
elf32-arc.c \
@@ -561,7 +565,11 @@ BFD64_BACKENDS = \
coff64-rs6000.lo \
demo64.lo \
efi-app-ia64.lo \
+ efi-bsdrv-ia64.lo \
+ efi-rtdrv-ia64.lo \
efi-app-x86_64.lo \
+ efi-bsdrv-x86_64.lo \
+ efi-rtdrv-x86_64.lo \
elf64-x86-64.lo \
elf64-alpha.lo \
elf64-hppa.lo \
@@ -592,7 +600,11 @@ BFD64_BACKENDS_CFILES = \
coff64-rs6000.c \
demo64.c \
efi-app-ia64.c \
+ efi-bsdrv-ia64.c \
+ efi-rtdrv-ia64.c \
efi-app-x86_64.c \
+ efi-bsdrv-x86_64.c \
+ efi-rtdrv-x86_64.c \
elf64-x86-64.c \
elf64-alpha.c \
elf64-hppa.c \
@@ -1296,6 +1308,16 @@ efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
+efi-bsdrv-ia32.lo: efi-bsdrv-ia32.c $(INCDIR)/filenames.h \
+ coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+efi-rtdrv-ia32.lo: efi-rtdrv-ia32.c $(INCDIR)/filenames.h \
+ coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h \
@@ -1832,11 +1854,31 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
+efi-bsdrv-ia64.lo: efi-bsdrv-ia64.c $(INCDIR)/filenames.h \
+ coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+efi-rtdrv-ia64.lo: efi-rtdrv-ia64.c $(INCDIR)/filenames.h \
+ coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
efi-app-x86_64.lo: efi-app-x86_64.c $(INCDIR)/filenames.h \
coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
coffcode.h peicode.h libpei.h
+efi-bsdrv-x86_64.lo: efi-bsdrv-x86_64.c $(INCDIR)/filenames.h \
+ coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
+ coffcode.h peicode.h libpei.h
+efi-rtdrv-x86_64.lo: efi-rtdrv-x86_64.c $(INCDIR)/filenames.h \
+ coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
+ coffcode.h peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h bfd_stdint.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 1b3afd2..be000ae 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -202,11 +202,8 @@ WARN_CFLAGS = @WARN_CFLAGS@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
XGETTEXT = @XGETTEXT@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
all_backends = @all_backends@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
@@ -232,6 +229,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
@@ -245,13 +243,16 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -488,6 +489,8 @@ BFD32_BACKENDS = \
ecoff.lo \
ecofflink.lo \
efi-app-ia32.lo \
+ efi-bsdrv-ia32.lo \
+ efi-rtdrv-ia32.lo \
elf.lo \
elf32-am33lin.lo \
elf32-arc.lo \
@@ -667,6 +670,8 @@ BFD32_BACKENDS_CFILES = \
ecoff.c \
ecofflink.c \
efi-app-ia32.c \
+ efi-bsdrv-ia32.c \
+ efi-rtdrv-ia32.c \
elf.c \
elf32-am33lin.c \
elf32-arc.c \
@@ -812,7 +817,11 @@ BFD64_BACKENDS = \
coff64-rs6000.lo \
demo64.lo \
efi-app-ia64.lo \
+ efi-bsdrv-ia64.lo \
+ efi-rtdrv-ia64.lo \
efi-app-x86_64.lo \
+ efi-bsdrv-x86_64.lo \
+ efi-rtdrv-x86_64.lo \
elf64-x86-64.lo \
elf64-alpha.lo \
elf64-hppa.lo \
@@ -843,7 +852,11 @@ BFD64_BACKENDS_CFILES = \
coff64-rs6000.c \
demo64.c \
efi-app-ia64.c \
+ efi-bsdrv-ia64.c \
+ efi-rtdrv-ia64.c \
efi-app-x86_64.c \
+ efi-bsdrv-x86_64.c \
+ efi-rtdrv-x86_64.c \
elf64-x86-64.c \
elf64-alpha.c \
elf64-hppa.c \
@@ -979,15 +992,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
- cd $(srcdir) && $(AUTOMAKE) --cygnus \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --cygnus Makefile
+ $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -1876,6 +1889,16 @@ efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
+efi-bsdrv-ia32.lo: efi-bsdrv-ia32.c $(INCDIR)/filenames.h \
+ coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+efi-rtdrv-ia32.lo: efi-rtdrv-ia32.c $(INCDIR)/filenames.h \
+ coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h \
@@ -2412,11 +2435,31 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
+efi-bsdrv-ia64.lo: efi-bsdrv-ia64.c $(INCDIR)/filenames.h \
+ coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+efi-rtdrv-ia64.lo: efi-rtdrv-ia64.c $(INCDIR)/filenames.h \
+ coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
efi-app-x86_64.lo: efi-app-x86_64.c $(INCDIR)/filenames.h \
coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
coffcode.h peicode.h libpei.h
+efi-bsdrv-x86_64.lo: efi-bsdrv-x86_64.c $(INCDIR)/filenames.h \
+ coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
+ coffcode.h peicode.h libpei.h
+efi-rtdrv-x86_64.lo: efi-rtdrv-x86_64.c $(INCDIR)/filenames.h \
+ coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
+ coffcode.h peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h bfd_stdint.h \
diff --git a/bfd/config.bfd b/bfd/config.bfd
index e0df15f..03ef1c3 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -178,7 +178,7 @@ case "${targ}" in
;;
ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_ia64_little_vec
- targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
+ targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec bfd_efi_bsdrv_ia64_vec bfd_efi_rtdrv_ia64_vec"
want64=true
;;
ia64*-*-hpux*)
@@ -543,8 +543,8 @@ case "${targ}" in
;;
i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*)
targ_defvec=bfd_elf32_i386_freebsd_vec
- targ_selvecs="bfd_elf32_i386_vec bfd_efi_app_ia32_vec i386coff_vec"
- targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec bfd_efi_app_x86_64_vec"
+ targ_selvecs="bfd_elf32_i386_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec i386coff_vec"
+ targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_x86_64_vec"
# FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
case "${targ}" in
i[3-7]86-*-freebsd3* | i[3-7]86-*-freebsd4 | i[3-7]86-*-freebsd4.0*)
@@ -581,7 +581,7 @@ case "${targ}" in
;;
i[3-7]86-*-linux-*)
targ_defvec=bfd_elf32_i386_vec
- targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
+ targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec"
targ64_selvecs=bfd_elf64_x86_64_vec
;;
#ifdef BFD64
@@ -592,17 +592,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_efi_app_x86_64_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_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_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 bfd_efi_app_x86_64_vec"
+ targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_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 bfd_efi_app_x86_64_vec"
+ targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_x86_64_vec"
want64=true
;;
x86_64-*-mingw*)
diff --git a/bfd/configure b/bfd/configure
index bd532e3..882b320 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -4939,7 +4939,7 @@ lt_cv_deplibs_check_method='unknown'
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix4* | aix5*)
+aix[4-9]*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -7457,7 +7457,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
# See if GNU ld supports shared libraries.
case $host_os in
- aix3* | aix4* | aix5*)
+ aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
@@ -7691,7 +7691,7 @@ _LT_EOF
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
@@ -7711,7 +7711,7 @@ _LT_EOF
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
@@ -8771,7 +8771,7 @@ aix3*)
soname_spec='${libname}${release}${shared_ext}$major'
;;
-aix4* | aix5*)
+aix[4-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -10389,7 +10389,7 @@ echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
fi
;;
- aix4* | aix5*)
+ aix[4-9]*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
@@ -19018,8 +19018,14 @@ 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_bsdrv_ia32_vec) tb="$tb efi-bsdrv-ia32.lo peigen.lo cofflink.lo" ;;
+ bfd_efi_rtdrv_ia32_vec) tb="$tb efi-rtdrv-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_bsdrv_x86_64_vec) tb="$tb efi-bsdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;;
+ bfd_efi_rtdrv_x86_64_vec) tb="$tb efi-rtdrv-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_efi_bsdrv_ia64_vec) tb="$tb efi-bsdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
+ bfd_efi_rtdrv_ia64_vec) tb="$tb efi-rtdrv-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" ;;
bfd_elf32_bfin_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
diff --git a/bfd/configure.in b/bfd/configure.in
index ac83f11..99ea584 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -627,8 +627,14 @@ 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_bsdrv_ia32_vec) tb="$tb efi-bsdrv-ia32.lo peigen.lo cofflink.lo" ;;
+ bfd_efi_rtdrv_ia32_vec) tb="$tb efi-rtdrv-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_bsdrv_x86_64_vec) tb="$tb efi-bsdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;;
+ bfd_efi_rtdrv_x86_64_vec) tb="$tb efi-rtdrv-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_efi_bsdrv_ia64_vec) tb="$tb efi-bsdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
+ bfd_efi_rtdrv_ia64_vec) tb="$tb efi-rtdrv-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" ;;
bfd_elf32_bfin_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;;
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 4356ebb..e27d0f3 100644
--- a/bfd/doc/Makefile.in
+++ b/bfd/doc/Makefile.in
@@ -175,11 +175,8 @@ WARN_CFLAGS = @WARN_CFLAGS@
WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
XGETTEXT = @XGETTEXT@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
all_backends = @all_backends@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
@@ -205,6 +202,7 @@ build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
@@ -218,13 +216,16 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
diff --git a/bfd/efi-bsdrv-ia32.c b/bfd/efi-bsdrv-ia32.c
new file mode 100644
index 0000000..2825b11
--- /dev/null
+++ b/bfd/efi-bsdrv-ia32.c
@@ -0,0 +1,36 @@
+/* BFD back-end for Intel IA-32 EFI Boot Service driver files.
+ Copyright 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Peter Jones <pjones@redhat.com>
+ Based on efi-app-ia32.c by David Mosberger <davidm@hpl.hp.com>
+
+ 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 3 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 "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM bfd_efi_bsdrv_ia32_vec
+#define TARGET_NAME "efi-bsdrv-ia32"
+#define COFF_IMAGE_WITH_PE
+#define COFF_WITH_PE
+#define PCRELOFFSET TRUE
+#define TARGET_UNDERSCORE '_'
+#define COFF_LONG_SECTION_NAMES
+#define PEI_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER
+#define PEI_FORCE_MINIMUM_ALIGNMENT
+
+#include "coff-i386.c"
diff --git a/bfd/efi-bsdrv-ia64.c b/bfd/efi-bsdrv-ia64.c
new file mode 100644
index 0000000..ed4f6ca
--- /dev/null
+++ b/bfd/efi-bsdrv-ia64.c
@@ -0,0 +1,37 @@
+/* BFD back-end for HP/Intel IA-64 EFI Boot Service driver files.
+ Copyright 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Peter Jones <pjones@redhat.com>
+ Based on efi-app-ia64.c by David Mosberger <davidm@hpl.hp.com>
+
+ 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 3 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 "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM bfd_efi_bsdrv_ia64_vec
+#define TARGET_NAME "efi-bsdrv-ia64"
+#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_BOOT_SERVICE_DRIVER
+#define PEI_FORCE_MINIMUM_ALIGNMENT
+
+#include "coff-ia64.c"
diff --git a/bfd/efi-bsdrv-x86_64.c b/bfd/efi-bsdrv-x86_64.c
new file mode 100644
index 0000000..def32f1
--- /dev/null
+++ b/bfd/efi-bsdrv-x86_64.c
@@ -0,0 +1,37 @@
+/* BFD back-end for Intel64 UEFI Boot Service driver files.
+ Copyright 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Peter Jones <pjones@redhat.com>
+ Based on efi-app-x86_64.c by David Mosberger <davidm@hpl.hp.com>
+
+ 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 3 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 "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM bfd_efi_bsdrv_x86_64_vec
+#define TARGET_NAME "efi-bsdrv-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_BOOT_SERVICE_DRIVER
+#define PEI_FORCE_MINIMUM_ALIGNMENT
+
+#include "coff-x86_64.c"
diff --git a/bfd/efi-rtdrv-ia32.c b/bfd/efi-rtdrv-ia32.c
new file mode 100644
index 0000000..aa47181
--- /dev/null
+++ b/bfd/efi-rtdrv-ia32.c
@@ -0,0 +1,36 @@
+/* BFD back-end for Intel IA-32 EFI runtime driver files.
+ Copyright 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Peter Jones <pjones@redhat.com>
+ Based on efi-app-ia32.c by David Mosberger <davidm@hpl.hp.com>
+
+ 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 3 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 "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM bfd_efi_rtdrv_ia32_vec
+#define TARGET_NAME "efi-rtdrv-ia32"
+#define COFF_IMAGE_WITH_PE
+#define COFF_WITH_PE
+#define PCRELOFFSET TRUE
+#define TARGET_UNDERSCORE '_'
+#define COFF_LONG_SECTION_NAMES
+#define PEI_TARGET_SUBSYSTEM IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER
+#define PEI_FORCE_MINIMUM_ALIGNMENT
+
+#include "coff-i386.c"
diff --git a/bfd/efi-rtdrv-ia64.c b/bfd/efi-rtdrv-ia64.c
new file mode 100644
index 0000000..65bc5ee
--- /dev/null
+++ b/bfd/efi-rtdrv-ia64.c
@@ -0,0 +1,37 @@
+/* BFD back-end for HP/Intel IA-64 EFI runtime driver files.
+ Copyright 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Peter Jones <pjones@redhat.com>
+ Based on efi-app-ia64.c by David Mosberger <davidm@hpl.hp.com>
+
+ 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 3 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 "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM bfd_efi_rtdrv_ia64_vec
+#define TARGET_NAME "efi-rtdrv-ia64"
+#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_RUNTIME_DRIVER
+#define PEI_FORCE_MINIMUM_ALIGNMENT
+
+#include "coff-ia64.c"
diff --git a/bfd/efi-rtdrv-x86_64.c b/bfd/efi-rtdrv-x86_64.c
new file mode 100644
index 0000000..8f7b5fc
--- /dev/null
+++ b/bfd/efi-rtdrv-x86_64.c
@@ -0,0 +1,37 @@
+/* BFD back-end for Intel64 UEFI runtime driver files.
+ Copyright 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Peter Jones <pjones@redhat.com>
+ Based on efi-app-x86_64.c by David Mosberger <davidm@hpl.hp.com>
+
+ 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 3 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 "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM bfd_efi_rtdrv_x86_64_vec
+#define TARGET_NAME "efi-rtdrv-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_RUNTIME_DRIVER
+#define PEI_FORCE_MINIMUM_ALIGNMENT
+
+#include "coff-x86_64.c"
diff --git a/bfd/libpei.h b/bfd/libpei.h
index 5e272d0..228f878 100644
--- a/bfd/libpei.h
+++ b/bfd/libpei.h
@@ -1,6 +1,6 @@
/* Support for the generic parts of PE/PEI; common header information.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ 2006, 2007, 2008 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -302,26 +302,44 @@
#endif /* !COFF_WITH_pep */
/* Returns true if the target is a PE executable target. */
-#define bfd_target_pei_p(xvec) \
+#define bfd_target_pei_p(xvec) \
(CONST_STRNEQ ((xvec)->name, "pei-"))
/* Return the arch string of a PE executable target. */
#define bfd_target_pei_arch(xvec) \
((xvec)->name + sizeof ("pei-") - 1)
-/* Returns true if the target is an EFI target. */
-#define bfd_target_efi_p(xvec) \
+/* Returns true if the target is an EFI application target. */
+#define bfd_target_efi_app_p(xvec) \
(CONST_STRNEQ ((xvec)->name, "efi-app-"))
-/* Return the arch string of an EFI target. */
-#define bfd_target_efi_arch(xvec) \
+/* Return the arch string of an EFI application target. */
+#define bfd_target_efi_app_arch(xvec) \
((xvec)->name + sizeof ("efi-app-") - 1)
+/* Returns true if the target is an EFI Boot Service driver target. */
+#define bfd_target_efi_bsdrv_p(xvec) \
+ (CONST_STRNEQ ((xvec)->name, "efi-bsdrv-"))
+
+/* Return the arch string of an EFI Boot Service driver target. */
+#define bfd_target_efi_bsdrv_arch(xvec) \
+ ((xvec)->name + sizeof ("efi-bsdrv-") - 1)
+
+/* Returns true if the target is an EFI runtime driver target. */
+#define bfd_target_efi_rtdrv_p(xvec) \
+ (CONST_STRNEQ ((xvec)->name, "efi-rtdrv-"))
+
+/* Return the arch string of an EFI runtime driver target. */
+#define bfd_target_efi_rtdrv_arch(xvec) \
+ ((xvec)->name + sizeof ("efi-rtdrv-") - 1)
+
/* Macro: Returns true if the bfd is a PE executable as opposed to a
PE object file. */
#define bfd_pe_executable_p(abfd) \
- (bfd_target_pei_p ((abfd)->xvec) \
- || bfd_target_efi_p ((abfd)->xvec))
+ ( bfd_target_pei_p ((abfd)->xvec) \
+ || bfd_target_efi_app_p ((abfd)->xvec) \
+ || bfd_target_efi_bsdrv_p ((abfd)->xvec) \
+ || bfd_target_efi_rtdrv_p ((abfd)->xvec))
/* These functions are architecture dependent, and are in peicode.h:
coff_swap_reloc_in
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 15cad54..357d1c8 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -1,6 +1,6 @@
/* Support for the generic parts of PE/PEI, for BFD.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -237,7 +237,7 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
if (scnhdr_int->s_paddr > 0
&& (((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0
&& (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 0))
- || (bfd_pe_executable_p (abfd) && scnhdr_int->s_size > scnhdr_int->s_paddr)))
+ || (bfd_pe_executable_p (abfd) && (scnhdr_int->s_size > scnhdr_int->s_paddr))))
/* This code used to set scnhdr_int->s_paddr to 0. However,
coff_set_alignment_hook stores s_paddr in virt_size, which
only works if it correctly holds the virtual size of the
@@ -1337,13 +1337,19 @@ pe_bfd_object_p (bfd * abfd)
{
pe_data_type *pe = pe_data (abfd);
struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr;
- bfd_boolean efi = i->Subsystem == IMAGE_SUBSYSTEM_EFI_APPLICATION;
+ bfd_boolean efi = i->Subsystem == IMAGE_SUBSYSTEM_EFI_APPLICATION
+ || i->Subsystem == IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER
+ || i->Subsystem == IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER;
enum arch_type arch;
const bfd_target * const *target_ptr;
/* Get the machine. */
- if (bfd_target_efi_p (abfd->xvec))
- arch = pe_arch (bfd_target_efi_arch (abfd->xvec));
+ if (bfd_target_efi_app_p (abfd->xvec))
+ arch = pe_arch (bfd_target_efi_app_arch (abfd->xvec));
+ else if (bfd_target_efi_bsdrv_p (abfd->xvec))
+ arch = pe_arch (bfd_target_efi_bsdrv_arch (abfd->xvec));
+ else if (bfd_target_efi_rtdrv_p (abfd->xvec))
+ arch = pe_arch (bfd_target_efi_rtdrv_arch (abfd->xvec));
else
arch = pe_arch (bfd_target_pei_arch (abfd->xvec));
@@ -1361,10 +1367,38 @@ pe_bfd_object_p (bfd * abfd)
|| (*target_ptr)->flavour != bfd_target_coff_flavour)
continue;
- if (bfd_target_efi_p (*target_ptr))
+ if (bfd_target_efi_app_p (*target_ptr))
{
/* Skip incompatible arch. */
- if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
+ if (pe_arch (bfd_target_efi_app_arch (*target_ptr)) != arch)
+ continue;
+
+ if (efi)
+ {
+ /* TARGET_PTR is an EFI backend. Don't match
+ TARGET with a EFI file. */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ }
+ else if (bfd_target_efi_bsdrv_p (*target_ptr))
+ {
+ /* Skip incompatible arch. */
+ if (pe_arch (bfd_target_efi_bsdrv_arch (*target_ptr)) != arch)
+ continue;
+
+ if (efi)
+ {
+ /* TARGET_PTR is an EFI backend. Don't match
+ TARGET with a EFI file. */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ }
+ else if (bfd_target_efi_rtdrv_p (*target_ptr))
+ {
+ /* Skip incompatible arch. */
+ if (pe_arch (bfd_target_efi_rtdrv_arch (*target_ptr)) != arch)
continue;
if (efi)
diff --git a/bfd/targets.c b/bfd/targets.c
index d408a21..dc644c2 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -1,6 +1,6 @@
/* Generic target-file-type support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -561,8 +561,14 @@ 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_bsdrv_ia32_vec;
+extern const bfd_target bfd_efi_rtdrv_ia32_vec;
extern const bfd_target bfd_efi_app_x86_64_vec;
+extern const bfd_target bfd_efi_bsdrv_x86_64_vec;
+extern const bfd_target bfd_efi_rtdrv_x86_64_vec;
extern const bfd_target bfd_efi_app_ia64_vec;
+extern const bfd_target bfd_efi_bsdrv_ia64_vec;
+extern const bfd_target bfd_efi_rtdrv_ia64_vec;
extern const bfd_target bfd_elf32_avr_vec;
extern const bfd_target bfd_elf32_bfin_vec;
extern const bfd_target bfd_elf32_bfinfdpic_vec;
@@ -879,9 +885,15 @@ 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_bsdrv_ia32_vec,
+ &bfd_efi_rtdrv_ia32_vec,
#ifdef BFD64
&bfd_efi_app_x86_64_vec,
+ &bfd_efi_bsdrv_x86_64_vec,
+ &bfd_efi_rtdrv_x86_64_vec,
&bfd_efi_app_ia64_vec,
+ &bfd_efi_bsdrv_ia64_vec,
+ &bfd_efi_rtdrv_ia64_vec,
#endif
&bfd_elf32_avr_vec,
&bfd_elf32_bfin_vec,