* pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
authorNick Clifton <nickc@redhat.com>
Fri, 18 Jul 2008 11:30:22 +0000 (11:30 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 18 Jul 2008 11:30:22 +0000 (11:30 +0000)
        print compressed pdata structure as described on MSDN. This only
        applies to a limited set of architectures (ARM, SH4).
        (slurp_symtab, my_symbol_for_address): Define static helper
        functions for pe_print_compressed_pdata.
        * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
        (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
        * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
        bfd_coff_backend_data, call the function if non-null.
        * pei-mcore.c: Add target dependent initialisation for
        bfd_coff_backend_data.
        * coff-sh.c: Likewise.
        * coff64-rs6000.c: Likewise.
        * coff-rs6000.c: Likewise.
        * libcoff-in.h: Likewise.
        * cf-i386lynx.c: Likewise.
        * coff-alpha.c: Likewise.
        * coff-apollo.c: Likewise.
        * coff-arm.c: Likewise.
        * coff-aux.c: Likewise.
        * coff-h8300.c: Likewise.
        * coff-h8500.c: Likewise.
        * coff-i386.c: Likewise.
        * coff-i860.c: Likewise.
        * coff-i960.c: Likewise.
        * coff-ia64.c: Likewise.
        * coff-m68k.c: Likewise.
        * coff-m88k.c: Likewise.
        * coff-maxq.c: Likewise.
        * coff-mips.c: Likewise.
        * coff-or32.c: Likewise.
        * coff-sparc.c: Likewise.
        * coff-tic30.c: Likewise.
        * coff-tic4x.c: Likewise.
        * coff-tic54x.c: Likewise.
        * coff-tic80.c: Likewise.
        * coff-w65.c: Likewise.
        * coff-we32k.c: Likewise.
        * coff-x86_64.c: Likewise.
        * coff-z80.c: Likewise.
        * coff-z8k.c: Likewise.
        * pe-mcore.c: Likewise.
        * pe-mips.c: Likewise.
        * pe-ppc.c: Likewise.
        * peXXigen.c: Likewise.
        * pei-ppc.c: Likewise.
        * libcoff.h: Regenerate.

40 files changed:
bfd/ChangeLog
bfd/cf-i386lynx.c
bfd/coff-alpha.c
bfd/coff-apollo.c
bfd/coff-arm.c
bfd/coff-aux.c
bfd/coff-h8300.c
bfd/coff-h8500.c
bfd/coff-i386.c
bfd/coff-i860.c
bfd/coff-i960.c
bfd/coff-ia64.c
bfd/coff-m68k.c
bfd/coff-m88k.c
bfd/coff-maxq.c
bfd/coff-mips.c
bfd/coff-or32.c
bfd/coff-rs6000.c
bfd/coff-sh.c
bfd/coff-sparc.c
bfd/coff-tic30.c
bfd/coff-tic4x.c
bfd/coff-tic54x.c
bfd/coff-tic80.c
bfd/coff-w65.c
bfd/coff-we32k.c
bfd/coff-x86_64.c
bfd/coff-z80.c
bfd/coff-z8k.c
bfd/coff64-rs6000.c
bfd/coffcode.h
bfd/libcoff-in.h
bfd/libcoff.h
bfd/pe-arm-wince.c
bfd/pe-mcore.c
bfd/pe-mips.c
bfd/pe-ppc.c
bfd/peXXigen.c
bfd/pei-mcore.c
bfd/pei-ppc.c

index bcb636ea35b8c3f4a7dcb23442400297f3ce40b0..1808f60e112ff208c6a2577cba4efaf44c39dca7 100644 (file)
@@ -1,3 +1,53 @@
+2008-07-18  Danny Backx  <dannybackx@users.sourceforge.net>
+
+       * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
+       print compressed pdata structure as described on MSDN. This only
+       applies to a limited set of architectures (ARM, SH4).
+       (slurp_symtab, my_symbol_for_address): Define static helper
+       functions for pe_print_compressed_pdata.
+       * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
+       (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
+       * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
+       bfd_coff_backend_data, call the function if non-null.
+       * pei-mcore.c: Add target dependent initialisation for
+       bfd_coff_backend_data.
+       * coff-sh.c: Likewise.
+       * coff64-rs6000.c: Likewise.
+       * coff-rs6000.c: Likewise.
+       * libcoff-in.h: Likewise.
+       * cf-i386lynx.c: Likewise.
+       * coff-alpha.c: Likewise.
+       * coff-apollo.c: Likewise.
+       * coff-arm.c: Likewise.
+       * coff-aux.c: Likewise.
+       * coff-h8300.c: Likewise.
+       * coff-h8500.c: Likewise.
+       * coff-i386.c: Likewise.
+       * coff-i860.c: Likewise.
+       * coff-i960.c: Likewise.
+       * coff-ia64.c: Likewise.
+       * coff-m68k.c: Likewise.
+       * coff-m88k.c: Likewise.
+       * coff-maxq.c: Likewise.
+       * coff-mips.c: Likewise.
+       * coff-or32.c: Likewise.
+       * coff-sparc.c: Likewise.
+       * coff-tic30.c: Likewise.
+       * coff-tic4x.c: Likewise.
+       * coff-tic54x.c: Likewise.
+       * coff-tic80.c: Likewise.
+       * coff-w65.c: Likewise.
+       * coff-we32k.c: Likewise.
+       * coff-x86_64.c: Likewise.
+       * coff-z80.c: Likewise.
+       * coff-z8k.c: Likewise.
+       * pe-mcore.c: Likewise.
+       * pe-mips.c: Likewise.
+       * pe-ppc.c: Likewise.
+       * peXXigen.c: Likewise.
+       * pei-ppc.c: Likewise.  
+       * libcoff.h: Regenerate.
+
 2008-07-16  Bernd Schmidt  <bernd.schmidt@analog.com>
 
        * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section,
index 8a30ed66ae13739685b7fd83218687ae7e7c740e..46951ab39354db00db570a7641c78676819c375c 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 386 COFF LynxOS files.
-   Copyright 1993, 1994, 1995, 2007 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1995, 2007, 2008  Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -29,4 +29,6 @@
 
 #define COFF_LONG_FILENAMES
 
+#define        bfd_pe_print_pdata      NULL
+
 #include "coff-i386.c"
index 52235f79f937747dde80455bd751795184775b8c..98bed843703cf169e5e687a27c9652910da81e42 100644 (file)
@@ -2304,7 +2304,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
     alpha_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
     _bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL
+    NULL, NULL, NULL, NULL
   },
   /* Supported architecture.  */
   bfd_arch_alpha,
index 6c3047352c4ce56ccee8427bc9bf404fe43d302c..4272ba6637ac3526664ee8ae643b6fedea9209b0 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Apollo 68000 COFF binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2003,
-   2007 Free Software Foundation, Inc.
+   2007, 2008  Free Software Foundation, Inc.
    By Troy Rollo (troy@cbme.unsw.edu.au)
    Based on m68k standard COFF version Written by Cygnus Support.
 
@@ -105,6 +105,8 @@ apollo_howto2rtype (internal)
 #define SELECT_RELOC(external, internal) \
   external.r_type = apollo_howto2rtype (internal);
 
+#define bfd_pe_print_pdata     NULL
+
 #include "coffcode.h"
 
 #ifndef TARGET_SYM
index 3bf61e5b769e708b4d49208d22dcbd3d18c7d777..d2c27c43a8c2ae3f1795e43b2a685f371ad9d6ff 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for ARM COFF files.
    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.
 
@@ -2528,6 +2528,10 @@ coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED,
   return bfd_arm_update_notes (abfd, ARM_NOTE_SECTION);
 }
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #ifndef TARGET_LITTLE_SYM
index eb7b2256a1112e2db6efbc6bf9fb1c991b016f77..2101dd348c42022f2673d66643992a06c24b3108 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for Apple M68K COFF A/UX 3.x files.
-   Copyright 1996, 1997, 2000, 2002, 2007 Free Software Foundation, Inc.
+   Copyright 1996, 1997, 2000, 2002, 2007, 2008
+   Free Software Foundation, Inc.
    Written by Richard Henderson <rth@tamu.edu>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -48,6 +49,10 @@ static bfd_boolean coff_m68k_aux_link_add_one_symbol
 
 #define coff_link_add_one_symbol coff_m68k_aux_link_add_one_symbol
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coff/aux-coff.h"  /* override coff/internal.h and coff/m68k.h */
 #include "coff-m68k.c"
 
index 5ff87aec8f6879cacd22cc590dbc0f56a9ae0ad3..e2a10a6c5cedae5f476d4b6c33be510484bdc561 100644 (file)
@@ -1429,6 +1429,11 @@ h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
 #define coff_bfd_link_hash_table_create h8300_coff_link_hash_table_create
 
 #define COFF_LONG_FILENAMES
+
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #undef coff_bfd_get_relocated_section_contents
index 186923a9d1ca30d6329e17bc54c4c942a155bb23..139a8ed1b6b71400c84d39fdcf5a03cfc8c517ca 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Renesas H8/500 COFF binaries.
    Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2007 Free Software Foundation, Inc.
+   2005, 2007, 2008  Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Steve Chamberlain, <sac@cygnus.com>.
 
@@ -298,6 +298,10 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
 
 #define coff_reloc16_extra_cases extra_case
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #undef  coff_bfd_get_relocated_section_contents
index 115fdf2fd34cf0ccbb1fda9d8ac19181a58221cb..30c81885d4caa775a320eab567166b6421884905 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel 386 COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2007
+   2000, 2001, 2002, 2003, 2004, 2007, 2008
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
 #include "coff/go32exe.h"
 #endif
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "libcoff.h"
 
 static bfd_reloc_status_type coff_i386_reloc
index bde75b1a6acdd1529a8bf86d8a51727abba09440..e5ca0c17bc5a259aa39c5f2f63f9a37d39b788d2 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel i860 COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2007, 2008  Free Software Foundation, Inc.
    Created mostly by substituting "860" for "386" in coff-i386.c
    Harry Dolan <dolan@ssd.intel.com>, October 1995
 
 
 #include "coff/internal.h"
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "libcoff.h"
 
 
index 7233c43dce67b95ccc01e583f55a1d10ba2f12ad..dc74a390c69ba878a3b3b38e0a2001ad183e837f 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel 960 COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
-   2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2007, 2008  Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
 #include "libbfd.h"
 #include "coff/i960.h"
 #include "coff/internal.h"
-#include "libcoff.h"           /* to allow easier abstraction-breaking */
+
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
+#include "libcoff.h"           /* To allow easier abstraction-breaking.  */
 
 static bfd_boolean coff_i960_is_local_label_name
   PARAMS ((bfd *, const char *));
index e8d6674c40c8c640f3c5c31315c6eb2ca5191fc8..0037c2f6917ddbb1bfd51f4c5774557df55e6e06 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for HP/Intel IA-64 COFF files.
-   Copyright 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001, 2002, 2007, 2008
+   Free Software Foundation, Inc.
    Contributed by David Mosberger <davidm@hpl.hp.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -64,6 +65,10 @@ in_reloc_p(abfd, howto)
 }
 #endif
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 static const bfd_target *ia64coff_object_p PARAMS ((bfd *));
index 185b0590277def36158f13ccc3e28606b72cda4e..b53cc5fb769452767c2ac9761a0b320f85b8ba7d 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Motorola 68000 COFF binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
-   2000, 2001, 2002, 2003, 2005, 2007
+   2000, 2001, 2002, 2003, 2005, 2007, 2008
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -545,6 +545,10 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
 
 #define coff_relocate_section _bfd_coff_generic_relocate_section
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #ifndef TARGET_SYM
index b2774256e1414a88e7067bb43932fc413dd8ea31..dd7704d6b6c927798cbd88160197606ff0483cdc 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Motorola 88000 COFF "Binary Compatibility Standard" files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2007  Free Software Foundation, Inc.
+   2001, 2002, 2003, 2007, 2008   Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -284,6 +284,11 @@ reloc_processing (relent, reloc, symbols, abfd, section)
 }
 
 #define BADMAG(x) MC88BADMAG(x)
+
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #undef coff_write_armap
index 927ba993fbad8eb25ae8253a47c4bb110373b1ec..165d7c86a9bcee44ac7cd25c3360a0fdc439a1e4 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for MAXQ COFF binaries.
-   Copyright 2004, 2007  Free Software Foundation, Inc.
+   Copyright 2004, 2007, 2008  Free Software Foundation, Inc.
 
    Contributed by Vineet Sharma (vineets@noida.hcltech.com) Inderpreet S.
    (inderpreetb@noida.hcltech.com)
@@ -427,6 +427,10 @@ maxq_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
 #define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \
  cache_ptr->addend =  ext_reloc.r_offset;
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #ifndef TARGET_UNDERSCORE
index 38010ef82193a5675f3cc0e9eac2087b5909ae87..929b3c16919fd38599123049f9985b4f937729fe 100644 (file)
@@ -85,6 +85,7 @@ static reloc_howto_type *mips_bfd_reloc_type_lookup
 #define coff_swap_aouthdr_out mips_ecoff_swap_aouthdr_out
 #define coff_swap_scnhdr_in mips_ecoff_swap_scnhdr_in
 #define coff_swap_scnhdr_out mips_ecoff_swap_scnhdr_out
+
 #include "coffswap.h"
 
 /* Get the ECOFF swapping routines.  */
@@ -1318,7 +1319,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
     _bfd_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
     _bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-    NULL, NULL
+    NULL, NULL, NULL
   },
   /* Supported architecture.  */
   bfd_arch_mips,
index 39a47fd5228809be32530317ff97a5c0445d6edc..9f57eb06eecde2da02a993bf8462d467a24b4aef 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for OpenRISC 1000 COFF binaries.
-   Copyright 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright 2002, 2003, 2004, 2005, 2007, 2008
+   Free Software Foundation, Inc.
    Contributed by Ivan Guzvinec  <ivang@opencores.org>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -570,6 +571,10 @@ coff_or32_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
 
 #define coff_adjust_symndx coff_or32_adjust_symndx
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 const bfd_target or32coff_big_vec =
index d2d443f9f313ab36273b6a0173d96a845e8d9bec..17c6907a3c56cc62b4667997109780e9df5e392b 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for IBM RS/6000 "XCOFF" files.
-   Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-   Free Software Foundation, Inc.
+   Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+   2008  Free Software Foundation, Inc.
    Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
    Archive support from Damon A. Permezel.
    Contributed by IBM Corporation and Cygnus Support.
@@ -128,6 +128,10 @@ extern int rs6000coff_core_file_failing_signal
 #define coff_swap_reloc_out xcoff_swap_reloc_out
 #define NO_COFF_RELOCS
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 /* The main body of code is in coffcode.h.  */
@@ -4034,7 +4038,8 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
       NULL,                    /* _bfd_coff_adjust_symndx */
       _bfd_generic_link_add_one_symbol,
       coff_link_output_has_begun,
-      coff_final_link_postscript
+      coff_final_link_postscript,
+      NULL                     /* print_pdata.  */
     },
 
     0x01DF,                    /* magic number */
@@ -4285,7 +4290,8 @@ static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data =
       NULL,                    /* _bfd_coff_adjust_symndx */
       _bfd_generic_link_add_one_symbol,
       coff_link_output_has_begun,
-      coff_final_link_postscript
+      coff_final_link_postscript,
+      NULL                     /* print_pdata.  */
     },
 
     0x01DF,                    /* magic number */
index 796a88e92874e98a99ca62a38f3774b0a4d6551d..07208674b45023b57d16c8366811ae29563599b4 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Renesas Super-H COFF binaries.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2007, 2008  Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Steve Chamberlain, <sac@cygnus.com>.
    Relaxing code written by Ian Lance Taylor, <ian@cygnus.com>.
@@ -43,6 +43,10 @@ static bfd_boolean sh_align_load_span
 #endif
 #endif
 
+#undef  bfd_pe_print_pdata
+#define        bfd_pe_print_pdata   pe_print_ce_compressed_pdata
+extern bfd_boolean pe_print_ce_compressed_pdata (bfd *, void *);
+
 #include "libcoff.h"
 
 /* Internal functions.  */
@@ -3149,7 +3153,8 @@ static const bfd_coff_backend_data bfd_coff_small_swap_table =
   coff_classify_symbol, coff_compute_section_file_positions,
   coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
   coff_adjust_symndx, coff_link_add_one_symbol,
-  coff_link_output_has_begun, coff_final_link_postscript
+  coff_link_output_has_begun, coff_final_link_postscript,
+  bfd_pe_print_pdata
 };
 
 #define coff_small_close_and_cleanup \
index eb8e08b6727bc14d7cd634806457e5b9920c0e1b..a9a699aec920d05ae371d5ffe563504091cee152 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Sparc COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
-   2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+   2002, 2003, 2005, 2007, 2008  Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -206,6 +206,8 @@ rtype2howto (cache_ptr, dst)
 
 #define COFF_SPARC
 
+#define bfd_pe_print_pdata     NULL
+
 #include "coffcode.h"
 
 #ifndef TARGET_SYM
index a732a00bcefdd3032d82b4a14a256cfb0b5b161e..033f79db05ed5b204390d6764b59d62ecf6e7aa9 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C30 coff binaries.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2007
+   Copyright 1998, 1999, 2000, 2001, 2002, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
 
@@ -182,6 +182,10 @@ reloc_processing (relent, reloc, symbols, abfd, section)
   relent->address -= section->vma;
 }
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 const bfd_target tic30_coff_vec =
index 7015becc8d13251992a3b7dee8fa75e74bef7fa2..4259dd91465cedd1d11eb13ac3db32a7b4abcd32 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for TMS320C4X coff binaries.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007
-   Free Software Foundation, Inc.
+   Copyright 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007,
+   2008  Free Software Foundation, Inc.
 
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
 
@@ -69,8 +69,12 @@ ticoff_bfd_is_local_label_name (abfd, name)
    instead of setting BADMAG.  */
 #define BADMAG(x) COFF2_BADMAG(x)
 
-#undef coff_rtype_to_howto
-#define coff_rtype_to_howto coff_tic4x_rtype_to_howto
+#undef  coff_rtype_to_howto
+#define coff_rtype_to_howto    coff_tic4x_rtype_to_howto
+
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
 
 #include "coffcode.h"
 
index 098a8887afb20d75a2be5fa4896f08a3b56747f7..672897d1d1173f23768db64236a063f1c7d8608d 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for TMS320C54X coff binaries.
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by Timothy Wall (twall@cygnus.com)
 
@@ -359,6 +359,11 @@ ticoff_bfd_is_local_label_name (abfd, name)
    and COFF0 vectors use custom _bad_format_hook procs instead of setting
    BADMAG.  */
 #define BADMAG(x) COFF2_BADMAG(x)
+
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 static bfd_boolean
index e6c4e5c1264d93625b6bd1af87c54b11ce54888d..6455e492334c9c5aea02328861b13db89959ac77 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).
-   Copyright 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Copyright 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
    Free Software Foundation, Inc.
 
    Written by Fred Fish (fnf@cygnus.com)
@@ -734,6 +734,11 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
 #define TIC80COFF 1            /* Customize coffcode.h */
 #undef C_AUTOARG               /* Clashes with TIc80's C_UEXT */
 #undef C_LASTENT               /* Clashes with TIc80's C_STATLAB */
+
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
index ced7d9b63ccc521ecd24d574bdcc68ca378c6146..308d4484fe0acab95c5ffc506feaa211525401a4 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for WDC 65816 COFF binaries.
    Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2006, 2007 Free Software Foundation, Inc.
+   2006, 2007, 2008  Free Software Foundation, Inc.
    Written by Steve Chamberlain, <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -375,6 +375,10 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
 #define coff_reloc16_extra_cases w65_reloc16_extra_cases
 #define coff_reloc16_estimate w65_reloc16_estimate
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #undef coff_bfd_get_relocated_section_contents
index 7bd2d4f7e741b1e8b7fd8b675a2d8a7abdf09ef0..1ba62007cf0e8c963e47e4a38d758a1cea3972c2 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for we32k COFF files.
-   Copyright 1992, 1993, 1994, 1999, 2000, 2002, 2003, 2007
+   Copyright 1992, 1993, 1994, 1999, 2000, 2002, 2003, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by Brendan Kehoe (brendan@cs.widener.edu).
 
@@ -63,6 +63,10 @@ static reloc_howto_type howto_table[] =
 #define RTYPE2HOWTO(cache_ptr, dst) \
            (cache_ptr)->howto = howto_table + (dst)->r_type;
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #define coff_write_armap bsd_write_armap
index 0368434f8a5437b57fd3ca34f6d810969a9eba45..78a788670b96d22ef5fce3e4234fe15a1c5a5f00 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for AMD 64 COFF files.
-   Copyright 2006, 2007 Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2008  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -711,6 +711,10 @@ coff_amd64_is_local_label_name (bfd *abfd, const char *name)
 
 #endif /* TARGET_UNDERSCORE */
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #ifdef PE
index b866d2f1c420394fdc2af667bd3cdcfcc4f38f6d..7e5460630480f091e0e377441cfcc8a345941271 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Zilog Z80 COFF binaries.
-   Copyright 2005, 2007 Free Software Foundation, Inc.
+   Copyright 2005, 2007, 2008  Free Software Foundation, Inc.
    Contributed by Arnold Metselaar <arnold_m@operamail.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -270,6 +270,10 @@ extra_case (bfd *in_abfd,
 #define coff_bfd_reloc_type_lookup  coff_z80_reloc_type_lookup
 #define coff_bfd_reloc_name_lookup coff_z80_reloc_name_lookup
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #undef  coff_bfd_get_relocated_section_contents
index ad49f7a7ad3e555379767256be53a09e5aeaeafb..7e9dba507618382d6b97aed83c2324ff1ab3c602 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Zilog Z800n COFF binaries.
    Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2007 Free Software Foundation, Inc.
+   2004, 2005, 2007, 2008  Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Written by Steve Chamberlain, <sac@cygnus.com>.
 
@@ -372,6 +372,10 @@ extra_case (bfd *in_abfd,
 #define coff_bfd_reloc_type_lookup  coff_z8k_reloc_type_lookup
 #define coff_bfd_reloc_name_lookup coff_z8k_reloc_name_lookup
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 #undef  coff_bfd_get_relocated_section_contents
index 0c5a3dd39637f0a61e7cf19cddd8e52c6a319e06..7a0ec1f2ca5af53bbc5e6b1a802883cb0acd11de 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for IBM RS/6000 "XCOFF64" files.
-   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
    Written Clinton Popetz.
    Contributed by Cygnus Support.
@@ -272,6 +272,10 @@ extern int rs6000coff_core_file_failing_signal
 #define coff_swap_reloc_out xcoff64_swap_reloc_out
 #define NO_COFF_RELOCS
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 /* For XCOFF64, the effective width of symndx changes depending on
@@ -2584,7 +2588,8 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
       NULL,                    /* _bfd_coff_adjust_symndx */
       _bfd_generic_link_add_one_symbol,
       coff_link_output_has_begun,
-      coff_final_link_postscript
+      coff_final_link_postscript,
+      NULL                     /* print_pdata.  */
     },
 
     0x01EF,                    /* magic number */
@@ -2837,7 +2842,8 @@ static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data =
       NULL,                    /* _bfd_coff_adjust_symndx */
       _bfd_generic_link_add_one_symbol,
       coff_link_output_has_begun,
-      coff_final_link_postscript
+      coff_final_link_postscript,
+      NULL                     /* print_pdata.  */
     },
 
     U64_TOCMAGIC,              /* magic number */
index 3d92ee570a49d281ec626b376e87a510e61d8e2f..78269829f764c3eea53f7cc2da5e5c0f97733174 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for the generic parts of most COFF variants, for BFD.
    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.
 
@@ -1292,6 +1292,9 @@ Special entry points for gdb to swap in coff symbol table parts:
 .  bfd_boolean (*_bfd_coff_final_link_postscript)
 .    (bfd *, struct coff_final_link_info *);
 .
+.  bfd_boolean (*_bfd_coff_print_pdata)
+.    (bfd *, void *);
+.
 .} bfd_coff_backend_data;
 .
 .#define coff_backend_info(abfd) \
@@ -1424,6 +1427,11 @@ Special entry points for gdb to swap in coff symbol table parts:
 .#define bfd_coff_final_link_postscript(a,p) \
 .  ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
 .
+.#define bfd_coff_have_print_pdata(a) \
+.  (coff_backend_info (a)->_bfd_coff_print_pdata)
+.#define bfd_coff_print_pdata(a,p) \
+.  ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p))
+.
 */
 
 /* See whether the magic number matches.  */
@@ -5263,7 +5271,8 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED =
   coff_classify_symbol, coff_compute_section_file_positions,
   coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
   coff_adjust_symndx, coff_link_add_one_symbol,
-  coff_link_output_has_begun, coff_final_link_postscript
+  coff_link_output_has_begun, coff_final_link_postscript,
+  bfd_pe_print_pdata
 };
 
 #ifdef TICOFF
@@ -5306,7 +5315,8 @@ static const bfd_coff_backend_data ticoff0_swap_table =
   coff_classify_symbol, coff_compute_section_file_positions,
   coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
   coff_adjust_symndx, coff_link_add_one_symbol,
-  coff_link_output_has_begun, coff_final_link_postscript
+  coff_link_output_has_begun, coff_final_link_postscript,
+  bfd_pe_print_pdata
 };
 #endif
 
@@ -5350,7 +5360,8 @@ static const bfd_coff_backend_data ticoff1_swap_table =
   coff_classify_symbol, coff_compute_section_file_positions,
   coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
   coff_adjust_symndx, coff_link_add_one_symbol,
-  coff_link_output_has_begun, coff_final_link_postscript
+  coff_link_output_has_begun, coff_final_link_postscript,
+  bfd_pe_print_pdata   /* huh */
 };
 #endif
 
index d8c8ed18640f20a9c1fa3efed073d5a2533d7827..8f11df4dfa1a3a38b6dc6a87c784351a42a3b5c0 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD COFF object file private structure.
    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.
 
index 1e6f1c2899c6ff16723523c547dc57eadf2fc795..f21e0e6539ecc97c2c1a801d7b85f12b9e3938a3 100644 (file)
@@ -802,6 +802,9 @@ typedef struct
   bfd_boolean (*_bfd_coff_final_link_postscript)
     (bfd *, struct coff_final_link_info *);
 
+  bfd_boolean (*_bfd_coff_print_pdata)
+    (bfd *, void *);
+
 } bfd_coff_backend_data;
 
 #define coff_backend_info(abfd) \
@@ -934,3 +937,8 @@ typedef struct
 #define bfd_coff_final_link_postscript(a,p) \
   ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
 
+#define bfd_coff_have_print_pdata(a) \
+  (coff_backend_info (a)->_bfd_coff_print_pdata)
+#define bfd_coff_print_pdata(a,p) \
+  ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p))
+
index 90a53a35fad8be8e9bb3e9395d1e020d804d00d5..e0013f378d58bd8b0f8bd7c9d00b81409bd0a49b 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM WINCE PE files.
-   Copyright 2006, 2007 Free Software Foundation, Inc.
+   Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
 
 #define LOCAL_LABEL_PREFIX "."
 
+#include "sysdep.h"
+#include "bfd.h"
+
+#undef  bfd_pe_print_pdata
+#define        bfd_pe_print_pdata   pe_print_ce_compressed_pdata
+extern bfd_boolean pe_print_ce_compressed_pdata (bfd *, void *);
+
 #include "pe-arm.c"
+
+typedef struct sym_cache
+{
+  int symcount;
+  asymbol **syms;
+} sym_cache;
+
+static asymbol **
+slurp_symtab (bfd *abfd, sym_cache *psc)
+{
+  asymbol **sy = NULL;
+  long storage;
+
+  if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
+    {
+      psc->symcount = 0;
+      return NULL;
+    }
+
+  storage = bfd_get_symtab_upper_bound (abfd);
+  if (storage < 0)
+    return NULL;
+  if (storage)
+    sy = bfd_malloc (storage);
+
+  psc->symcount = bfd_canonicalize_symtab (abfd, sy);
+  if (psc->symcount < 0)
+    return NULL;
+  return sy;
+}
+
+static const char *
+my_symbol_for_address (bfd *abfd, bfd_vma func, sym_cache *psc)
+{
+  int i;
+
+  if (psc->syms == 0)
+    psc->syms = slurp_symtab (abfd, psc);
+
+  for (i = 0; i < psc->symcount; i++)
+    {
+      if (psc->syms[i]->section->vma + psc->syms[i]->value == func)
+       return psc->syms[i]->name;
+    }
+
+  return NULL;
+}
+
+static void
+cleanup_syms (sym_cache *psc)
+{
+  psc->symcount = 0;
+  free (psc->syms);
+  psc->syms = NULL;
+}
+
+/* This is the version for "compressed" pdata.  */
+
+bfd_boolean
+pe_print_ce_compressed_pdata (bfd * abfd, void * vfile)
+{
+# define PDATA_ROW_SIZE        (2 * 4)
+  FILE *file = (FILE *) vfile;
+  bfd_byte *data = 0;
+  asection *section = bfd_get_section_by_name (abfd, ".pdata");
+  bfd_size_type datasize = 0;
+  bfd_size_type i;
+  bfd_size_type start, stop;
+  int onaline = PDATA_ROW_SIZE;
+  struct sym_cache sym_cache = {0, 0} ;
+
+  if (section == NULL
+      || coff_section_data (abfd, section) == NULL
+      || pei_section_data (abfd, section) == NULL)
+    return TRUE;
+
+  stop = pei_section_data (abfd, section)->virt_size;
+  if ((stop % onaline) != 0)
+    fprintf (file,
+            _("Warning, .pdata section size (%ld) is not a multiple of %d\n"),
+            (long) stop, onaline);
+
+  fprintf (file,
+          _("\nThe Function Table (interpreted .pdata section contents)\n"));
+
+  fprintf (file, _("\
+ vma:\t\tBegin    Prolog   Function Flags    Exception EH\n\
+     \t\tAddress  Length   Length   32b exc  Handler   Data\n"));
+
+  datasize = section->size;
+  if (datasize == 0)
+    return TRUE;
+
+  if (! bfd_malloc_and_get_section (abfd, section, &data))
+    {
+      if (data != NULL)
+       free (data);
+      return FALSE;
+    }
+
+  start = 0;
+
+  for (i = start; i < stop; i += onaline)
+    {
+      bfd_vma begin_addr;
+      bfd_vma other_data;
+      bfd_vma prolog_length, function_length;
+      int flag32bit, exception_flag;
+      bfd_byte *tdata = 0;
+      asection *tsection;
+
+      if (i + PDATA_ROW_SIZE > stop)
+       break;
+
+      begin_addr = GET_PDATA_ENTRY (abfd, data + i     );
+      other_data = GET_PDATA_ENTRY (abfd, data + i +  4);
+
+      if (begin_addr == 0 && other_data == 0)
+       /* We are probably into the padding of the section now.  */
+       break;
+
+      prolog_length = (other_data & 0x000000FF);
+      function_length = (other_data & 0x3FFFFF00) >> 8;
+      flag32bit = (int)((other_data & 0x40000000) >> 30);
+      exception_flag = (int)((other_data & 0x80000000) >> 31);
+
+      fputc (' ', file);
+      fprintf_vma (file, i + section->vma); fputc ('\t', file);
+      fprintf_vma (file, begin_addr); fputc (' ', file);
+      fprintf_vma (file, prolog_length); fputc (' ', file);
+      fprintf_vma (file, function_length); fputc (' ', file);
+      fprintf (file, "%2d  %2d   ", flag32bit, exception_flag);
+
+      /* Get the exception handler's address and the data passed from the
+         .text section. This is really the data that belongs with the .pdata
+         but got "compressed" out for the ARM and SH4 architectures.  */
+      tsection = bfd_get_section_by_name (abfd, ".text");
+      if (tsection && coff_section_data (abfd, tsection)
+         && pei_section_data (abfd, tsection))
+       {
+         if (bfd_malloc_and_get_section (abfd, tsection, & tdata))
+           {
+             int xx = (begin_addr - 8) - tsection->vma;
+
+             tdata = bfd_malloc (8);
+             if (bfd_get_section_contents (abfd, tsection, tdata, (bfd_vma) xx, 8))
+               {
+                 bfd_vma eh, eh_data;
+
+                 eh = bfd_get_32 (abfd, tdata);
+                 eh_data = bfd_get_32 (abfd, tdata + 4);
+                 fprintf (file, "%08x  ", (unsigned int) eh);
+                 fprintf (file, "%08x", (unsigned int) eh_data);
+                 if (eh != 0)
+                   {
+                     const char *s = my_symbol_for_address (abfd, eh, &sym_cache);
+
+                     if (s)
+                       fprintf (file, " (%s) ", s);
+                   }
+               }
+             free (tdata);
+           }
+         else
+           {
+             if (tdata)
+               free (tdata);
+           }
+       }
+
+      fprintf (file, "\n");
+    }
+
+  free (data);
+
+  cleanup_syms (& sym_cache);
+
+  return TRUE;
+#undef PDATA_ROW_SIZE
+}
index d0744668067987786b9d0e31ef59db1120f30792..7b466c2f1f94a33d074f9320971e8657e9b326ec 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for MCore PECOFF files.
-   Copyright 1999, 2002, 2007 Free Software Foundation, Inc.
+   Copyright 1999, 2002, 2007, 2008  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -34,4 +34,8 @@
 
 #define MCORE_PE
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coff-mcore.c"
index 81aeb68caabdc148749f590d3e77b56666f8fdc7..f28a2c2180f6776109b8b6c1bebce3f085796943 100644 (file)
@@ -1,6 +1,7 @@
 /* BFD back-end for MIPS PE COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+   Free Software Foundation, Inc.
    Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -851,6 +852,10 @@ coff_mips_is_local_label_name (bfd *abfd, const char *name)
 
 #define COFF_NO_HACK_SCNHDR_SIZE
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 const bfd_target
index e253d3858cd01cf061fd1e9c0734630c3d1bfdb9..8758d4490c581abcb3691b48061056b8e872224a 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD back-end for PowerPC PECOFF files.
-   Copyright 1995, 1996, 1999, 2001, 2007 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1999, 2001, 2007, 2008
+   Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -40,4 +41,8 @@
 /* FIXME: This target no longer works.  Search for POWERPC_LE_PE in
    coff-ppc.c and peigen.c.  */
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coff-ppc.c"
index ddba2354df5cdadce83cc6caa87ec5b74ca1f2e0..be06ee6f2b5cfc8d146bb00fbf3e9ad7baeb1d3c 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for the generic parts of PE/PEI; the common executable parts.
    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.
@@ -1581,7 +1581,15 @@ pe_print_edata (bfd * abfd, void * vfile)
 /* This really is architecture dependent.  On IA-64, a .pdata entry
    consists of three dwords containing relative virtual addresses that
    specify the start and end address of the code range the entry
-   covers and the address of the corresponding unwind info data.  */
+   covers and the address of the corresponding unwind info data. 
+
+   On ARM and SH-4, a compressed PDATA structure is used :
+   _IMAGE_CE_RUNTIME_FUNCTION_ENTRY, whereas MIPS is documented to use
+   _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY.
+   See http://msdn2.microsoft.com/en-us/library/ms253988(VS.80).aspx .
+
+   The version of this function to deal with compressed pdata has been
+   moved to pe-arm-wince.c.  */
 
 static bfd_boolean
 pe_print_pdata (bfd * abfd, void * vfile)
@@ -1705,6 +1713,7 @@ pe_print_pdata (bfd * abfd, void * vfile)
   free (data);
 
   return TRUE;
+#undef PDATA_ROW_SIZE
 }
 
 #define IMAGE_REL_BASED_HIGHADJ 4
@@ -1975,7 +1984,10 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
 
   pe_print_idata (abfd, vfile);
   pe_print_edata (abfd, vfile);
-  pe_print_pdata (abfd, vfile);
+  if (bfd_coff_have_print_pdata (abfd))
+    bfd_coff_print_pdata (abfd, vfile);
+  else
+    pe_print_pdata (abfd, vfile);
   pe_print_reloc (abfd, vfile);
 
   return TRUE;
index b1f30cc473bccdc4a90ae5f990842c40e67b8d75..209c9fa3ab57f807e797654db96f5a004239e065 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for MCore PECOFF files.
-   Copyright 1999, 2002, 2007 Free Software Foundation, Inc.
+   Copyright 1999, 2002, 2007, 2008  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -35,4 +35,8 @@
 
 #define MCORE_PE
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coff-mcore.c"
index e109c69e26cedf0e0878b133d53d83b9f263d8c2..420e33e3a0af436d71b2243d48cce448b2bb02d2 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for PowerPC PE IMAGE COFF files.
-   Copyright 1995, 1996, 1999, 2007 Free Software Foundation, Inc.
+   Copyright 1995, 1996, 1999, 2007, 2008  Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -42,4 +42,8 @@
 /* FIXME: This target no longer works.  Search for POWERPC_LE_PE in
    coff-ppc.c and peigen.c.  */
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coff-ppc.c"
This page took 0.048351 seconds and 4 git commands to generate.