* 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.
This commit is contained in:
Nick Clifton 2008-07-18 11:30:22 +00:00
parent a18f591e92
commit 2b5c217d45
40 changed files with 458 additions and 52 deletions

View 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,

View 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"

View 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,

View 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

View 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

View 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"

View 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

View 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

View 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.
@ -37,6 +37,10 @@
#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

View 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
@ -29,6 +29,10 @@
#include "coff/internal.h"
#ifndef bfd_pe_print_pdata
#define bfd_pe_print_pdata NULL
#endif
#include "libcoff.h"

View 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.
@ -28,7 +28,12 @@
#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 *));

View 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 *));

View 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

View 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

View 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

View 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,

View 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 =

View 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 */

View 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 \

View 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

View 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 =

View 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"

View 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

View 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)

View 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

View 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

View 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

View 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

View 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

View 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 */

View 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

View 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.

View 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))

View 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.
@ -35,4 +35,191 @@
#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
}

View 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"

View 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

View 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"

View 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;

View 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"

View 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"