Index: bfd/pe-arm-wince.c =================================================================== --- bfd/pe-arm-wince.c (revision 1130) +++ bfd/pe-arm-wince.c (working copy) @@ -35,4 +35,178 @@ #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 * abfd, void * vfile); + #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; isymcount; 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 = (asymbol **)0; +} + +/* 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: bfd/pei-arm.c =================================================================== --- bfd/pei-arm.c (revision 1130) +++ bfd/pei-arm.c (working copy) @@ -51,4 +51,8 @@ { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } +#undef bfd_pe_print_pdata +#define bfd_pe_print_pdata pe_print_ce_compressed_pdata +extern bfd_boolean pe_print_ce_compressed_pdata (bfd * abfd, void * vfile); + #include "coff-arm.c" Index: bfd/pei-arm-wince.c =================================================================== --- bfd/pei-arm-wince.c (revision 1130) +++ bfd/pei-arm-wince.c (working copy) @@ -28,4 +28,11 @@ #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 * abfd, void * vfile); + #include "pei-arm.c" Index: bfd/pe-arm.c =================================================================== --- bfd/pe-arm.c (revision 1130) +++ bfd/pe-arm.c (working copy) @@ -63,4 +63,8 @@ { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } +#undef bfd_pe_print_pdata +#define bfd_pe_print_pdata pe_print_ce_compressed_pdata +extern bfd_boolean pe_print_ce_compressed_pdata (bfd * abfd, void * vfile); + #include "coff-arm.c" Index: bfd/coff-sh.c =================================================================== --- bfd/coff-sh.c (revision 1130) +++ bfd/coff-sh.c (working copy) @@ -43,6 +43,10 @@ #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 * abfd, void * vfile); + #include "libcoff.h" /* Internal functions. */ @@ -3149,7 +3153,8 @@ 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: bfd/libcoff.h =================================================================== --- bfd/libcoff.h (revision 1130) +++ bfd/libcoff.h (working copy) @@ -802,6 +802,9 @@ 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 @@ #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: bfd/coffcode.h =================================================================== --- bfd/coffcode.h (revision 1130) +++ bfd/coffcode.h (working copy) @@ -1292,6 +1292,9 @@ . 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 @@ .#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 @@ 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 @@ 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 @@ 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: bfd/coff64-rs6000.c =================================================================== --- bfd/coff64-rs6000.c (revision 1130) +++ bfd/coff64-rs6000.c (working copy) @@ -2584,7 +2584,8 @@ 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 +2838,8 @@ 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: bfd/coff-rs6000.c =================================================================== --- bfd/coff-rs6000.c (revision 1130) +++ bfd/coff-rs6000.c (working copy) @@ -128,6 +128,10 @@ #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 @@ 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 @@ 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: bfd/peXXigen.c =================================================================== --- bfd/peXXigen.c (revision 1130) +++ bfd/peXXigen.c (working copy) @@ -1581,8 +1581,17 @@ /* 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 is + moved to pe-arm-wince.c . + */ + static bfd_boolean pe_print_pdata (bfd * abfd, void * vfile) { @@ -1705,6 +1714,7 @@ free (data); return TRUE; +#undef PDATA_ROW_SIZE } #define IMAGE_REL_BASED_HIGHADJ 4 @@ -1975,7 +1985,10 @@ 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: bfd/coff-aux.c =================================================================== --- bfd/coff-aux.c (revision 1154) +++ bfd/coff-aux.c (working copy) @@ -48,6 +48,10 @@ #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: bfd/coff-arm.c =================================================================== --- bfd/coff-arm.c (revision 1154) +++ bfd/coff-arm.c (working copy) @@ -2528,6 +2528,10 @@ 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: bfd/coff-we32k.c =================================================================== --- bfd/coff-we32k.c (revision 1154) +++ bfd/coff-we32k.c (working copy) @@ -63,6 +63,10 @@ #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: bfd/coff-z8k.c =================================================================== --- bfd/coff-z8k.c (revision 1154) +++ bfd/coff-z8k.c (working copy) @@ -372,6 +372,10 @@ #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: bfd/coff-w65.c =================================================================== --- bfd/coff-w65.c (revision 1154) +++ bfd/coff-w65.c (working copy) @@ -375,6 +375,10 @@ #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: bfd/coff-i386.c =================================================================== --- bfd/coff-i386.c (revision 1154) +++ bfd/coff-i386.c (working copy) @@ -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 Index: bfd/pe-mips.c =================================================================== --- bfd/pe-mips.c (revision 1154) +++ bfd/pe-mips.c (working copy) @@ -851,6 +851,10 @@ #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: bfd/coff-i860.c =================================================================== --- bfd/coff-i860.c (revision 1154) +++ bfd/coff-i860.c (working copy) @@ -29,6 +29,10 @@ #include "coff/internal.h" +#ifndef bfd_pe_print_pdata +#define bfd_pe_print_pdata NULL +#endif + #include "libcoff.h" Index: bfd/coff-tic4x.c =================================================================== --- bfd/coff-tic4x.c (revision 1154) +++ bfd/coff-tic4x.c (working copy) @@ -72,6 +72,10 @@ #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" static bfd_reloc_status_type Index: bfd/coff-tic54x.c =================================================================== --- bfd/coff-tic54x.c (revision 1154) +++ bfd/coff-tic54x.c (working copy) @@ -359,6 +359,11 @@ 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: bfd/coff-h8300.c =================================================================== --- bfd/coff-h8300.c (revision 1154) +++ bfd/coff-h8300.c (working copy) @@ -1428,6 +1428,10 @@ #define coff_bfd_link_add_symbols h8300_bfd_link_add_symbols #define coff_bfd_link_hash_table_create h8300_coff_link_hash_table_create +#ifndef bfd_pe_print_pdata +#define bfd_pe_print_pdata NULL +#endif + #define COFF_LONG_FILENAMES #include "coffcode.h" Index: bfd/coff-mips.c =================================================================== --- bfd/coff-mips.c (revision 1154) +++ bfd/coff-mips.c (working copy) @@ -85,6 +85,7 @@ #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 @@ _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: bfd/coff-m88k.c =================================================================== --- bfd/coff-m88k.c (revision 1154) +++ bfd/coff-m88k.c (working copy) @@ -284,6 +284,11 @@ } #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: bfd/pe-mcore.c =================================================================== --- bfd/pe-mcore.c (revision 1154) +++ bfd/pe-mcore.c (working copy) @@ -34,4 +34,8 @@ #define MCORE_PE +#ifndef bfd_pe_print_pdata +#define bfd_pe_print_pdata NULL +#endif + #include "coff-mcore.c" Index: bfd/pei-mcore.c =================================================================== --- bfd/pei-mcore.c (revision 1154) +++ bfd/pei-mcore.c (working copy) @@ -35,4 +35,8 @@ #define MCORE_PE +#ifndef bfd_pe_print_pdata +#define bfd_pe_print_pdata NULL +#endif + #include "coff-mcore.c" Index: bfd/cf-i386lynx.c =================================================================== --- bfd/cf-i386lynx.c (revision 1154) +++ bfd/cf-i386lynx.c (working copy) @@ -29,4 +29,6 @@ #define COFF_LONG_FILENAMES +#define bfd_pe_print_pdata NULL + #include "coff-i386.c" Index: bfd/pei-ppc.c =================================================================== --- bfd/pei-ppc.c (revision 1154) +++ bfd/pei-ppc.c (working copy) @@ -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" Index: bfd/coff-or32.c =================================================================== --- bfd/coff-or32.c (revision 1154) +++ bfd/coff-or32.c (working copy) @@ -570,6 +570,10 @@ #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: bfd/coff-i960.c =================================================================== --- bfd/coff-i960.c (revision 1154) +++ bfd/coff-i960.c (working copy) @@ -28,6 +28,11 @@ #include "libbfd.h" #include "coff/i960.h" #include "coff/internal.h" + +#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 Index: bfd/pe-ppc.c =================================================================== --- bfd/pe-ppc.c (revision 1154) +++ bfd/pe-ppc.c (working copy) @@ -40,4 +40,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: bfd/coff-z80.c =================================================================== --- bfd/coff-z80.c (revision 1154) +++ bfd/coff-z80.c (working copy) @@ -270,6 +270,10 @@ #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: bfd/coff-maxq.c =================================================================== --- bfd/coff-maxq.c (revision 1154) +++ bfd/coff-maxq.c (working copy) @@ -427,6 +427,10 @@ #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: bfd/coff-sparc.c =================================================================== --- bfd/coff-sparc.c (revision 1154) +++ bfd/coff-sparc.c (working copy) @@ -206,6 +206,8 @@ #define COFF_SPARC +#define bfd_pe_print_pdata NULL + #include "coffcode.h" #ifndef TARGET_SYM Index: bfd/coff-apollo.c =================================================================== --- bfd/coff-apollo.c (revision 1154) +++ bfd/coff-apollo.c (working copy) @@ -105,6 +105,8 @@ #define SELECT_RELOC(external, internal) \ external.r_type = apollo_howto2rtype (internal); +#define bfd_pe_print_pdata NULL + #include "coffcode.h" #ifndef TARGET_SYM Index: bfd/coff-h8500.c =================================================================== --- bfd/coff-h8500.c (revision 1154) +++ bfd/coff-h8500.c (working copy) @@ -298,6 +298,10 @@ #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: bfd/coff-m68k.c =================================================================== --- bfd/coff-m68k.c (revision 1154) +++ bfd/coff-m68k.c (working copy) @@ -545,6 +545,10 @@ #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: bfd/coff-tic80.c =================================================================== --- bfd/coff-tic80.c (revision 1154) +++ bfd/coff-tic80.c (working copy) @@ -734,6 +734,11 @@ #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: bfd/coff-tic30.c =================================================================== --- bfd/coff-tic30.c (revision 1154) +++ bfd/coff-tic30.c (working copy) @@ -182,6 +182,10 @@ 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 =