This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFA/hpux] Implement file_matches_executable_p
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sources dot redhat dot com
- Date: Sat, 24 Dec 2005 19:05:30 +1030
- Subject: Re: [RFA/hpux] Implement file_matches_executable_p
- References: <20051114024708.GA10807@nevyn.them.org> <20051117011431.GB1635@adacore.com> <20051117042611.GA4250@nevyn.them.org> <20051118004719.GM1635@adacore.com> <20051118010439.GO1635@adacore.com> <20051118023215.GB31442@nevyn.them.org> <20051125025451.GN1635@adacore.com> <20051202184121.GU1215@adacore.com> <43AAE9AB.6080300@redhat.com> <20051223102243.GE821@adacore.com>
On Fri, Dec 23, 2005 at 02:22:43PM +0400, Joel Brobecker wrote:
> > >>2005-11-17 Joel Brobecker <brobecker@adacore.com>
> > >>
> > >> * corefile.c (generic_core_file_matches_executable_p): New
> > >> function.
[snip]
Trying to build binutils with --enable-maintainer-mode fails since this
patch. The "SYNOPSIS" keyword isn't there just for documentation; It
causes the prototype to be copied to bfd-in2.h. I guess this patch
wasn't tested with --enable-64-bit-bfd --enable-targets=all either, as
that would have shown an undefined symbol referenced from
coff64-rs6000.c. Fixed like this:
* aix5ppc-core.c: Remove duplicate prototypes.
(xcoff64_core_file_matches_executable_p): Provide implementation
for !AIX_5_CORE.
* corefile.c (generic_core_file_matches_executable_p): Correct
syntax error in prototype.
* libbfd-in.h (generic_core_file_matches_executable_p): Delete.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
Index: bfd/aix5ppc-core.c
===================================================================
RCS file: /cvs/src/src/bfd/aix5ppc-core.c,v
retrieving revision 1.13
diff -u -p -r1.13 aix5ppc-core.c
--- bfd/aix5ppc-core.c 23 Dec 2005 10:19:40 -0000 1.13
+++ bfd/aix5ppc-core.c 24 Dec 2005 07:23:19 -0000
@@ -23,16 +23,16 @@
#include "bfd.h"
-#ifdef AIX_5_CORE
-
-#include "sysdep.h"
-#include "libbfd.h"
-
const bfd_target *xcoff64_core_p (bfd *);
bfd_boolean xcoff64_core_file_matches_executable_p (bfd *, bfd *);
char *xcoff64_core_file_failing_command (bfd *);
int xcoff64_core_file_failing_signal (bfd *);
+#ifdef AIX_5_CORE
+
+#include "sysdep.h"
+#include "libbfd.h"
+
/* Aix 5.1 system include file. */
/* Need to define this macro so struct ld_info64 get included. */
@@ -318,11 +318,6 @@ xcoff64_core_file_failing_signal (bfd *a
#else /* AIX_5_CORE */
-const bfd_target *xcoff64_core_p (bfd *);
-#define xcoff64_core_file_matches_executable_p generic_core_file_matches_executable_p
-char *xcoff64_core_file_failing_command (bfd *);
-int xcoff64_core_file_failing_signal (bfd *);
-
const bfd_target *
xcoff64_core_p (bfd *abfd ATTRIBUTE_UNUSED)
{
@@ -330,6 +325,12 @@ xcoff64_core_p (bfd *abfd ATTRIBUTE_UNUS
return 0;
}
+bfd_boolean
+xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd)
+{
+ return generic_core_file_matches_executable_p (core_bfd, exec_bfd);
+}
+
char *
xcoff64_core_file_failing_command (bfd *abfd ATTRIBUTE_UNUSED)
{
Index: bfd/corefile.c
===================================================================
RCS file: /cvs/src/src/bfd/corefile.c,v
retrieving revision 1.11
diff -u -p -r1.11 corefile.c
--- bfd/corefile.c 23 Dec 2005 10:19:40 -0000 1.11
+++ bfd/corefile.c 24 Dec 2005 07:23:29 -0000
@@ -114,7 +114,7 @@ FUNCTION
SYNOPSIS
bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd)
+ (bfd *core_bfd, bfd *exec_bfd);
DESCRIPTION
Return TRUE if the core file attached to @var{core_bfd}
Index: bfd/libbfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/libbfd-in.h,v
retrieving revision 1.61
diff -u -p -r1.61 libbfd-in.h
--- bfd/libbfd-in.h 23 Dec 2005 10:19:40 -0000 1.61
+++ bfd/libbfd-in.h 24 Dec 2005 07:23:53 -0000
@@ -247,12 +247,6 @@ extern int _bfd_nocore_core_file_failing
extern bfd_boolean _bfd_nocore_core_file_matches_executable_p
(bfd *, bfd *);
-/* A generic implementation of CORE_FILE_MATCHES_EXECUTABLE_P that
- is independent of the target. */
-
-extern bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE when there is no archive
file support. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive). */
--
Alan Modra
IBM OzLabs - Linux Technology Centre