From be461cc3217ecac64659eba113dee59d652cb033 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 18 May 1998 21:47:54 +0000 Subject: [PATCH] Fix nightly testing bug. --- bfd/ChangeLog | 5 +++++ bfd/peicode.h | 28 +++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d4770e99867..f39fc9d2377 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Mon May 18 14:44:15 1998 Nick Clifton + + * peicode.h (add_data_entry): If the section has no private data + then do not create a Data Dictionary entry for it. + Mon May 18 00:09:28 1998 Richard Henderson * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes. diff --git a/bfd/peicode.h b/bfd/peicode.h index 795383192a1..0183f98ca5c 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -52,11 +52,15 @@ Most of this hacked by Steve Chamberlain, wasting too much time. */ -#ifdef coff_bfd_print_private_bfd_data -static boolean (* pe_saved_coff_bfd_print_private_bfd_data) (bfd *, PTR) = coff_bfd_print_private_bfd_data; -#undef coff_bfd_print_private_bfd_data +#ifdef coff_bfd_print_private_bfd_data +static boolean (*pe_saved_coff_bfd_print_private_bfd_data) + PARAMS ((bfd *, PTR)) + = coff_bfd_print_private_bfd_data; +#undef coff_bfd_print_private_bfd_data #else -static boolean (* pe_saved_coff_bfd_print_private_bfd_data) (bfd *, PTR) = NULL; +static boolean (*pe_saved_coff_bfd_print_private_bfd_data) + PARAMS ((bfd *, PTR)) + = NULL; #endif #define coff_bfd_print_private_bfd_data pe_print_private_bfd_data @@ -853,7 +857,9 @@ static void add_data_entry (abfd, aout, idx, name, base) asection *sec = bfd_get_section_by_name (abfd, name); /* add import directory information if it exists */ - if (sec != NULL) + if (sec != NULL + && coff_section_data (abfd, sec) != NULL + && pei_section_data (abfd, sec) != NULL) { aout->DataDirectory[idx].VirtualAddress = (sec->vma - base) & 0xffffffff; aout->DataDirectory[idx].Size = pei_section_data (abfd, sec)->virt_size; @@ -2054,11 +2060,15 @@ pe_mkobject_hook (abfd, filehdr, aouthdr) /* Copy any private info we understand from the input bfd to the output bfd. */ -#ifdef coff_bfd_copy_private_bfd_data -static boolean (* pe_saved_coff_bfd_copy_private_bfd_data)(bfd *, bfd *) = coff_bfd_copy_private_bfd_data; -#undef coff_bfd_copy_private_bfd_data +#ifdef coff_bfd_copy_private_bfd_data +static boolean (*pe_saved_coff_bfd_copy_private_bfd_data) + PARAMS ((bfd *, bfd *)) + = coff_bfd_copy_private_bfd_data; +#undef coff_bfd_copy_private_bfd_data #else -static boolean (* pe_saved_coff_bfd_copy_private_bfd_data)(bfd *, bfd *) = NULL; +static boolean (*pe_saved_coff_bfd_copy_private_bfd_data) + PARAMS ((bfd *, bfd *)) + = NULL; #endif #define coff_bfd_copy_private_bfd_data pe_bfd_copy_private_bfd_data -- 2.30.2