* The following patches are from Jeffrey Law <law@cs.utah.edu>.
authorStu Grossman <grossman@cygnus>
Sat, 1 May 1993 00:57:03 +0000 (00:57 +0000)
committerStu Grossman <grossman@cygnus>
Sat, 1 May 1993 00:57:03 +0000 (00:57 +0000)
* hppa.c (hppa_core_file_p): Provide a temporary dummy routine
for HOST_HPPABSD.
* bfd/hosts/hppabsd.h: Fix declarations of malloc and free.
* bfd/libhppa.h: Include sysdep here.  Conditionalize
includes based on HOST_HPPAHPUX or HOST_HPPABSD.
Provide definitions for MAXCOMLEN and _PA_RISC_ID suitable
for BSD.

bfd/ChangeLog
bfd/hosts/hppabsd.h
bfd/hosts/hppahpux.h
bfd/hppa.c
bfd/libhppa.h

index 7f0f36e1835920d8339831fd30e0e5f479cb139f..ac925f9bb9240d7bc2a2ac6463d6ba5bac9be78c 100644 (file)
@@ -1,3 +1,14 @@
+Fri Apr 30 17:25:23 1993  Stu Grossman  (grossman@cygnus.com)
+
+       * The following patches are from Jeffrey Law <law@cs.utah.edu>.
+       * hppa.c (hppa_core_file_p): Provide a temporary dummy routine
+       for HOST_HPPABSD.
+       * bfd/hosts/hppabsd.h: Fix declarations of malloc and free.
+       * bfd/libhppa.h: Include sysdep here.  Conditionalize
+       includes based on HOST_HPPAHPUX or HOST_HPPABSD.
+       Provide definitions for MAXCOMLEN and _PA_RISC_ID suitable
+       for BSD.
+
 Fri Apr 30 17:34:11 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
 
        * elf32-hppa.c: Don't include a.out.h.  Apparently not even the
index 8c9ef1164495986a444d4742b599aae96f8002dd..5f786a8acdcf08895aa371ad36112fae179d53f7 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _HPPABSD_H
+#define _HPPABSD_H
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdio.h>
@@ -7,8 +10,8 @@
 #include <string.h>
 #include <sys/file.h>
 
-void *malloc();
-void free();
+extern PTR  EXFUN(malloc,(unsigned));
+extern void EXFUN(free, (PTR));
 
 #define HOST_HPPABSD
 
@@ -46,3 +49,5 @@ typedef unsigned short uint16_type;
 typedef int int32_type;
 typedef unsigned int uint32_type;
 #include "fopen-same.h"
+
+#endif /* _HPPABSD_H */
index f58bd7e2345a4d8e23aed76393cb23b2f45c3d87..5f5e7c31a35427973672df78d2de62f918fcbf11 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef _HPPAHPUX_H
+#define _HPPAHPUX_H
+
 #include <fcntl.h>
 #include <errno.h>
 #include <stdio.h>
@@ -51,3 +54,5 @@ typedef int int32_type;
 typedef unsigned int uint32_type;
 
 #include "fopen-same.h"
+
+#endif /* _HPPAHPUX_H */
index 113a1e38b86cc8c958191bbb257b08949ebd909b..8cdfff1ab8fb13aa5162f9fa498d96e76c7a7b34 100644 (file)
@@ -43,18 +43,23 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #ifndef CPU_PA_RISC1_0
 #define CPU_PA_RISC1_0 0x20B
 #endif /* CPU_PA_RISC1_0 */
+
 #ifndef CPU_PA_RISC1_1
 #define CPU_PA_RISC1_1 0x210
 #endif /* CPU_PA_RISC1_1 */
+
 #ifndef _PA_RISC1_0_ID
 #define _PA_RISC1_0_ID CPU_PA_RISC1_0
 #endif /* _PA_RISC1_0_ID */
+
 #ifndef _PA_RISC1_1_ID
 #define _PA_RISC1_1_ID CPU_PA_RISC1_1
 #endif /* _PA_RISC1_1_ID */
+
 #ifndef _PA_RISC_MAXID
 #define _PA_RISC_MAXID 0x2FF
 #endif /* _PA_RISC_MAXID */
+
 #ifndef _PA_RISC_ID
 #define _PA_RISC_ID(__m_num)           \
     (((__m_num) == _PA_RISC1_0_ID) ||  \
@@ -523,6 +528,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, alignment_power)
   return asect;
 }
 
+#ifdef HOST_HPPAHPUX
 static bfd_target *
 hppa_core_file_p (abfd)
      bfd *abfd;
@@ -621,13 +627,22 @@ hppa_core_file_matches_executable_p  (core_bfd, exec_bfd)
 {
   return true;          /* FIXME, We have no way of telling at this point */
 }
+#endif /* HOST_HPPAHPUX */
+
+#ifdef HOST_HPPABSD
+  /* All the core file code for BSD needs to be rewritten cleanly.  For
+     now we do not support core files under BSD.  */
+
+#define hppa_core_file_p _bfd_dummy_target
+#define hppa_core_file_failing_command _bfd_dummy_core_file_failing_command
+#define hppa_core_file_failing_signal _bfd_dummy_core_file_failing_signal
+#define hppa_core_file_matches_executable_p _bfd_dummy_core_file_matches_executable_p
+#endif /* HOST_HPPABSD */
 
 #define hppa_bfd_debug_info_start        bfd_void
 #define hppa_bfd_debug_info_end          bfd_void
 #define hppa_bfd_debug_info_accumulate   (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
 
-
-
 #define hppa_openr_next_archived_file    bfd_generic_openr_next_archived_file
 #define hppa_generic_stat_arch_elt       bfd_generic_stat_arch_elt
 #define hppa_slurp_armap                  bfd_false
index 830e5cb38fdd80823c5210efd47677dba42aef90..76b096e9ce49a51247c534ecc5cd90f101f50d89 100644 (file)
@@ -20,9 +20,32 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
+#ifndef _LIBHPPA_H
+#define _LIBHPPA_H
+
+#include "sysdep.h"
+
+#ifdef HOST_HPPAHPUX
+
 #include <sys/core.h>
 #include <sys/utsname.h>
 
+#endif /* HOST_HPPAHPUX */
+
+#ifdef HOST_HPPABSD
+
+/* Defining MAXCOMLEN avoids bringing in several (7 or 8) otherwise
+   useless include files which tend to clutter up the namespace.  
+
+   BSD uses a completely different scheme for object file identification.
+   so for now, define _PA_RISC_ID to accept any random value for a model
+   number.  */
+#include <a.out.h>
+#define MAXCOMLEN 16
+#define _PA_RISC_ID(__m_num) 1
+
+#endif /* HOST_HPPABSD */
+
 #define BYTES_IN_WORD 4
 
 struct header;
@@ -157,3 +180,5 @@ enum hppa_reloc_expr_type_alt
        e_plabel = R_HPPA_E_PLABEL,
        e_abs   = R_HPPA_E_ABS
 };
+
+#endif /* _LIBHPPA_H */