* aout-encap.c, aoutf1.h, aoutx.h, archive.c, bout.c, coff-a29k.c,
authorSteve Chamberlain <sac@cygnus>
Sun, 1 Dec 1991 05:24:02 +0000 (05:24 +0000)
committerSteve Chamberlain <sac@cygnus>
Sun, 1 Dec 1991 05:24:02 +0000 (05:24 +0000)
coff-h8300.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c,
coff-mips.c, coff-rs6000.c, cpu-h300.c, elf.c, i386aout.c,
newos3.c, stab-syms.c, syms.c: All these files have had their
#includes altered to point to the new places.

bfd/ChangeLog
bfd/aout-encap.c
bfd/aoutf1.h
bfd/aoutx.h
bfd/archive.c
bfd/bout.c
bfd/coff-a29k.c
bfd/cpu-h8300.c
bfd/elf.c

index 5826e95225f4f83686b374f5d8e2cc5405cfbc36..0e806baaf7a00e7d58607d88c659669d6dad0973 100644 (file)
@@ -1,3 +1,11 @@
+Sat Nov 30 21:19:15 1991  Steve Chamberlain  (sac at rtl.cygnus.com)
+
+       * aout-encap.c, aoutf1.h, aoutx.h, archive.c, bout.c, coff-a29k.c,
+       coff-h8300.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c,
+       coff-mips.c, coff-rs6000.c, cpu-h300.c, elf.c, i386aout.c,
+       newos3.c, stab-syms.c, syms.c: All these files have had their
+       #includes altered to point to the new places.
+
 Fri Nov 29 20:04:49 1991  Fred Fish  (fnf at cygnus.com)
 
        * config/mh-i386v4, config/mh-i386-elf, hosts/h-i386v4.h:  New files.
index dc6ba10b821b69cd1eed8a56206d49044b34da21..6565df1f9269008fc7588cabab8bd0464f37f79b 100644 (file)
@@ -37,8 +37,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define N_TXTOFF(x)   ( (N_MAGIC((x)) == ZMAGIC) ? PAGE_SIZE : EXEC_BYTES_SIZE)
 /**************************************************************************/
 
-#include "stab.gnu.h"
-#include "ar.h"
+#include "aout/stab_gnu.h"
+#include "aout/ar.h"
 #include "libaout.h"           /* BFD a.out internal data structures */
 
 bfd_target *encap_callback ();
index d6f28a3fc95ce15ea1237d4b7f7eed41b6a6ea89..491bc541b73b40625697fe1324a46ad2362ef351 100644 (file)
@@ -22,12 +22,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "sysdep.h"
 #include "libbfd.h"
 
-#include <a.out.sun4.h>
-#include "libaout.h"           
+#include "aout/sun4.h"
+#include "libaout.h"           /* BFD a.out internal data structures */
 
-#include "aout64.h"
-#include "stab.gnu.h"
-#include "ar.h"
+#include "aout/aout64.h"
+#include "aout/stab_gnu.h"
+#include "aout/ar.h"
 
 /*
 The file @code{aoutf1.h} contains the code for BFD's
@@ -113,8 +113,10 @@ sunos4_callback (abfd)
   switch (N_MACHTYPE (*exec_hdr (abfd))) {
 
   case M_UNKNOWN:
-    arch = bfd_arch_unknown;
-    machine = 0;
+      /* Some Sun3s make magic numbers without cpu types in them, so
+        we'll default to the 68020. */
+    arch = bfd_arch_m68k;
+    machine = 68020;
     break;
     
   case M_68010:
@@ -168,27 +170,11 @@ sunos4_callback (abfd)
 }
 
 
-static boolean
-DEFUN(sunos_mkobject,(abfd),
-      bfd *abfd)
-{
-    if (NAME(aout,mkobject)(abfd) == false)
-       return false;
-    adata(abfd)->page_size = PAGE_SIZE;
-#ifdef SEGMENT_SIZE
-  adata(abfd)->page_size = SEGMENT_SIZE;
-#else
-  adata(abfd)->segment_size = PAGE_SIZE;
-#endif
-    adata(abfd)->exec_bytes_size = EXEC_BYTES_SIZE;
-    return true;
-}
-
 /* Write an object file in SunOS format.
   Section contents have already been written.  We write the
   file header, symbols, and relocation.  */
 
-boolean
+static boolean
 DEFUN(NAME(aout,sunos4_write_object_contents),
       (abfd),
       bfd *abfd)
@@ -580,68 +566,17 @@ DEFUN(sunos4_core_file_matches_executable_p, (core_bfd, exec_bfd),
                sizeof (struct internal_exec)) == 0) ? true : false;
 }
 \f
-/* We use BFD generic archive files.  */
-#define        aout_32_openr_next_archived_file        bfd_generic_openr_next_archived_file
-#define        aout_32_generic_stat_arch_elt           bfd_generic_stat_arch_elt
-#define        aout_32_slurp_armap                     bfd_slurp_bsd_armap
-#define        aout_32_slurp_extended_name_table       bfd_true
-#define        aout_32_write_armap                     bsd_write_armap
-#define        aout_32_truncate_arname                 bfd_bsd_truncate_arname
-#define aout_32_machine_type                   sunos_machine_type
-
-#define        aout_32_core_file_failing_command       sunos4_core_file_failing_command
-#define        aout_32_core_file_failing_signal        sunos4_core_file_failing_signal
-#define        aout_32_core_file_matches_executable_p  sunos4_core_file_matches_executable_p
-
-
-#define        aout_64_openr_next_archived_file        bfd_generic_openr_next_archived_file
-#define        aout_64_generic_stat_arch_elt           bfd_generic_stat_arch_elt
-#define        aout_64_slurp_armap                     bfd_slurp_bsd_armap
-#define        aout_64_slurp_extended_name_table       bfd_true
-#define        aout_64_write_armap                     bsd_write_armap
-#define        aout_64_truncate_arname                 bfd_bsd_truncate_arname
-#define aout_64_machine_type                   sunos_machine_type
-
-#define        aout_64_core_file_failing_command       sunos4_core_file_failing_command
-#define        aout_64_core_file_failing_signal        sunos4_core_file_failing_signal
-#define        aout_64_core_file_matches_executable_p  sunos4_core_file_matches_executable_p
-
-#define aout_64_bfd_debug_info_start           bfd_void
-#define aout_64_bfd_debug_info_end             bfd_void
-#define aout_64_bfd_debug_info_accumulate      bfd_void
+#define        MY_core_file_failing_command    sunos4_core_file_failing_command
+#define        MY_core_file_failing_signal     sunos4_core_file_failing_signal
+#define        MY_core_file_matches_executable_p sunos4_core_file_matches_executable_p
 
-#define aout_32_bfd_debug_info_start           bfd_void
-#define aout_32_bfd_debug_info_end             bfd_void
-#define aout_32_bfd_debug_info_accumulate      (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
+#define MY_bfd_debug_info_start                bfd_void
+#define MY_bfd_debug_info_end          bfd_void
+#define MY_bfd_debug_info_accumulate   (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
+#define MY_object_p NAME(sunos,object_p)
+#define MY_core_file_p sunos4_core_file_p
+#define MY_write_object_contents NAME(aout,sunos4_write_object_contents)
 
+#define TARGET_IS_BIG_ENDIAN_P
 
-
-/* We implement these routines ourselves, rather than using the generic
-a.out versions.  */
-#define        aout_write_object_contents      sunos4_write_object_contents
-
-bfd_target VECNAME =
-  {
-    TARGETNAME,
-    bfd_target_aout_flavour,
-    true,                      /* target byte order */
-    true,                      /* target headers byte order */
-    (HAS_RELOC | EXEC_P |      /* object flags */
-     HAS_LINENO | HAS_DEBUG |
-     HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
-    (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
-    ' ',                                                  /* ar_pad_char */
-    16,                                                           /* ar_max_namelen */
-    3,                                                    /* minimum alignment power */
-    _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* data */
-    _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdrs */
-    
-      {_bfd_dummy_target, NAME(sunos,object_p),
-       bfd_generic_archive_p, sunos4_core_file_p},
-      {bfd_false, sunos_mkobject,
-       _bfd_generic_mkarchive, bfd_false},
-      {bfd_false, NAME(aout,sunos4_write_object_contents), /* bfd_write_contents */
-       _bfd_write_archive_contents, bfd_false},
-    
-    JUMP_TABLE(JNAME(aout))
-    };
+#include "aout-target.h"
index f9fe46049b62ca33fb630c5ce502d6b6b601aadd..abc3dfb23a08ebc33ce8439b8ff1c53ffb5e6a35 100644 (file)
@@ -116,9 +116,9 @@ selected.
 struct external_exec;
 #include "libaout.h"
 #include "libbfd.h"
-#include "aout64.h"
-#include "stab.gnu.h"
-#include "ar.h"
+#include "aout/aout64.h"
+#include "aout/stab_gnu.h"
+#include "aout/ar.h"
 
 void (*bfd_error_trap)();
 
index 2bfc70b7542a7ae9d1fc634bdbdbde855b7b4867..c66fe0f3d5a48c4f44088a68213a25173741881f 100644 (file)
@@ -47,8 +47,8 @@ DESCRIPTION
 #include "bfd.h"
 #include "sysdep.h"
 #include "libbfd.h"
-#include "ar.h"
-#include "ranlib.h"
+#include "aout/ar.h"
+#include "aout/ranlib.h"
 
 #ifdef GNU960
 #define BFD_GNU960_ARMAG(abfd) (BFD_COFF_FILE_P((abfd)) ? ARMAG : ARMAGB)
index baa2ab27b39618cac8e4905aa5c221221f342c26..25609e28744905d1e6469ddc14838a623971b193 100644 (file)
@@ -26,15 +26,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "bout.h"
 
-#include "stab.gnu.h"
+#include "aout/stab_gnu.h"
 #include "libaout.h"           /* BFD a.out internal data structures */
 
-/* Align an address by rounding it up to a power of two.  It leaves the
-   address unchanged if align == 0 (2^0 = alignment of 1 byte) */
-#define        i960_align(addr, align) \
-       ( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
-
-
 PROTO (static boolean, b_out_squirt_out_relocs,(bfd *abfd, asection *section));
 PROTO (static bfd_target *, b_out_callback, (bfd *));
 
@@ -160,7 +154,7 @@ b_out_callback (abfd)
   obj_textsec (abfd)->vma = execp->a_tload;
   obj_datasec (abfd)->vma = execp->a_dload;
   bss_start = execp->a_dload + execp->a_data; /* BSS = end of data section */
-  obj_bsssec (abfd)->vma = i960_align (bss_start, execp->a_balign);
+  obj_bsssec (abfd)->vma = align_power (bss_start, execp->a_balign);
 
   /* The file positions of the sections */
   obj_textsec (abfd)->filepos = N_TXTOFF(*execp);
@@ -170,6 +164,10 @@ b_out_callback (abfd)
   obj_textsec (abfd)->rel_filepos = N_TROFF(*execp);
   obj_datasec (abfd)->rel_filepos =  N_DROFF(*execp);
 
+  adata(abfd)->page_size = 1; /* Not applicable. */
+  adata(abfd)->segment_size = 1; /* Not applicable. */
+  adata(abfd)->exec_bytes_size = EXEC_BYTES_SIZE;
+
   return abfd->xvec;
 }
 
@@ -345,12 +343,12 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
   bfd_seek (abfd, (long)(asect->rel_filepos), SEEK_SET);
   count = reloc_size / sizeof (struct relocation_info);
 
-  relocs = (struct relocation_info *) malloc (reloc_size);
+  relocs = (struct relocation_info *) bfd_xmalloc (reloc_size);
   if (!relocs) {
     bfd_error = no_memory;
     return false;
   }
-  reloc_cache = (arelent *) malloc ((count+1) * sizeof (arelent));
+  reloc_cache = (arelent *) bfd_xmalloc ((count+1) * sizeof (arelent));
   if (!reloc_cache) {
     free ((char*)relocs);
     bfd_error = no_memory;
@@ -468,7 +466,7 @@ b_out_squirt_out_relocs (abfd, section)
   int extern_mask, pcrel_mask,  len_2, callj_mask;
   if (count == 0) return true;
   generic   = section->orelocation;
-  native = ((struct relocation_info *) malloc (natsize));
+  native = ((struct relocation_info *) bfd_xmalloc (natsize));
   if (!native) {
     bfd_error = no_memory;
     return false;
@@ -679,8 +677,8 @@ DEFUN(b_out_sizeof_headers,(ignore_abfd, ignore),
 /* Build the transfer vectors for Big and Little-Endian B.OUT files.  */
 
 /* We don't have core files.  */
-#define        aout_32_core_file_failing_command       _bfd_dummy_core_file_failing_command
-#define        aout_32_core_file_failing_signal        _bfd_dummy_core_file_failing_signal
+#define        aout_32_core_file_failing_command _bfd_dummy_core_file_failing_command
+#define        aout_32_core_file_failing_signal _bfd_dummy_core_file_failing_signal
 #define        aout_32_core_file_matches_executable_p  \
                                _bfd_dummy_core_file_matches_executable_p
 
index 10fceaf6bbd9eb2ef30cf13d5062c36c6cc413bf..0ba2f49d7ed6faf1a350acc08b335f78c6966b13 100644 (file)
@@ -26,8 +26,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "sysdep.h"
 #include "libbfd.h"
 #include "obstack.h"
-#include "coff-a29k.h"
-#include "internalcoff.h"
+#include "coff/a29k.h"
+#include "coff/internal.h"
 #include "libcoff.h"
 
 #define INSERT_HWORD(WORD,HWORD)       \
index 931c3c10fc2a8778471ad5a4b2fa51f5d3f90475..a5db4773a8403dc4b9660881f49bc37e9f29cee3 100644 (file)
@@ -23,7 +23,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "libbfd.h"
 
 #define DEFINE_TABLE 
-#include "h8300-opcode.h"
+#include "opcode/h8300.h"
 
 #define MAXSAME 14
 
index 66ce03914690a5797494ea6cbb33aaa5d76bc431..e276ad54a83b6d875fffb1eb9946212b899765df 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -72,9 +72,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "sysdep.h"
 #include "libbfd.h"
 #include "obstack.h"
-#include "elf-common.h"
-#include "elf-internal.h"
-#include "elf-external.h"
+#include "elf/common.h"
+#include "elf/internal.h"
+#include "elf/external.h"
 
 #ifdef HAVE_PROCFS     /* Some core file support requires host /proc files */
 #include <sys/procfs.h>