aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1991-12-01 05:24:02 +0000
committerSteve Chamberlain <sac@cygnus>1991-12-01 05:24:02 +0000
commitc3eb25fc2533987ff51218efc12267fe51545070 (patch)
treef4af1f5c70e87694e2cc07f3f95ad28ecb1132f0 /bfd
parent11eab90c7f7aa1d6be4c2e4becd84d654b715a11 (diff)
downloadfsf-binutils-gdb-c3eb25fc2533987ff51218efc12267fe51545070.zip
fsf-binutils-gdb-c3eb25fc2533987ff51218efc12267fe51545070.tar.gz
fsf-binutils-gdb-c3eb25fc2533987ff51218efc12267fe51545070.tar.bz2
* 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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/aout-encap.c4
-rw-r--r--bfd/aoutf1.h107
-rw-r--r--bfd/aoutx.h6
-rw-r--r--bfd/archive.c4
-rw-r--r--bfd/bout.c24
-rw-r--r--bfd/coff-a29k.c4
-rw-r--r--bfd/cpu-h8300.c2
-rw-r--r--bfd/elf.c6
9 files changed, 53 insertions, 112 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5826e95..0e806ba 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/aout-encap.c b/bfd/aout-encap.c
index dc6ba10..6565df1 100644
--- a/bfd/aout-encap.c
+++ b/bfd/aout-encap.c
@@ -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 ();
diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h
index d6f28a3..491bc54 100644
--- a/bfd/aoutf1.h
+++ b/bfd/aoutf1.h
@@ -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;
}
-/* 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"
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index f9fe460..abc3dfb 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -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)();
diff --git a/bfd/archive.c b/bfd/archive.c
index 2bfc70b..c66fe0f 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -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)
diff --git a/bfd/bout.c b/bfd/bout.c
index baa2ab2..25609e2 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -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
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c
index 10fceaf..0ba2f49 100644
--- a/bfd/coff-a29k.c
+++ b/bfd/coff-a29k.c
@@ -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) \
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index 931c3c1..a5db477 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -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
diff --git a/bfd/elf.c b/bfd/elf.c
index 66ce039..e276ad5 100644
--- 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>