aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1998-03-26 18:16:23 +0000
committerNick Clifton <nickc@redhat.com>1998-03-26 18:16:23 +0000
commit8c11394ac605d5e4adaf6755b239dcee7629c889 (patch)
tree3e81a222726c0eeaa0a57e62402ad5e32b7a3b66 /bfd
parentd747041128d1370cce6ce1c7400188c446278e51 (diff)
downloadgdb-8c11394ac605d5e4adaf6755b239dcee7629c889.zip
gdb-8c11394ac605d5e4adaf6755b239dcee7629c889.tar.gz
gdb-8c11394ac605d5e4adaf6755b239dcee7629c889.tar.bz2
Remove (most of the) target dependent code from peicode.h
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog10
-rw-r--r--bfd/peicode.h46
2 files changed, 43 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b454bd7..514eb4f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+Thu Mar 26 10:13:41 1998 Nick Clifton <nickc@cygnus.com>
+
+ * peicode.h: Chain together calls to
+ coff_bfd_copy_private_bfd_data and
+ coff_bfd_print_private_bfd_data.
+
+ * coff-arm.c: Add prototypes for
+ coff_arm_bfd_print_private_bfd_data and
+ coff_arm_bfd_copy_private_bfd_data.
+
Wed Mar 25 15:45:55 1998 Nick Clifton <nickc@cygnus.com>
* coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
diff --git a/bfd/peicode.h b/bfd/peicode.h
index 9026066..d6b5944 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -52,9 +52,15 @@ Most of this hacked by Steve Chamberlain,
wasting too much time.
*/
-#undef coff_bfd_print_private_bfd_data
+#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
+#else
+static boolean (* pe_saved_coff_bfd_print_private_bfd_data) (bfd *, PTR) = NULL;
+#endif
#define coff_bfd_print_private_bfd_data pe_print_private_bfd_data
-#define coff_mkobject pe_mkobject
+
+#define coff_mkobject pe_mkobject
#define coff_mkobject_hook pe_mkobject_hook
#ifndef GET_FCN_LNNOPTR
@@ -1966,13 +1972,19 @@ pe_print_private_bfd_data (abfd, vfile)
fprintf (file, "%s\n", dir_names[j]);
}
- pe_print_idata(abfd, vfile);
- pe_print_edata(abfd, vfile);
- pe_print_pdata(abfd, vfile);
- pe_print_reloc(abfd, vfile);
+ pe_print_idata (abfd, vfile);
+ pe_print_edata (abfd, vfile);
+ pe_print_pdata (abfd, vfile);
+ pe_print_reloc (abfd, vfile);
+
+ if (pe_saved_coff_bfd_print_private_bfd_data != NULL)
+ {
+ fputc ('\n', file);
+
+ return pe_saved_bfd_print_private_bfd_data (abfd, vfile);
+ }
- fputc ('\n', file);
- return coff_arm_bfd_print_private_bfd_data (abfd, vfile);
+ return true;
}
static boolean
@@ -2030,13 +2042,13 @@ pe_mkobject_hook (abfd, filehdr, aouthdr)
#ifdef COFF_IMAGE_WITH_PE
if (aouthdr)
- {
- pe->pe_opthdr = ((struct internal_aouthdr *)aouthdr)->pe;
- }
+ pe->pe_opthdr = ((struct internal_aouthdr *)aouthdr)->pe;
#endif
+#ifdef ARM
if (! coff_arm_bfd_set_private_flags (abfd, internal_f->f_flags))
coff_data (abfd) ->flags = 0;
+#endif
return (PTR) pe;
}
@@ -2046,7 +2058,12 @@ pe_mkobject_hook (abfd, filehdr, aouthdr)
/* Copy any private info we understand from the input bfd
to the output bfd. */
-#undef coff_bfd_copy_private_bfd_data
+#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
+#else
+static boolean (* pe_saved_coff_bfd_copy_private_bfd_data)(bfd *, bfd *) = NULL;
+#endif
#define coff_bfd_copy_private_bfd_data pe_bfd_copy_private_bfd_data
static boolean
@@ -2061,7 +2078,10 @@ pe_bfd_copy_private_bfd_data (ibfd, obfd)
pe_data (obfd)->pe_opthdr = pe_data (ibfd)->pe_opthdr;
pe_data (obfd)->dll = pe_data (ibfd)->dll;
- return coff_arm_bfd_copy_private_bfd_data (ibfd, obfd);
+ if (pe_saved_coff_bfd_copy_private_bfd_data)
+ return pe_saved_coff_bfd_copy_private_bfd_data (ibfd, obfd);
+
+ return true;
}
#ifdef COFF_IMAGE_WITH_PE