aboutsummaryrefslogtreecommitdiff
path: root/bfd/peicode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1998-05-18 21:47:54 +0000
committerNick Clifton <nickc@redhat.com>1998-05-18 21:47:54 +0000
commitbe461cc3217ecac64659eba113dee59d652cb033 (patch)
treea15a0e7a25c5addb50c13975bf6aac6c7c67517a /bfd/peicode.h
parente13d507e0fd9a949046c575a6d812875be95bfb1 (diff)
downloadgdb-be461cc3217ecac64659eba113dee59d652cb033.zip
gdb-be461cc3217ecac64659eba113dee59d652cb033.tar.gz
gdb-be461cc3217ecac64659eba113dee59d652cb033.tar.bz2
Fix nightly testing bug.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r--bfd/peicode.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 7953831..0183f98 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