aboutsummaryrefslogtreecommitdiff
path: root/bfd/libpei.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-02-13 19:23:08 +0000
committerDJ Delorie <dj@redhat.com>2001-02-13 19:23:08 +0000
commitcbff5e0d665fbb1c9fd6806f97a791eaf00aee8d (patch)
tree6cac0f3ad51e84af149aac012ca56e16af614efc /bfd/libpei.h
parentfddf5b5bc299356bddfab5ba19cf6e02f5f72c14 (diff)
downloadgdb-cbff5e0d665fbb1c9fd6806f97a791eaf00aee8d.zip
gdb-cbff5e0d665fbb1c9fd6806f97a791eaf00aee8d.tar.gz
gdb-cbff5e0d665fbb1c9fd6806f97a791eaf00aee8d.tar.bz2
* peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
as _bfd_XXi_only_swap_filehdr_out. (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set pe->force_minimum_alignment to TRUE. (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to PEI_TARGET_SUBSYSTEM. (pe_print_private_bfd_data): Call _bfd_XX_print_private_bfd_data_common() instead of _bfd_pe_print_private_bfd_data_common(). (pe_bfd_copy_private_bfd_data): Call _bfd_XX_bfd_copy_private_bfd_data_common() instead of _bfd_pe_bfd_copy_private_bfd_data_common(). (coff_bfd_copy_private_section_data): Define as _bfd_XX_bfd_copy_private_section_data instead of _bfd_pe_bfd_copy_private_section_data. (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead of a _bfd_pe_get_symbol_info. * peigen.c: Delete. * peXXigen.c: Renamed from peigen.c. (COFF_WITH_XX): Define this macro (will get expanded into COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being compiled as peigen.c or pepigen.c. [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to define the canonical PEP structures and definitions. (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in effect, enforce minimum file and section alignments. If extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN, so, by default, this is a no-op). * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep. (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to _bfd_pefoo if it's not defined. Use these macros to define coff swap macros. * libcoff.h (pe_tdata): Add members target_subsystem and force_minimum_alignment. * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to COFF_WITH_pep. (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM. * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of peigen.lo. * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep. (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and PEPAOUTHDR. * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo. (BFD64_BACKENDS_CFILES): Mention pepigen.c (peigen.c): Add rule to generate from peXXigen.c. (pepigen.c): Ditto. (pepigen.lo): List dependencies for pepigen.lo. * unwind-ia64.c (unw_decode_x1): Declare code arg with ATTRIBUTE_UNUSED. (unw_decode_x2): Ditto. (unw_decode_x3): Ditto. (unw_decode_x4): Ditto. * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ. Rename from PEPAOUTHDR.
Diffstat (limited to 'bfd/libpei.h')
-rw-r--r--bfd/libpei.h96
1 files changed, 66 insertions, 30 deletions
diff --git a/bfd/libpei.h b/bfd/libpei.h
index db47e37..e112441 100644
--- a/bfd/libpei.h
+++ b/bfd/libpei.h
@@ -1,5 +1,5 @@
/* Support for the generic parts of PE/PEI; common header information.
- Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -192,7 +192,7 @@ PE/PEI rearrangement (and code added): Donn Terry
#define PUT_SCNHDR_LNNOPTR bfd_h_put_32
#endif
-#ifdef COFF_WITH_PEP64
+#ifdef COFF_WITH_pep
#define GET_OPTHDR_IMAGE_BASE bfd_h_get_64
#define PUT_OPTHDR_IMAGE_BASE bfd_h_put_64
@@ -206,7 +206,25 @@ PE/PEI rearrangement (and code added): Donn Terry
#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT bfd_h_put_64
#define GET_PDATA_ENTRY bfd_get_64
-#else /* !COFF_WITH_PEP64 */
+#define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pep_bfd_copy_private_bfd_data_common
+#define _bfd_XX_bfd_copy_private_section_data _bfd_pep_bfd_copy_private_section_data
+#define _bfd_XX_get_symbol_info _bfd_pep_get_symbol_info
+#define _bfd_XX_only_swap_filehdr_out _bfd_pep_only_swap_filehdr_out
+#define _bfd_XX_print_private_bfd_data_common _bfd_pep_print_private_bfd_data_common
+#define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript
+#define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript
+#define _bfd_XXi_only_swap_filehdr_out _bfd_pepi_only_swap_filehdr_out
+#define _bfd_XXi_swap_aouthdr_in _bfd_pepi_swap_aouthdr_in
+#define _bfd_XXi_swap_aouthdr_out _bfd_pepi_swap_aouthdr_out
+#define _bfd_XXi_swap_aux_in _bfd_pepi_swap_aux_in
+#define _bfd_XXi_swap_aux_out _bfd_pepi_swap_aux_out
+#define _bfd_XXi_swap_lineno_in _bfd_pepi_swap_lineno_in
+#define _bfd_XXi_swap_lineno_out _bfd_pepi_swap_lineno_out
+#define _bfd_XXi_swap_scnhdr_out _bfd_pepi_swap_scnhdr_out
+#define _bfd_XXi_swap_sym_in _bfd_pepi_swap_sym_in
+#define _bfd_XXi_swap_sym_out _bfd_pepi_swap_sym_out
+
+#else /* !COFF_WITH_pep */
#define GET_OPTHDR_IMAGE_BASE bfd_h_get_32
#define PUT_OPTHDR_IMAGE_BASE bfd_h_put_32
@@ -220,7 +238,25 @@ PE/PEI rearrangement (and code added): Donn Terry
#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT bfd_h_put_32
#define GET_PDATA_ENTRY bfd_get_32
-#endif /* !COFF_WITH_PEP64 */
+#define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pe_bfd_copy_private_bfd_data_common
+#define _bfd_XX_bfd_copy_private_section_data _bfd_pe_bfd_copy_private_section_data
+#define _bfd_XX_get_symbol_info _bfd_pe_get_symbol_info
+#define _bfd_XX_only_swap_filehdr_out _bfd_pe_only_swap_filehdr_out
+#define _bfd_XX_print_private_bfd_data_common _bfd_pe_print_private_bfd_data_common
+#define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript
+#define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript
+#define _bfd_XXi_only_swap_filehdr_out _bfd_pei_only_swap_filehdr_out
+#define _bfd_XXi_swap_aouthdr_in _bfd_pei_swap_aouthdr_in
+#define _bfd_XXi_swap_aouthdr_out _bfd_pei_swap_aouthdr_out
+#define _bfd_XXi_swap_aux_in _bfd_pei_swap_aux_in
+#define _bfd_XXi_swap_aux_out _bfd_pei_swap_aux_out
+#define _bfd_XXi_swap_lineno_in _bfd_pei_swap_lineno_in
+#define _bfd_XXi_swap_lineno_out _bfd_pei_swap_lineno_out
+#define _bfd_XXi_swap_scnhdr_out _bfd_pei_swap_scnhdr_out
+#define _bfd_XXi_swap_sym_in _bfd_pei_swap_sym_in
+#define _bfd_XXi_swap_sym_out _bfd_pei_swap_sym_out
+
+#endif /* !COFF_WITH_pep */
/* These functions are architecture dependent, and are in peicode.h:
coff_swap_reloc_in
@@ -234,51 +270,51 @@ PE/PEI rearrangement (and code added): Donn Terry
implementations architecture types, and actually appear in
peigen.c. */
-void _bfd_pei_swap_sym_in PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_sym_in _bfd_pei_swap_sym_in
+void _bfd_XXi_swap_sym_in PARAMS ((bfd*, PTR, PTR));
+#define coff_swap_sym_in _bfd_XXi_swap_sym_in
-unsigned int _bfd_pei_swap_sym_out PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_sym_out _bfd_pei_swap_sym_out
+unsigned int _bfd_XXi_swap_sym_out PARAMS ((bfd*, PTR, PTR));
+#define coff_swap_sym_out _bfd_XXi_swap_sym_out
-void _bfd_pei_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-#define coff_swap_aux_in _bfd_pei_swap_aux_in
+void _bfd_XXi_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+#define coff_swap_aux_in _bfd_XXi_swap_aux_in
-unsigned int _bfd_pei_swap_aux_out \
+unsigned int _bfd_XXi_swap_aux_out \
PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-#define coff_swap_aux_out _bfd_pei_swap_aux_out
+#define coff_swap_aux_out _bfd_XXi_swap_aux_out
-void _bfd_pei_swap_lineno_in PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_lineno_in _bfd_pei_swap_lineno_in
+void _bfd_XXi_swap_lineno_in PARAMS ((bfd*, PTR, PTR));
+#define coff_swap_lineno_in _bfd_XXi_swap_lineno_in
-unsigned int _bfd_pei_swap_lineno_out PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_lineno_out _bfd_pei_swap_lineno_out
+unsigned int _bfd_XXi_swap_lineno_out PARAMS ((bfd*, PTR, PTR));
+#define coff_swap_lineno_out _bfd_XXi_swap_lineno_out
-void _bfd_pei_swap_aouthdr_in PARAMS ((bfd*, PTR, PTR));
-#define coff_swap_aouthdr_in _bfd_pei_swap_aouthdr_in
+void _bfd_XXi_swap_aouthdr_in PARAMS ((bfd*, PTR, PTR));
+#define coff_swap_aouthdr_in _bfd_XXi_swap_aouthdr_in
-unsigned int _bfd_pei_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
-#define coff_swap_aouthdr_out _bfd_pei_swap_aouthdr_out
+unsigned int _bfd_XXi_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR));
+#define coff_swap_aouthdr_out _bfd_XXi_swap_aouthdr_out
-unsigned int _bfd_pei_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR));
-#define coff_swap_scnhdr_out _bfd_pei_swap_scnhdr_out
+unsigned int _bfd_XXi_swap_scnhdr_out PARAMS ((bfd *, PTR, PTR));
+#define coff_swap_scnhdr_out _bfd_XXi_swap_scnhdr_out
-boolean _bfd_pe_print_private_bfd_data_common PARAMS ((bfd *, PTR));
+boolean _bfd_XX_print_private_bfd_data_common PARAMS ((bfd *, PTR));
-boolean _bfd_pe_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *));
+boolean _bfd_XX_bfd_copy_private_bfd_data_common PARAMS ((bfd *, bfd *));
-void _bfd_pe_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
+void _bfd_XX_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-boolean _bfd_pei_final_link_postscript
+boolean _bfd_XXi_final_link_postscript
PARAMS ((bfd *, struct coff_final_link_info *));
#ifndef coff_final_link_postscript
-#define coff_final_link_postscript _bfd_pei_final_link_postscript
+#define coff_final_link_postscript _bfd_XXi_final_link_postscript
#endif
/* The following are needed only for ONE of pe or pei, but don't
otherwise vary; peicode.h fixes up ifdefs but we provide the
prototype. */
-unsigned int _bfd_pe_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
-unsigned int _bfd_pei_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
-boolean _bfd_pe_bfd_copy_private_section_data
+unsigned int _bfd_XX_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
+unsigned int _bfd_XXi_only_swap_filehdr_out PARAMS ((bfd*, PTR, PTR));
+boolean _bfd_XX_bfd_copy_private_section_data
PARAMS ((bfd *, asection *, bfd *, asection *));