aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-05-30 22:33:01 +0000
committerSteve Chamberlain <steve@cygnus>1991-05-30 22:33:01 +0000
commit2700c3c75a601134e071086f677dfc6efe61e067 (patch)
tree1d9248bd2fe28d0802678212c6160074556ce0d3 /bfd
parent4ffd30479f7a84b27895bae9cf27e9ae6354321a (diff)
downloadgdb-2700c3c75a601134e071086f677dfc6efe61e067.zip
gdb-2700c3c75a601134e071086f677dfc6efe61e067.tar.gz
gdb-2700c3c75a601134e071086f677dfc6efe61e067.tar.bz2
*** empty log message ***
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/coff-i386.c3
-rw-r--r--bfd/coff-i960.c3
-rw-r--r--bfd/coff-m88k.c5
-rw-r--r--bfd/coff-mips.c3
-rw-r--r--bfd/coffcode.h114
6 files changed, 39 insertions, 97 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f04bfe5..05695e7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+Thu May 30 15:30:10 1991 Steve Chamberlain (steve at cygint.cygnus.com)
+
+ *../include/i386coff.h : fixed typo in type field with size
+
+ * i386coff.c icoff.c m88k-bcs.c ecoff.c ../include/bfd.h : Added
+ support in the jump table for the swapping routines exported to
+ gdb. Now gdb works with the 386.
+
Tue May 28 17:21:43 1991 John Gilmore (gnu at cygint.cygnus.com)
* Merge in changes from gdb-3.95 release.
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 103de4b..72990b3 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -93,7 +93,8 @@ _do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* hdrs
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
- JUMP_TABLE(coff)
+ JUMP_TABLE(coff),
+ COFF_SWAP_TABLE
};
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index f2f2422..4c3b7e1 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -195,5 +195,6 @@ _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdrs
_bfd_generic_mkarchive, bfd_false},
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
- JUMP_TABLE(coff)
+ JUMP_TABLE(coff),
+COFF_SWAP_TABLE
};
diff --git a/bfd/coff-m88k.c b/bfd/coff-m88k.c
index 71a4497..511dfff 100644
--- a/bfd/coff-m88k.c
+++ b/bfd/coff-m88k.c
@@ -82,7 +82,7 @@ static reloc_howto_type howto_table[] =
#define BADMAG(x) MC88BADMAG(x)
-#include "coff-code.h"
+#include "coffcode.h"
@@ -115,5 +115,6 @@ _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdr
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
- JUMP_TABLE(coff)
+ JUMP_TABLE(coff),
+COFF_SWAP_TABLE
};
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index abfea6a..4e16150 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -85,5 +85,6 @@ _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdrs
bfd_false},
{bfd_false, coff_write_object_contents, /* bfd_write_contents */
bfd_false, bfd_false},
- JUMP_TABLE(coff)
+ JUMP_TABLE(coff),
+ COFF_SWAP_TABLE
};
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index ee3edc2..8e6627b 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -78,8 +78,7 @@ DEFUN(set_index,(symbol, idx),
*/
-GDB_EXPORT
-void
+static void
DEFUN(bfd_swap_reloc_in,(abfd, reloc_src, reloc_dst),
bfd *abfd AND
RELOC *reloc_src AND
@@ -93,8 +92,8 @@ DEFUN(bfd_swap_reloc_in,(abfd, reloc_src, reloc_dst),
#endif
}
-GDB_EXPORT
- void
+
+static void
DEFUN(bfd_swap_reloc_out,(abfd, reloc_src, reloc_dst),
bfd *abfd AND
struct internal_reloc *reloc_src AND
@@ -109,7 +108,7 @@ DEFUN(bfd_swap_reloc_out,(abfd, reloc_src, reloc_dst),
}
-GDB_EXPORT void
+static void
DEFUN(bfd_swap_filehdr_in,(abfd, filehdr_src, filehdr_dst),
bfd *abfd AND
FILHDR *filehdr_src AND
@@ -140,9 +139,9 @@ DEFUN(bfd_swap_filehdr_out,(abfd, filehdr_in, filehdr_out),
}
-GDB_EXPORT
-void
-DEFUN(bfd_coff_swap_sym_in,(abfd, ext, in),
+
+static void
+DEFUN(coff_swap_sym_in,(abfd, ext, in),
bfd *abfd AND
SYMENT *ext AND
struct internal_syment *in)
@@ -167,7 +166,7 @@ DEFUN(bfd_coff_swap_sym_in,(abfd, ext, in),
}
GDB_EXPORT void
-DEFUN(bfd_coff_swap_sym_out,(abfd,in, ext),
+DEFUN(coff_swap_sym_out,(abfd,in, ext),
bfd *abfd AND
struct internal_syment *in AND
SYMENT *ext)
@@ -193,8 +192,8 @@ DEFUN(bfd_coff_swap_sym_out,(abfd,in, ext),
bfd_h_put_8(abfd, in->n_numaux , ext->e_numaux);
}
-GDB_EXPORT void
-DEFUN(bfd_coff_swap_aux_in,(abfd, ext, type, class, in),
+static void
+DEFUN(coff_swap_aux_in,(abfd, ext, type, class, in),
bfd *abfd AND
AUXENT *ext AND
int type AND
@@ -245,7 +244,7 @@ DEFUN(bfd_coff_swap_aux_in,(abfd, ext, type, class, in),
}
GDB_EXPORT void
-DEFUN(bfd_coff_swap_aux_out,(abfd, in, type, class, ext),
+DEFUN(coff_swap_aux_out,(abfd, in, type, class, ext),
bfd *abfd AND
union internal_auxent *in AND
int type AND
@@ -296,7 +295,7 @@ DEFUN(bfd_coff_swap_aux_out,(abfd, in, type, class, ext),
}
GDB_EXPORT void
-DEFUN(bfd_coff_swap_lineno_in,(abfd, ext, in),
+DEFUN(coff_swap_lineno_in,(abfd, ext, in),
bfd *abfd AND
LINENO *ext AND
struct internal_lineno *in)
@@ -306,7 +305,7 @@ DEFUN(bfd_coff_swap_lineno_in,(abfd, ext, in),
}
GDB_EXPORT void
-DEFUN(bfd_coff_swap_lineno_out,(abfd, in, ext),
+DEFUN(coff_swap_lineno_out,(abfd, in, ext),
bfd *abfd AND
struct internal_lineno *in AND
struct external_lineno *ext)
@@ -357,7 +356,7 @@ DEFUN(bfd_swap_aouthdr_out,(abfd, aouthdr_in, aouthdr_out),
}
GDB_EXPORT void
-DEFUN(bfd_coff_swap_scnhdr_in,(abfd, scnhdr_ext, scnhdr_int),
+DEFUN(coff_swap_scnhdr_in,(abfd, scnhdr_ext, scnhdr_int),
bfd *abfd AND
SCNHDR *scnhdr_ext AND
struct internal_scnhdr *scnhdr_int)
@@ -541,7 +540,7 @@ DEFUN(coff_real_object_p,(abfd, nscns, internal_f, internal_a),
unsigned int i;
for (i = 0; i < nscns; i++) {
struct internal_scnhdr tmp;
- bfd_coff_swap_scnhdr_in(abfd, external_sections + i, &tmp);
+ coff_swap_scnhdr_in(abfd, external_sections + i, &tmp);
make_a_section_from_file(abfd,&tmp);
}
}
@@ -1123,12 +1122,12 @@ bfd *abfd)
int type = native->n_type;
int class = native->n_sclass;
SYMENT buf;
- bfd_coff_swap_sym_out(abfd, native, &buf);
+ coff_swap_sym_out(abfd, native, &buf);
bfd_write((PTR)& buf, 1, SYMESZ, abfd);
for (j = 0; j != native->n_numaux;
j++) {
AUXENT buf1;
- bfd_coff_swap_aux_out(abfd,
+ coff_swap_aux_out(abfd,
(union internal_auxent *)(native + j + 1), type, class, &buf1);
bfd_write((PTR) (native + j + 1), 1, AUXESZ, abfd);
}
@@ -1221,13 +1220,13 @@ DEFUN(coff_write_linenumbers,(abfd),
bzero( (PTR)&out, sizeof(out));
out.l_lnno = 0;
out.l_addr.l_symndx = l->u.offset;
- bfd_coff_swap_lineno_out(abfd, &out, &buff);
+ coff_swap_lineno_out(abfd, &out, &buff);
bfd_write((PTR) &buff, 1, LINESZ, abfd);
l++;
while (l->line_number) {
out.l_lnno = l->line_number;
out.l_addr.l_symndx = l->u.offset;
- bfd_coff_swap_lineno_out(abfd, &out, &buff);
+ coff_swap_lineno_out(abfd, &out, &buff);
bfd_write((PTR) &buff, 1, LINESZ, abfd);
l++;
}
@@ -1825,29 +1824,6 @@ DEFUN(offset_symbol_indices,(abfd, symtab, count, offset),
return;
} /* offset_symbol_indices() */
-#if 0
-/* swap the entire symbol table - we c*/
-static void
-swap_raw_symtab(abfd, raw_symtab)
-bfd *abfd;
-SYMENT *raw_symtab;
- {
- long i;
- SYMENT *end = raw_symtab + bfd_get_symcount(abfd);
- for (; raw_symtab < end; ++raw_symtab) {
- bfd_coff_swap_sym(abfd, raw_symtab);
-
- for (i = raw_symtab->n_numaux; i; --i, ++raw_symtab) {
- bfd_coff_swap_aux(abfd,
- (AUXENT *)(raw_symtab + 1),
- raw_symtab->n_type,
- raw_symtab->n_sclass);
- } /* swap all the aux entries */
- } /* walk the symbol table */
-
- return;
- } /* swap_raw_symtab() */
-#endif
/*
read a symbol table into freshly mallocated memory, swap it, and knit the
symbol names into a normalized form. By normalized here I mean that all
@@ -1901,9 +1877,9 @@ bfd *abfd)
/* Swap all the raw entries */
for (raw_src = raw, internal_ptr = internal; raw_src < raw_end; raw_src++, internal_ptr++) {
unsigned int i;
- bfd_coff_swap_sym_in(abfd, raw_src,internal_ptr);
+ coff_swap_sym_in(abfd, raw_src,internal_ptr);
for (i = internal_ptr->n_numaux; i; --i, raw_src++, internal_ptr++) {
- bfd_coff_swap_aux_in(abfd, (AUXENT *)(raw_src +1), internal_ptr->n_type,
+ coff_swap_aux_in(abfd, (AUXENT *)(raw_src +1), internal_ptr->n_type,
internal_ptr->n_sclass, (union
internal_auxent *)(internal_ptr +1));
}
@@ -2043,7 +2019,7 @@ asection *asect;
while (counter < asect->lineno_count) {
struct internal_lineno dst;
- bfd_coff_swap_lineno_in(abfd, src, &dst);
+ coff_swap_lineno_in(abfd, src, &dst);
cache_ptr->line_number = dst.l_lnno;
if (cache_ptr->line_number == 0) {
@@ -2071,52 +2047,6 @@ asection *asect;
return true;
} /* coff_slurp_line_table() */
-#if 0
-static struct internal_syment *
-DEFUN(find_next_file_symbol,(abfd, current, end),
- bfd *abfd AND
- struct internal_syment *current AND
- struct internal_syment *end)
-{
- current += current->n_numaux + 1;
-
- while (current < end) {
- if (current->n_sclass== C_FILE) {
- return (current);
- }
- current += current->n_numaux + 1;
- }
- return end;
-}
-#endif
-
-/*
-Note that C_FILE symbols can, and some do, have more than 1 aux entry.
-*/
-#if 0
-static void
-DEFUN(force_indices_file_symbol_relative,(abfd, symtab),
- bfd *abfd AND
- struct internal_syment *symtab)
-{
- struct internal_syment *end = symtab + bfd_get_symcount(abfd);
- struct internal_syment *current;
- struct internal_syment *next;
- /* the first symbol had damn well better be a C_FILE. */
- BFD_ASSERT(symtab->n_sclass == C_FILE);
-
- for (current = find_next_file_symbol(abfd, symtab, end);
- current < end;
- current = next) {
- offset_symbol_indices(abfd, current,
- ((next =
- find_next_file_symbol(abfd, current,
- end)) - current),
- symtab - current);
- }
- return;
-}
-#endif
static boolean
DEFUN(coff_slurp_symbol_table,(abfd),
bfd *abfd)