summaryrefslogtreecommitdiff
path: root/bfd/libpei.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-02-14 15:20:26 +0000
committerNick Clifton <nickc@redhat.com>2008-02-14 15:20:26 +0000
commitc13b36aba186dcd4ffb5c0fb9936ac31431254d8 (patch)
treedf0bfed90902ff598ee2dd3b0e49065891845da5 /bfd/libpei.h
parentba074874859ffa93a811b33e16492506a867e7c8 (diff)
downloadbinutils-redhat-c13b36aba186dcd4ffb5c0fb9936ac31431254d8.tar.gz
* 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.
Diffstat (limited to 'bfd/libpei.h')
-rw-r--r--bfd/libpei.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/bfd/libpei.h b/bfd/libpei.h
index 5e272d01f6..228f878e13 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