mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 12:39:59 +00:00
* i386dynix.c, config/i386-dynix.mt: New files, handling Dynix
variant of a.out. * configure.in, config.bfd: Use them for Dynix. * Makefile.in: Add dependencies for i386dynix.o. * targets.c: Add definition for i386dynix_vec.
This commit is contained in:
parent
374bc5d7de
commit
bdf1b51158
@ -153,6 +153,7 @@ hppabsd-core.c
|
||||
hpux-core.c
|
||||
i386aout.c
|
||||
i386bsd.c
|
||||
i386dynix.c
|
||||
i386linux.c
|
||||
i386lynx.c
|
||||
i386mach3.c
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* i386dynix.c, config/i386-dynix.mt: New files, handling Dynix
|
||||
variant of a.out.
|
||||
* configure.in, config.bfd: Use them for Dynix.
|
||||
* Makefile.in: Add dependencies for i386dynix.o.
|
||||
* targets.c: Add definition for i386dynix_vec.
|
||||
* hosts/symmetry.h: Do not define TRAD_CORE_USER_OFFSET for Dynix.
|
||||
Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
|
||||
for Dynix. Remove inclusion of dynix3.h, Dynix bfd is now handled by
|
||||
i386dynix.c
|
||||
|
||||
Mon Mar 28 12:53:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.
|
||||
|
@ -229,7 +229,7 @@ CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c \
|
||||
coff-m88k.c coff-mips.c coff-sh.c trad-core.c cisco-core.c newsos3.c \
|
||||
i386aout.c i386linux.c netbsd386.c i386mach3.c i386os9k.c \
|
||||
bout.c aout-adobe.c coff-we32k.c \
|
||||
i386bsd.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \
|
||||
i386bsd.c i386dynix.c cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c \
|
||||
cpu-m88k.c cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c cpu-powerpc.c \
|
||||
cpu-rs6000.c coff-h8300.c som.c cpu-hppa.c cpu-we32k.c reloc16.c \
|
||||
mipsbsd.c cpu-sh.c \
|
||||
@ -602,6 +602,9 @@ coff-we32k.o : coff-we32k.c $(INCDIR)/coff/we32k.h \
|
||||
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
|
||||
i386bsd.o : i386bsd.c libaout.h aout-target.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
i386dynix.o : i386dynix.c libaout.h aout-target.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/dynix3.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
|
||||
$(INCDIR)/aout/ar.h
|
||||
cpu-h8300.o : cpu-h8300.c
|
||||
cpu-i960.o : cpu-i960.c
|
||||
cpu-sparc.o : cpu-sparc.c
|
||||
|
@ -35,6 +35,7 @@ case "${canon}" in
|
||||
i[34]86-*-sysv*) bfd_name=i386-coff ;;
|
||||
i[34]86-*-isc*) bfd_name=i386-coff ;;
|
||||
i[34]86-*-sco*) bfd_name=i386-coff ;;
|
||||
i[34]86-sequent-bsd*) bfd_name=i386-dynix ;;
|
||||
i[34]86-*-bsd*) bfd_name=i386-bsd ;;
|
||||
i[34]86-*-coff) bfd_name=i386-coff ;;
|
||||
i[34]86-*-aix*) bfd_name=i386-coff ;;
|
||||
|
76
bfd/i386dynix.c
Normal file
76
bfd/i386dynix.c
Normal file
@ -0,0 +1,76 @@
|
||||
/* BFD back-end for i386 a.out binaries under dynix.
|
||||
Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
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. */
|
||||
|
||||
/* This BFD is currently only tested with gdb, writing object files
|
||||
may not work. */
|
||||
|
||||
#define BYTES_IN_WORD 4
|
||||
#define ARCH 32
|
||||
|
||||
#define TEXT_START_ADDR 4096
|
||||
#define PAGE_SIZE 4096
|
||||
#define SEGMENT_SIZE PAGE_SIZE
|
||||
|
||||
#include "aout/dynix3.h"
|
||||
|
||||
#define DEFAULT_ARCH bfd_arch_i386
|
||||
#define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN)
|
||||
|
||||
#define MY(OP) CAT(i386dynix_,OP)
|
||||
#define TARGETNAME "a.out-i386-dynix"
|
||||
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
#include "libbfd.h"
|
||||
#include "libaout.h"
|
||||
|
||||
/* (Ab)use some fields in the internal exec header to be able to read
|
||||
executables that contain shared data. */
|
||||
|
||||
#define a_shdata a_tload
|
||||
#define a_shdrsize a_dload
|
||||
#define aout_32_swap_exec_header_in dynix_swap_exec_header_in
|
||||
|
||||
void
|
||||
dynix_swap_exec_header_in (abfd, raw_bytes, execp)
|
||||
bfd *abfd;
|
||||
struct external_exec *raw_bytes;
|
||||
struct internal_exec *execp;
|
||||
{
|
||||
struct external_exec *bytes = (struct external_exec *)raw_bytes;
|
||||
|
||||
/* The internal_exec structure has some fields that are unused in this
|
||||
configuration (IE for i960), so ensure that all such uninitialized
|
||||
fields are zero'd out. There are places where two of these structs
|
||||
are memcmp'd, and thus the contents do matter. */
|
||||
memset ((PTR) execp, 0, sizeof (struct internal_exec));
|
||||
/* Now fill in fields in the execp, from the bytes in the raw data. */
|
||||
execp->a_info = bfd_h_get_32 (abfd, bytes->e_info);
|
||||
execp->a_text = GET_WORD (abfd, bytes->e_text);
|
||||
execp->a_data = GET_WORD (abfd, bytes->e_data);
|
||||
execp->a_bss = GET_WORD (abfd, bytes->e_bss);
|
||||
execp->a_syms = GET_WORD (abfd, bytes->e_syms);
|
||||
execp->a_entry = GET_WORD (abfd, bytes->e_entry);
|
||||
execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
|
||||
execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
|
||||
execp->a_shdata = GET_WORD (abfd, bytes->e_shdata);
|
||||
execp->a_shdrsize = GET_WORD (abfd, bytes->e_shdrsize);
|
||||
}
|
||||
|
||||
#include "aout-target.h"
|
@ -269,6 +269,9 @@ Standard stuff.
|
||||
. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
|
||||
. file_ptr, bfd_size_type));
|
||||
. boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
|
||||
. boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
|
||||
. bfd *, sec_ptr));
|
||||
. boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
|
||||
|
||||
Symbols and relocations.
|
||||
|
||||
@ -288,6 +291,7 @@ Symbols and relocations.
|
||||
. struct symbol_cache_entry *,
|
||||
. symbol_info *));
|
||||
.#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
|
||||
. boolean (*_bfd_is_local_label) PARAMS ((bfd *, asymbol *));
|
||||
|
||||
. alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
|
||||
.
|
||||
@ -315,7 +319,7 @@ Symbols and relocations.
|
||||
. struct symbol_cache_entry **));
|
||||
.
|
||||
. boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
|
||||
. struct bfd_link_info *, struct symbol_cache_entry **));
|
||||
. struct bfd_link_info *, boolean *again));
|
||||
.
|
||||
. {* See documentation on reloc types. *}
|
||||
. CONST struct reloc_howto_struct *
|
||||
@ -389,6 +393,7 @@ extern bfd_target hp300hpux_vec;
|
||||
extern bfd_target som_vec;
|
||||
extern bfd_target i386aout_vec;
|
||||
extern bfd_target i386bsd_vec;
|
||||
extern bfd_target i386dynix_vec;
|
||||
extern bfd_target i386os9k_vec;
|
||||
extern bfd_target netbsd386_vec;
|
||||
extern bfd_target i386coff_vec;
|
||||
@ -428,6 +433,7 @@ extern bfd_target symbolsrec_vec;
|
||||
|
||||
/* All of the xvecs for core files. */
|
||||
extern bfd_target aix386_core_vec;
|
||||
extern bfd_target cisco_core_vec;
|
||||
extern bfd_target hpux_core_vec;
|
||||
extern bfd_target hppabsd_core_vec;
|
||||
extern bfd_target irix_core_vec;
|
||||
@ -485,6 +491,9 @@ bfd_target *bfd_target_vector[] = {
|
||||
&bfd_elf64_sparc_vec,
|
||||
#endif
|
||||
/* end-sanitize-v9 */
|
||||
/* We don't include cisco_core_vec. Although it has a magic number,
|
||||
the magic number isn't at the beginning of the file, and thus
|
||||
might spuriously match other kinds of files. */
|
||||
#ifdef BFD64
|
||||
&demo_64_vec, /* Only compiled if host has long-long support */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user