aboutsummaryrefslogtreecommitdiff
path: root/bfd/newsos3.c
diff options
context:
space:
mode:
authorSteve Chamberlain <steve@cygnus>1991-07-04 16:52:56 +0000
committerSteve Chamberlain <steve@cygnus>1991-07-04 16:52:56 +0000
commit6f715d66ad223169971e668f968db6774c41e52a (patch)
treeba2ed95455971316e40110307b839a3dccd06cdb /bfd/newsos3.c
parent985fca129365a7bfa8e8e91b4d8b57d65f308583 (diff)
downloadgdb-6f715d66ad223169971e668f968db6774c41e52a.zip
gdb-6f715d66ad223169971e668f968db6774c41e52a.tar.gz
gdb-6f715d66ad223169971e668f968db6774c41e52a.tar.bz2
Now full of documentation. Yum Yum.
Diffstat (limited to 'bfd/newsos3.c')
-rw-r--r--bfd/newsos3.c61
1 files changed, 44 insertions, 17 deletions
diff --git a/bfd/newsos3.c b/bfd/newsos3.c
index a14a91c..e16648f 100644
--- a/bfd/newsos3.c
+++ b/bfd/newsos3.c
@@ -31,16 +31,22 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "bfd.h"
#include "libbfd.h"
#include "aout64.h"
+
+/**From: bothner@cs.wisc.edu***********************************************/
+#undef N_TXTOFF
+#define N_TXTOFF(x) ( (N_MAGIC((x)) == ZMAGIC) ? PAGE_SIZE : EXEC_BYTES_SIZE)
+/**************************************************************************/
+
#include "stab.gnu.h"
#include "ar.h"
#include "libaout.h" /* BFD a.out internal data structures */
-
+#if 0
int vfprintf(file, format, args) /* Temporary crock! */
FILE *file; char *format; char *args;
{
return _doprnt (format, args, file);
}
-
+#endif
bfd_target *newsos3_callback ();
@@ -49,7 +55,7 @@ bfd_target *
DEFUN(newsos3_object_p,(abfd),
bfd *abfd)
{
- unsigned char magicbuf[LONG_SIZE]; /* Raw bytes of magic number from file */
+ unsigned char magicbuf[4]; /* Raw bytes of magic number from file */
unsigned long magic; /* Swapped magic number */
bfd_error = system_call_error;
@@ -99,19 +105,40 @@ DEFUN(newsos3_write_object_contents,(abfd),
/* Transfer vectors for NEWS-OS version 3 */
/* 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 newsos_openr_next_archived_file bfd_generic_openr_next_archived_file
+#define newsos_generic_stat_arch_elt bfd_generic_stat_arch_elt
+#define newsos_slurp_armap bfd_slurp_bsd_armap
+#define newsos_slurp_extended_name_table bfd_true
+#define newsos_write_armap bsd_write_armap
+#define newsos_truncate_arname bfd_bsd_truncate_arname
/* We don't support core files yet. FIXME. */
-#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 \
+#define newsos_core_file_failing_command _bfd_dummy_core_file_failing_command
+#define newsos_core_file_failing_signal _bfd_dummy_core_file_failing_signal
+#define newsos_core_file_matches_executable_p \
_bfd_dummy_core_file_matches_executable_p
-#define aout_32_core_file_p _bfd_dummy_target
+#define newsos_core_file_p _bfd_dummy_target
+
+#define newsos_bfd_debug_info_start bfd_void
+#define newsos_bfd_debug_info_end bfd_void
+#define newsos_bfd_debug_info_accumulate bfd_void
+
+#define newsos_mkobject aout_32_mkobject
+#define newsos_close_and_cleanup aout_32_close_and_cleanup
+#define newsos_set_section_contents aout_32_set_section_contents
+#define newsos_get_section_contents aout_32_get_section_contents
+#define newsos_new_section_hook aout_32_new_section_hook
+#define newsos_get_symtab_upper_bound aout_32_get_symtab_upper_bound
+#define newsos_get_symtab aout_32_get_symtab
+#define newsos_get_reloc_upper_bound aout_32_get_reloc_upper_bound
+#define newsos_canonicalize_reloc aout_32_canonicalize_reloc
+#define newsos_make_empty_symbol aout_32_make_empty_symbol
+#define newsos_print_symbol aout_32_print_symbol
+#define newsos_get_lineno aout_32_get_lineno
+#define newsos_set_arch_mach aout_32_set_arch_mach
+#define newsos_find_nearest_line aout_32_find_nearest_line
+#define newsos_sizeof_headers aout_32_sizeof_headers
+
/* We define our own versions of these routines. */
@@ -128,16 +155,16 @@ bfd_target newsos3_vec = /* Sony 68k-based machines running newos3 */
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
-
+ 1, /* minimum alignment */
_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, newsos3_object_p, /* bfd_check_format */
- bfd_generic_archive_p, aout_32_core_file_p},
- {bfd_false, aout_32_mkobject, /* bfd_set_format */
+ bfd_generic_archive_p, newsos_core_file_p},
+ {bfd_false, newsos_mkobject, /* bfd_set_format */
_bfd_generic_mkarchive, bfd_false},
{bfd_false, newsos3_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
- JUMP_TABLE(aout_32)
+ JUMP_TABLE(newsos)
};