Fix the BFD library to handle Windows pathnames with more than 260 characters and...
[deliverable/binutils-gdb.git] / bfd / libpei.h
index b9a2683fa6eebf520a917aa19398f5fe7e8d037d..87d404d378d09bcfc82061b675286be7b67d6bc2 100644 (file)
@@ -1,6 +1,5 @@
 /* Support for the generic parts of PE/PEI; common header information.
 /* Support for the generic parts of PE/PEI; common header information.
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
-   2006, 2007, 2008   Free Software Foundation, Inc.
+   Copyright (C) 1995-2020 Free Software Foundation, Inc.
    Written by Cygnus Solutions.
 
    This file is part of BFD, the Binary File Descriptor library.
    Written by Cygnus Solutions.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -14,7 +13,7 @@
    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.
    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,
    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,
 
 #ifdef COFF_WITH_pex64
 
 
 #ifdef COFF_WITH_pex64
 
-#define GET_OPTHDR_IMAGE_BASE            H_GET_64
-#define PUT_OPTHDR_IMAGE_BASE            H_PUT_64
+#define GET_OPTHDR_IMAGE_BASE           H_GET_64
+#define PUT_OPTHDR_IMAGE_BASE           H_PUT_64
 #define GET_OPTHDR_SIZE_OF_STACK_RESERVE H_GET_64
 #define PUT_OPTHDR_SIZE_OF_STACK_RESERVE H_PUT_64
 #define GET_OPTHDR_SIZE_OF_STACK_RESERVE H_GET_64
 #define PUT_OPTHDR_SIZE_OF_STACK_RESERVE H_PUT_64
-#define GET_OPTHDR_SIZE_OF_STACK_COMMIT  H_GET_64
-#define PUT_OPTHDR_SIZE_OF_STACK_COMMIT  H_PUT_64
-#define GET_OPTHDR_SIZE_OF_HEAP_RESERVE  H_GET_64
-#define PUT_OPTHDR_SIZE_OF_HEAP_RESERVE  H_PUT_64
-#define GET_OPTHDR_SIZE_OF_HEAP_COMMIT   H_GET_64
-#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT   H_PUT_64
-#define GET_PDATA_ENTRY                  bfd_get_32
+#define GET_OPTHDR_SIZE_OF_STACK_COMMIT         H_GET_64
+#define PUT_OPTHDR_SIZE_OF_STACK_COMMIT         H_PUT_64
+#define GET_OPTHDR_SIZE_OF_HEAP_RESERVE         H_GET_64
+#define PUT_OPTHDR_SIZE_OF_HEAP_RESERVE         H_PUT_64
+#define GET_OPTHDR_SIZE_OF_HEAP_COMMIT  H_GET_64
+#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT  H_PUT_64
+#define GET_PDATA_ENTRY                         bfd_get_32
 
 #define _bfd_XX_bfd_copy_private_bfd_data_common       _bfd_pex64_bfd_copy_private_bfd_data_common
 #define _bfd_XX_bfd_copy_private_section_data          _bfd_pex64_bfd_copy_private_section_data
 
 #define _bfd_XX_bfd_copy_private_bfd_data_common       _bfd_pex64_bfd_copy_private_bfd_data_common
 #define _bfd_XX_bfd_copy_private_section_data          _bfd_pex64_bfd_copy_private_section_data
 #define _bfd_XXi_swap_scnhdr_out                       _bfd_pex64i_swap_scnhdr_out
 #define _bfd_XXi_swap_sym_in                           _bfd_pex64i_swap_sym_in
 #define _bfd_XXi_swap_sym_out                          _bfd_pex64i_swap_sym_out
 #define _bfd_XXi_swap_scnhdr_out                       _bfd_pex64i_swap_scnhdr_out
 #define _bfd_XXi_swap_sym_in                           _bfd_pex64i_swap_sym_in
 #define _bfd_XXi_swap_sym_out                          _bfd_pex64i_swap_sym_out
+#define _bfd_XXi_swap_debugdir_in                      _bfd_pex64i_swap_debugdir_in
+#define _bfd_XXi_swap_debugdir_out                     _bfd_pex64i_swap_debugdir_out
+#define _bfd_XXi_write_codeview_record                 _bfd_pex64i_write_codeview_record
+#define _bfd_XXi_slurp_codeview_record                 _bfd_pex64i_slurp_codeview_record
 
 #elif defined COFF_WITH_pep
 
 
 #elif defined COFF_WITH_pep
 
 #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
 #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
+#define _bfd_XXi_swap_debugdir_in                      _bfd_pepi_swap_debugdir_in
+#define _bfd_XXi_swap_debugdir_out                     _bfd_pepi_swap_debugdir_out
+#define _bfd_XXi_write_codeview_record                 _bfd_pepi_write_codeview_record
+#define _bfd_XXi_slurp_codeview_record                 _bfd_pepi_slurp_codeview_record
 
 #else /* !COFF_WITH_pep */
 
 
 #else /* !COFF_WITH_pep */
 
 #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
 #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
+#define _bfd_XXi_swap_debugdir_in                      _bfd_pei_swap_debugdir_in
+#define _bfd_XXi_swap_debugdir_out                     _bfd_pei_swap_debugdir_out
+#define _bfd_XXi_write_codeview_record                 _bfd_pei_write_codeview_record
+#define _bfd_XXi_slurp_codeview_record                 _bfd_pei_slurp_codeview_record
 
 #endif /* !COFF_WITH_pep */
 
 
 #endif /* !COFF_WITH_pep */
 
-/* Returns true if the target is a PE executable target.  */
-#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 application target.  */
-#define bfd_target_efi_app_p(xvec)                             \
-   (CONST_STRNEQ ((xvec)->name, "efi-app-"))
-
-/* 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_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
    int coff_swap_reloc_out
 /* These functions are architecture dependent, and are in peicode.h:
    coff_swap_reloc_in
    int coff_swap_reloc_out
 #define coff_final_link_postscript _bfd_XXi_final_link_postscript
 #endif
 
 #define coff_final_link_postscript _bfd_XXi_final_link_postscript
 #endif
 
-void        _bfd_XXi_swap_sym_in (bfd *, void *, void *);
+void       _bfd_XXi_swap_sym_in (bfd *, void *, void *);
 unsigned    _bfd_XXi_swap_sym_out (bfd *, void *, void *);
 unsigned    _bfd_XXi_swap_sym_out (bfd *, void *, void *);
-void        _bfd_XXi_swap_aux_in (bfd *, void *, int, int, int, int, void *);
+void       _bfd_XXi_swap_aux_in (bfd *, void *, int, int, int, int, void *);
 unsigned    _bfd_XXi_swap_aux_out (bfd *, void *, int, int, int, int, void *);
 unsigned    _bfd_XXi_swap_aux_out (bfd *, void *, int, int, int, int, void *);
-void        _bfd_XXi_swap_lineno_in (bfd *, void *, void *);
+void       _bfd_XXi_swap_lineno_in (bfd *, void *, void *);
 unsigned    _bfd_XXi_swap_lineno_out (bfd *, void *, void *);
 unsigned    _bfd_XXi_swap_lineno_out (bfd *, void *, void *);
-void        _bfd_XXi_swap_aouthdr_in (bfd *, void *, void *);
+void       _bfd_XXi_swap_aouthdr_in (bfd *, void *, void *);
 unsigned    _bfd_XXi_swap_aouthdr_out (bfd *, void *, void *);
 unsigned    _bfd_XXi_swap_scnhdr_out (bfd *, void *, void *);
 bfd_boolean _bfd_XX_print_private_bfd_data_common (bfd *, void *);
 bfd_boolean _bfd_XX_bfd_copy_private_bfd_data_common (bfd *, bfd *);
 unsigned    _bfd_XXi_swap_aouthdr_out (bfd *, void *, void *);
 unsigned    _bfd_XXi_swap_scnhdr_out (bfd *, void *, void *);
 bfd_boolean _bfd_XX_print_private_bfd_data_common (bfd *, void *);
 bfd_boolean _bfd_XX_bfd_copy_private_bfd_data_common (bfd *, bfd *);
-void        _bfd_XX_get_symbol_info (bfd *, asymbol *, symbol_info *);
+void       _bfd_XX_get_symbol_info (bfd *, asymbol *, symbol_info *);
 bfd_boolean _bfd_XXi_final_link_postscript (bfd *, struct coff_final_link_info *);
 bfd_boolean _bfd_XXi_final_link_postscript (bfd *, struct coff_final_link_info *);
+void       _bfd_XXi_swap_debugdir_in (bfd *, void *, void *);
+unsigned    _bfd_XXi_swap_debugdir_out (bfd *, void *, void *);
+unsigned    _bfd_XXi_write_codeview_record (bfd *, file_ptr, CODEVIEW_INFO *);
+CODEVIEW_INFO * _bfd_XXi_slurp_codeview_record (bfd * abfd, file_ptr where, unsigned long length, CODEVIEW_INFO *cvinfo);
 
 /* 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
 
 /* 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
@@ -393,5 +368,4 @@ bfd_boolean _bfd_pe_print_ce_compressed_pdata (bfd *, void *);
 bfd_boolean _bfd_pe64_print_ce_compressed_pdata (bfd *, void *);
 bfd_boolean _bfd_pex64_print_ce_compressed_pdata (bfd *, void *);
 bfd_boolean _bfd_pep_print_ce_compressed_pdata (bfd *, void *);
 bfd_boolean _bfd_pe64_print_ce_compressed_pdata (bfd *, void *);
 bfd_boolean _bfd_pex64_print_ce_compressed_pdata (bfd *, void *);
 bfd_boolean _bfd_pep_print_ce_compressed_pdata (bfd *, void *);
-bfd_boolean _bfd_pep_print_x64_pdata (bfd *, void *);
 
 
This page took 0.026785 seconds and 4 git commands to generate.