1993-04-17 03:44:18 +02:00
|
|
|
|
/* A.out "format 1" file handling code for BFD.
|
Extensive changes to move the bulk of the linker into BFD so that
more efficient backend code can be written for specific object
files. Only existing efficient backend is a.out.
* seclet.c, seclet.h: Removed.
* hash.c, linker.c, genlink.h: New files.
* bfd-in.h: Removed bfd_error_vector. Declared hash table
structures and functions.
(JUMP_TABLE): Removed bfd_seclet_link, added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* All backends: Changed accordingly.
* bfd-in2.h: Rebuilt.
* bfd.c (struct _bfd): Added link_next and archive_pass fields.
Removed ld_symbols field.
(bfd_nonrepresentable_section, bfd_undefined_symbol,
bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
bfd_error_vector): Removed.
(bfd_default_error_trap, bfd_error_trap,
bfd_error_nonrepresentabltrap): Removed.
(bfd_get_relocated_section_contents): Pass link_info. Pass
link_order instead of seclet. Pass symbols.
(bfd_relax_section): Pass link_info.
(bfd_seclet_link): Removed.
(bfd_link_hash_table_create, bfd_link_add_symbols,
bfd_final_link): New macros.
* libbfd-in.h: If __GNUC__ is defined and alloca is not, define
alloca as __builtin_alloca. Declare internal linking functions.
* libbfd.h: Rebuilt.
* libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
for months.
* reloc.c (reloc_howto_type): Added error_message argument to
special_function field. Changed all callers and all definitions.
(bfd_get_reloc_size): Make argument a const pointer.
(bfd_perform_relocation): Add error_message argument to hold
string set if return value if bfd_reloc_dangerous. Changed all
callers.
(_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
* section.c (asection): Renamed seclets_head and seclets_tail to
link_order_head and link_order_tail.
* targets.c (bfd_target): Replaced seclet argument with link_info
and link_order and symbols arguments in
bfd_get_relocated_section_contents. Added symbols argument to
bfd_relax_section. Removed bfd_seclet_link. Added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* libaout.h (struct aoutdata): Added external_syms,
external_sym_count, external_strings, sym_hashes fields.
(obj_aout_external_syms, obj_aout_external_sym_count,
obj_aout_external_strings, obj_aout_sym_hashes): New accessor
macros.
(WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
* aoutx.h: Wrote new back end linker routines.
(translate_to_native_sym_flags): Return boolean value. Don't use
bfd_error_vector.
(NAME(aout,write_syms)): Return boolean value. Check return value
of translate_to_native_sym_flags and bfd_write.
* aout-target.h (final_link_callback): New function.
(MY_bfd_final_link): New function.
* aout-adobe.c (aout_adobe_write_object_contents): Check return
value of aout_32_write_syms.
* hp300hpux.c (MY(write_object_contents)): Likewise.
* i386lynx.c (WRITE_HEADERS): Likewise.
* libaout.h (WRITE_HEADERS): Likewise.
* bout.c: Changed functions to use link_info->callbacks rather
than bfd_error_vector, and link_orders rather than seclets.
* coff-alpha.c: Likewise.
* coff-h8300.c: Likewise.
* coff-h8500.c: Likewise.
* coff-sh.c: Likewise.
* coff-z8k.c: Likewise.
* elf32-hppa.c: Likewise.
* reloc16.c: Likewise.
* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
up _gp in the hash table rather than in outsymbols.
* coff-a29k.c (a29k_reloc): Pass errors back in new error_message
argument rather than printing them.
* coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
link_order arguments rather than seclet. Changed all uses and
definitions.
(bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
all uses and definitions.
* libcoff.h: Rebuilt.
* ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
not by ECOFF, make it scAbs.
(ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
rewritten.
* elf32-mips.c (mips_elf_final_link): Renamed from
mips_elf_seclet_link and rewritten.
* elf32-hppa.c (elf32_hppa_stub_description): Added link_info
field.
(new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
Added link_info arguments. Changed all callers.
* elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
not NULL.
* oasys.c (oasys_write_sections): Return boolean value rather than
using bfd_error_vector.
(oasys_write_object_contents): Check return value of
oasys_write_sections.
* hosts/std-host.h: Don't declare qsort or strtol.
* Makefile.in: Rebuild dependencies.
(BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
(CFILES): Removed seclet.c. Added hash.c and linker.c.
(HFILES): Removed seclet.h. Added genlink.h.
1993-12-30 20:56:50 +01:00
|
|
|
|
Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
1991-07-31 18:58:05 +02:00
|
|
|
|
Written by Cygnus Support.
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1991-07-31 18:58:05 +02:00
|
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1991-07-31 18:58:05 +02:00
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
1991-05-21 02:14:16 +02:00
|
|
|
|
it under the terms of the GNU General Public License as published by
|
1991-07-31 18:58:05 +02:00
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
(at your option) any later version.
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1991-07-31 18:58:05 +02:00
|
|
|
|
This program is distributed in the hope that it will be useful,
|
1991-05-21 02:14:16 +02:00
|
|
|
|
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
|
1991-07-31 18:58:05 +02:00
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
1991-07-04 18:52:56 +02:00
|
|
|
|
|
1991-05-21 02:14:16 +02:00
|
|
|
|
#include "bfd.h"
|
1991-10-11 11:11:37 +01:00
|
|
|
|
#include "sysdep.h"
|
1991-05-21 02:14:16 +02:00
|
|
|
|
#include "libbfd.h"
|
|
|
|
|
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
#include "aout/sun4.h"
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
#include "libaout.h" /* BFD a.out internal data structures */
|
1991-10-11 11:11:37 +01:00
|
|
|
|
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
#include "aout/aout64.h"
|
|
|
|
|
#include "aout/stab_gnu.h"
|
|
|
|
|
#include "aout/ar.h"
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1993-07-09 07:47:07 +02:00
|
|
|
|
/* This is needed to reject a NewsOS file, e.g. in
|
Extensive changes to move the bulk of the linker into BFD so that
more efficient backend code can be written for specific object
files. Only existing efficient backend is a.out.
* seclet.c, seclet.h: Removed.
* hash.c, linker.c, genlink.h: New files.
* bfd-in.h: Removed bfd_error_vector. Declared hash table
structures and functions.
(JUMP_TABLE): Removed bfd_seclet_link, added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* All backends: Changed accordingly.
* bfd-in2.h: Rebuilt.
* bfd.c (struct _bfd): Added link_next and archive_pass fields.
Removed ld_symbols field.
(bfd_nonrepresentable_section, bfd_undefined_symbol,
bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
bfd_error_vector): Removed.
(bfd_default_error_trap, bfd_error_trap,
bfd_error_nonrepresentabltrap): Removed.
(bfd_get_relocated_section_contents): Pass link_info. Pass
link_order instead of seclet. Pass symbols.
(bfd_relax_section): Pass link_info.
(bfd_seclet_link): Removed.
(bfd_link_hash_table_create, bfd_link_add_symbols,
bfd_final_link): New macros.
* libbfd-in.h: If __GNUC__ is defined and alloca is not, define
alloca as __builtin_alloca. Declare internal linking functions.
* libbfd.h: Rebuilt.
* libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
for months.
* reloc.c (reloc_howto_type): Added error_message argument to
special_function field. Changed all callers and all definitions.
(bfd_get_reloc_size): Make argument a const pointer.
(bfd_perform_relocation): Add error_message argument to hold
string set if return value if bfd_reloc_dangerous. Changed all
callers.
(_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
* section.c (asection): Renamed seclets_head and seclets_tail to
link_order_head and link_order_tail.
* targets.c (bfd_target): Replaced seclet argument with link_info
and link_order and symbols arguments in
bfd_get_relocated_section_contents. Added symbols argument to
bfd_relax_section. Removed bfd_seclet_link. Added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* libaout.h (struct aoutdata): Added external_syms,
external_sym_count, external_strings, sym_hashes fields.
(obj_aout_external_syms, obj_aout_external_sym_count,
obj_aout_external_strings, obj_aout_sym_hashes): New accessor
macros.
(WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
* aoutx.h: Wrote new back end linker routines.
(translate_to_native_sym_flags): Return boolean value. Don't use
bfd_error_vector.
(NAME(aout,write_syms)): Return boolean value. Check return value
of translate_to_native_sym_flags and bfd_write.
* aout-target.h (final_link_callback): New function.
(MY_bfd_final_link): New function.
* aout-adobe.c (aout_adobe_write_object_contents): Check return
value of aout_32_write_syms.
* hp300hpux.c (MY(write_object_contents)): Likewise.
* i386lynx.c (WRITE_HEADERS): Likewise.
* libaout.h (WRITE_HEADERS): Likewise.
* bout.c: Changed functions to use link_info->callbacks rather
than bfd_error_vector, and link_orders rather than seclets.
* coff-alpha.c: Likewise.
* coff-h8300.c: Likewise.
* coff-h8500.c: Likewise.
* coff-sh.c: Likewise.
* coff-z8k.c: Likewise.
* elf32-hppa.c: Likewise.
* reloc16.c: Likewise.
* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
up _gp in the hash table rather than in outsymbols.
* coff-a29k.c (a29k_reloc): Pass errors back in new error_message
argument rather than printing them.
* coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
link_order arguments rather than seclet. Changed all uses and
definitions.
(bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
all uses and definitions.
* libcoff.h: Rebuilt.
* ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
not by ECOFF, make it scAbs.
(ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
rewritten.
* elf32-mips.c (mips_elf_final_link): Renamed from
mips_elf_seclet_link and rewritten.
* elf32-hppa.c (elf32_hppa_stub_description): Added link_info
field.
(new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
Added link_info arguments. Changed all callers.
* elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
not NULL.
* oasys.c (oasys_write_sections): Return boolean value rather than
using bfd_error_vector.
(oasys_write_object_contents): Check return value of
oasys_write_sections.
* hosts/std-host.h: Don't declare qsort or strtol.
* Makefile.in: Rebuild dependencies.
(BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
(CFILES): Removed seclet.c. Added hash.c and linker.c.
(HFILES): Removed seclet.h. Added genlink.h.
1993-12-30 20:56:50 +01:00
|
|
|
|
gdb/testsuite/gdb.t10/crossload.exp. <kingdon@cygnus.com>
|
|
|
|
|
I needed to add M_UNKNOWN to recognize a 68000 object, so this will
|
|
|
|
|
probably no longer reject a NewsOS object. <ian@cygnus.com>. */
|
|
|
|
|
#define MACHTYPE_OK(mtype) ((mtype) == M_UNKNOWN \
|
|
|
|
|
|| (mtype) == M_68010 \
|
|
|
|
|
|| (mtype) == M_68020 \
|
1993-07-09 07:47:07 +02:00
|
|
|
|
|| (mtype) == M_SPARC)
|
|
|
|
|
|
1991-07-04 18:52:56 +02:00
|
|
|
|
/*
|
|
|
|
|
The file @code{aoutf1.h} contains the code for BFD's
|
|
|
|
|
a.out back end. Control over the generated back end is given by these
|
1991-08-23 09:24:32 +02:00
|
|
|
|
two preprocessor names:
|
1991-07-04 18:52:56 +02:00
|
|
|
|
@table @code
|
1991-08-23 09:24:32 +02:00
|
|
|
|
@item ARCH_SIZE
|
1991-07-04 18:52:56 +02:00
|
|
|
|
This value should be either 32 or 64, depending upon the size of an
|
|
|
|
|
int in the target format. It changes the sizes of the structs which
|
|
|
|
|
perform the memory/disk mapping of structures.
|
|
|
|
|
|
|
|
|
|
The 64 bit backend may only be used if the host compiler supports 64
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
ints (eg long long with gcc), by defining the name @code{BFD_HOST_64_BIT} in @code{bfd.h}.
|
1991-08-23 09:24:32 +02:00
|
|
|
|
With this name defined, @emph{all} bfd operations are performed with 64bit
|
1991-07-04 18:52:56 +02:00
|
|
|
|
arithmetic, not just those to a 64bit target.
|
|
|
|
|
|
|
|
|
|
@item TARGETNAME
|
1991-08-23 09:24:32 +02:00
|
|
|
|
The name put into the target vector.
|
1991-07-04 18:52:56 +02:00
|
|
|
|
@item
|
1991-08-23 09:24:32 +02:00
|
|
|
|
@end table
|
1991-07-04 18:52:56 +02:00
|
|
|
|
|
|
|
|
|
*/
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
/*SUPPRESS558*/
|
|
|
|
|
/*SUPPRESS529*/
|
|
|
|
|
|
1992-10-09 02:39:06 +01:00
|
|
|
|
void
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
NAME (sunos, set_arch_mach) (abfd, machtype)
|
|
|
|
|
bfd *abfd;
|
|
|
|
|
int machtype;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
{
|
1992-10-09 02:39:06 +01:00
|
|
|
|
/* Determine the architecture and machine type of the object file. */
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
enum bfd_architecture arch;
|
|
|
|
|
long machine;
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
switch (machtype)
|
|
|
|
|
{
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
case M_UNKNOWN:
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
/* Some Sun3s make magic numbers without cpu types in them, so
|
Extensive changes to move the bulk of the linker into BFD so that
more efficient backend code can be written for specific object
files. Only existing efficient backend is a.out.
* seclet.c, seclet.h: Removed.
* hash.c, linker.c, genlink.h: New files.
* bfd-in.h: Removed bfd_error_vector. Declared hash table
structures and functions.
(JUMP_TABLE): Removed bfd_seclet_link, added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* All backends: Changed accordingly.
* bfd-in2.h: Rebuilt.
* bfd.c (struct _bfd): Added link_next and archive_pass fields.
Removed ld_symbols field.
(bfd_nonrepresentable_section, bfd_undefined_symbol,
bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
bfd_error_vector): Removed.
(bfd_default_error_trap, bfd_error_trap,
bfd_error_nonrepresentabltrap): Removed.
(bfd_get_relocated_section_contents): Pass link_info. Pass
link_order instead of seclet. Pass symbols.
(bfd_relax_section): Pass link_info.
(bfd_seclet_link): Removed.
(bfd_link_hash_table_create, bfd_link_add_symbols,
bfd_final_link): New macros.
* libbfd-in.h: If __GNUC__ is defined and alloca is not, define
alloca as __builtin_alloca. Declare internal linking functions.
* libbfd.h: Rebuilt.
* libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
for months.
* reloc.c (reloc_howto_type): Added error_message argument to
special_function field. Changed all callers and all definitions.
(bfd_get_reloc_size): Make argument a const pointer.
(bfd_perform_relocation): Add error_message argument to hold
string set if return value if bfd_reloc_dangerous. Changed all
callers.
(_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
* section.c (asection): Renamed seclets_head and seclets_tail to
link_order_head and link_order_tail.
* targets.c (bfd_target): Replaced seclet argument with link_info
and link_order and symbols arguments in
bfd_get_relocated_section_contents. Added symbols argument to
bfd_relax_section. Removed bfd_seclet_link. Added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* libaout.h (struct aoutdata): Added external_syms,
external_sym_count, external_strings, sym_hashes fields.
(obj_aout_external_syms, obj_aout_external_sym_count,
obj_aout_external_strings, obj_aout_sym_hashes): New accessor
macros.
(WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
* aoutx.h: Wrote new back end linker routines.
(translate_to_native_sym_flags): Return boolean value. Don't use
bfd_error_vector.
(NAME(aout,write_syms)): Return boolean value. Check return value
of translate_to_native_sym_flags and bfd_write.
* aout-target.h (final_link_callback): New function.
(MY_bfd_final_link): New function.
* aout-adobe.c (aout_adobe_write_object_contents): Check return
value of aout_32_write_syms.
* hp300hpux.c (MY(write_object_contents)): Likewise.
* i386lynx.c (WRITE_HEADERS): Likewise.
* libaout.h (WRITE_HEADERS): Likewise.
* bout.c: Changed functions to use link_info->callbacks rather
than bfd_error_vector, and link_orders rather than seclets.
* coff-alpha.c: Likewise.
* coff-h8300.c: Likewise.
* coff-h8500.c: Likewise.
* coff-sh.c: Likewise.
* coff-z8k.c: Likewise.
* elf32-hppa.c: Likewise.
* reloc16.c: Likewise.
* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
up _gp in the hash table rather than in outsymbols.
* coff-a29k.c (a29k_reloc): Pass errors back in new error_message
argument rather than printing them.
* coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
link_order arguments rather than seclet. Changed all uses and
definitions.
(bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
all uses and definitions.
* libcoff.h: Rebuilt.
* ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
not by ECOFF, make it scAbs.
(ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
rewritten.
* elf32-mips.c (mips_elf_final_link): Renamed from
mips_elf_seclet_link and rewritten.
* elf32-hppa.c (elf32_hppa_stub_description): Added link_info
field.
(new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
Added link_info arguments. Changed all callers.
* elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
not NULL.
* oasys.c (oasys_write_sections): Return boolean value rather than
using bfd_error_vector.
(oasys_write_object_contents): Check return value of
oasys_write_sections.
* hosts/std-host.h: Don't declare qsort or strtol.
* Makefile.in: Rebuild dependencies.
(BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
(CFILES): Removed seclet.c. Added hash.c and linker.c.
(HFILES): Removed seclet.h. Added genlink.h.
1993-12-30 20:56:50 +01:00
|
|
|
|
we'll default to the 68000. */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
arch = bfd_arch_m68k;
|
|
|
|
|
machine = 68000;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case M_68010:
|
|
|
|
|
case M_HP200:
|
|
|
|
|
arch = bfd_arch_m68k;
|
|
|
|
|
machine = 68010;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case M_68020:
|
|
|
|
|
case M_HP300:
|
|
|
|
|
arch = bfd_arch_m68k;
|
|
|
|
|
machine = 68020;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case M_SPARC:
|
|
|
|
|
arch = bfd_arch_sparc;
|
|
|
|
|
machine = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case M_386:
|
|
|
|
|
case M_386_DYNIX:
|
|
|
|
|
arch = bfd_arch_i386;
|
|
|
|
|
machine = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case M_29K:
|
|
|
|
|
arch = bfd_arch_a29k;
|
|
|
|
|
machine = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case M_HPUX:
|
|
|
|
|
arch = bfd_arch_m68k;
|
|
|
|
|
machine = 0;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
arch = bfd_arch_obscure;
|
|
|
|
|
machine = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
bfd_set_arch_mach (abfd, arch, machine);
|
1991-05-21 02:14:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
1992-10-09 02:39:06 +01:00
|
|
|
|
#define SET_ARCH_MACH(ABFD, EXEC) \
|
|
|
|
|
NAME(sunos,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \
|
|
|
|
|
choose_reloc_size(ABFD);
|
|
|
|
|
|
|
|
|
|
/* Determine the size of a relocation entry, based on the architecture */
|
|
|
|
|
static void
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
choose_reloc_size (abfd)
|
|
|
|
|
bfd *abfd;
|
1992-10-09 02:39:06 +01:00
|
|
|
|
{
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
switch (bfd_get_arch (abfd))
|
|
|
|
|
{
|
|
|
|
|
case bfd_arch_sparc:
|
|
|
|
|
case bfd_arch_a29k:
|
|
|
|
|
obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
|
|
|
|
|
break;
|
|
|
|
|
}
|
1992-10-09 02:39:06 +01:00
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
/* Write an object file in SunOS format.
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
Section contents have already been written. We write the
|
|
|
|
|
file header, symbols, and relocation. */
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
static boolean
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
NAME (aout, sunos4_write_object_contents) (abfd)
|
|
|
|
|
bfd *abfd;
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
{
|
|
|
|
|
struct external_exec exec_bytes;
|
|
|
|
|
struct internal_exec *execp = exec_hdr (abfd);
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
/* Magic number, maestro, please! */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
switch (bfd_get_arch (abfd))
|
|
|
|
|
{
|
|
|
|
|
case bfd_arch_m68k:
|
|
|
|
|
switch (bfd_get_mach (abfd))
|
|
|
|
|
{
|
|
|
|
|
case 68010:
|
|
|
|
|
N_SET_MACHTYPE (*execp, M_68010);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
case 68020:
|
|
|
|
|
N_SET_MACHTYPE (*execp, M_68020);
|
|
|
|
|
break;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
break;
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
case bfd_arch_sparc:
|
|
|
|
|
N_SET_MACHTYPE (*execp, M_SPARC);
|
|
|
|
|
break;
|
|
|
|
|
case bfd_arch_i386:
|
|
|
|
|
N_SET_MACHTYPE (*execp, M_386);
|
|
|
|
|
break;
|
|
|
|
|
case bfd_arch_a29k:
|
|
|
|
|
N_SET_MACHTYPE (*execp, M_29K);
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
break;
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
default:
|
|
|
|
|
N_SET_MACHTYPE (*execp, M_UNKNOWN);
|
1991-05-21 02:14:16 +02:00
|
|
|
|
}
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
|
|
|
|
|
choose_reloc_size (abfd);
|
1993-04-17 03:44:18 +02:00
|
|
|
|
|
1993-07-09 07:47:07 +02:00
|
|
|
|
#if 0
|
1993-04-17 03:44:18 +02:00
|
|
|
|
/* Some tools want this to be 0, some tools want this to be one.
|
|
|
|
|
Today, it seems that 0 is the most important setting (PR1927) */
|
|
|
|
|
N_SET_FLAGS (*execp, 0x0);
|
1993-07-09 07:47:07 +02:00
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
/* Fri Jun 11 14:23:31 PDT 1993
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
FIXME
|
1993-07-09 07:47:07 +02:00
|
|
|
|
Today's optimal setting is 1. This is a pain, since it
|
|
|
|
|
reopens 1927. This should be readdressed by creating a new
|
|
|
|
|
target for each each supported, giving perhaps sun3/m68k
|
|
|
|
|
and sun4/sparc a.out formats.
|
|
|
|
|
*/
|
|
|
|
|
N_SET_FLAGS (*execp, 1);
|
|
|
|
|
#endif
|
* syms.c (BSF_DYNAMIC): New symbol flag.
(bfd_print_symbol_vandf): Print it.
* bfd-in2.h: Rebuilt.
* libaout.h (struct aout_backend_data): New read_dynamic_symbols
and read_dynamic_relocs fields.
(struct aoutdata): New dynamic_info field.
(obj_aout_dynamic_info): New accessor macro.
* sunos.c (struct sunos_dynamic_info): New structure.
(sunos_read_dynamic_info, MY(read_dynamic_symbols),
MY(read_dynamic_relocs)): New functions to read dynamic symbols
and relocs.
* aoutx.h (NAME(aout,some_aout_object_p)): If the object is
dynamically linked, set SEC_RELOC for both the .text and .data
sections.
(translate_from_native_sym_flags): Don't set BSF_LOCAL for an
undefined symbol.
(translate_symbol_table): New function, split out of
slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
(NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
(NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
(NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
return value.
* aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
out dynamic symbols or relocs against reloc symbols, since they
are already in the .text section and we wouldn't know where to
write them anyhow.
(sunos4_aout_backend): Initialize read_dynamic_symbols and
read_dynamic_relocs fields.
* aout-target.h (MY(backend_data)): Initialize
read_dynamic_symbols and read_dynamic_relocs fields.
1994-01-21 07:29:21 +01:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
N_SET_DYNAMIC (*execp, bfd_get_file_flags (abfd) & DYNAMIC);
|
* syms.c (BSF_DYNAMIC): New symbol flag.
(bfd_print_symbol_vandf): Print it.
* bfd-in2.h: Rebuilt.
* libaout.h (struct aout_backend_data): New read_dynamic_symbols
and read_dynamic_relocs fields.
(struct aoutdata): New dynamic_info field.
(obj_aout_dynamic_info): New accessor macro.
* sunos.c (struct sunos_dynamic_info): New structure.
(sunos_read_dynamic_info, MY(read_dynamic_symbols),
MY(read_dynamic_relocs)): New functions to read dynamic symbols
and relocs.
* aoutx.h (NAME(aout,some_aout_object_p)): If the object is
dynamically linked, set SEC_RELOC for both the .text and .data
sections.
(translate_from_native_sym_flags): Don't set BSF_LOCAL for an
undefined symbol.
(translate_symbol_table): New function, split out of
slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
(NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
(NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
(NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
return value.
* aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
out dynamic symbols or relocs against reloc symbols, since they
are already in the .text section and we wouldn't know where to
write them anyhow.
(sunos4_aout_backend): Initialize read_dynamic_symbols and
read_dynamic_relocs fields.
* aout-target.h (MY(backend_data)): Initialize
read_dynamic_symbols and read_dynamic_relocs fields.
1994-01-21 07:29:21 +01:00
|
|
|
|
|
|
|
|
|
/* At least for SunOS, the dynamic symbols and relocs are embedded
|
|
|
|
|
in the .text section, and we do not want to write them out with
|
|
|
|
|
the symbol table. FIXME: This may be right if there is any other
|
|
|
|
|
form of a.out shared libraries. */
|
|
|
|
|
if ((bfd_get_file_flags (abfd) & DYNAMIC) != 0
|
|
|
|
|
&& bfd_get_outsymbols (abfd) != (asymbol **) NULL)
|
|
|
|
|
{
|
|
|
|
|
bfd_size_type i;
|
|
|
|
|
asymbol **sym_ptr_ptr;
|
|
|
|
|
bfd_size_type count;
|
|
|
|
|
arelent **rel_ptr_ptr;
|
|
|
|
|
|
|
|
|
|
sym_ptr_ptr = bfd_get_outsymbols (abfd);
|
|
|
|
|
count = bfd_get_symcount (abfd);
|
|
|
|
|
for (i = 0; i < count; i++, sym_ptr_ptr++)
|
|
|
|
|
{
|
|
|
|
|
if (((*sym_ptr_ptr)->flags & BSF_DYNAMIC) != 0)
|
|
|
|
|
{
|
|
|
|
|
/* This assumes that all dynamic symbols follow all
|
|
|
|
|
non-dynamic symbols, which is what slurp_symbol_table
|
|
|
|
|
does. */
|
|
|
|
|
*sym_ptr_ptr = NULL;
|
|
|
|
|
bfd_get_symcount (abfd) = i;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (obj_textsec (abfd)->reloc_count > 0)
|
|
|
|
|
{
|
|
|
|
|
rel_ptr_ptr = obj_textsec (abfd)->orelocation;
|
|
|
|
|
count = obj_textsec (abfd)->reloc_count;
|
|
|
|
|
for (i = 0; i < count; i++, rel_ptr_ptr++)
|
|
|
|
|
{
|
|
|
|
|
if (((*(*rel_ptr_ptr)->sym_ptr_ptr)->flags & BSF_DYNAMIC) != 0)
|
|
|
|
|
{
|
|
|
|
|
/* This assumes that all relocs against dynamic
|
|
|
|
|
symbols follow all relocs against other symbols,
|
|
|
|
|
which is what slurp_reloc_table does. */
|
|
|
|
|
*rel_ptr_ptr = NULL;
|
|
|
|
|
obj_textsec (abfd)->reloc_count = i;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (obj_datasec (abfd)->reloc_count > 0)
|
|
|
|
|
{
|
|
|
|
|
rel_ptr_ptr = obj_datasec (abfd)->orelocation;
|
|
|
|
|
count = obj_datasec (abfd)->reloc_count;
|
|
|
|
|
for (i = 0; i < count; i++, rel_ptr_ptr++)
|
|
|
|
|
{
|
|
|
|
|
if (((*(*rel_ptr_ptr)->sym_ptr_ptr)->flags & BSF_DYNAMIC) != 0)
|
|
|
|
|
{
|
|
|
|
|
*rel_ptr_ptr = NULL;
|
|
|
|
|
obj_datasec (abfd)->reloc_count = i;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
WRITE_HEADERS (abfd, execp);
|
1992-10-09 02:39:06 +01:00
|
|
|
|
|
1991-05-21 02:14:16 +02:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* core files */
|
|
|
|
|
|
|
|
|
|
#define CORE_MAGIC 0x080456
|
|
|
|
|
#define CORE_NAMELEN 16
|
|
|
|
|
|
|
|
|
|
/* The core structure is taken from the Sun documentation.
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
Unfortunately, they don't document the FPA structure, or at least I
|
|
|
|
|
can't find it easily. Fortunately the core header contains its own
|
|
|
|
|
length. So this shouldn't cause problems, except for c_ucode, which
|
|
|
|
|
so far we don't use but is easy to find with a little arithmetic. */
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
/* But the reg structure can be gotten from the SPARC processor handbook.
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
This really should be in a GNU include file though so that gdb can use
|
|
|
|
|
the same info. */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct regs
|
|
|
|
|
{
|
1991-05-21 02:14:16 +02:00
|
|
|
|
int r_psr;
|
|
|
|
|
int r_pc;
|
|
|
|
|
int r_npc;
|
|
|
|
|
int r_y;
|
|
|
|
|
int r_g1;
|
|
|
|
|
int r_g2;
|
|
|
|
|
int r_g3;
|
|
|
|
|
int r_g4;
|
|
|
|
|
int r_g5;
|
|
|
|
|
int r_g6;
|
|
|
|
|
int r_g7;
|
|
|
|
|
int r_o0;
|
|
|
|
|
int r_o1;
|
|
|
|
|
int r_o2;
|
|
|
|
|
int r_o3;
|
|
|
|
|
int r_o4;
|
|
|
|
|
int r_o5;
|
|
|
|
|
int r_o6;
|
|
|
|
|
int r_o7;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Taken from Sun documentation: */
|
|
|
|
|
|
|
|
|
|
/* FIXME: It's worse than we expect. This struct contains TWO substructs
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
neither of whose size we know, WITH STUFF IN BETWEEN THEM! We can't
|
|
|
|
|
even portably access the stuff in between! */
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct external_sparc_core
|
|
|
|
|
{
|
|
|
|
|
int c_magic; /* Corefile magic number */
|
|
|
|
|
int c_len; /* Sizeof (struct core) */
|
1991-08-23 09:24:32 +02:00
|
|
|
|
#define SPARC_CORE_LEN 432
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
int c_regs[19]; /* General purpose registers -- MACHDEP SIZE */
|
|
|
|
|
struct external_exec c_aouthdr; /* A.out header */
|
|
|
|
|
int c_signo; /* Killing signal, if any */
|
|
|
|
|
int c_tsize; /* Text size (bytes) */
|
|
|
|
|
int c_dsize; /* Data size (bytes) */
|
|
|
|
|
int c_ssize; /* Stack size (bytes) */
|
|
|
|
|
char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
|
|
|
|
|
double fp_stuff[1]; /* external FPU state (size unknown by us) */
|
|
|
|
|
/* The type "double" is critical here, for alignment.
|
1991-05-21 02:14:16 +02:00
|
|
|
|
SunOS declares a struct here, but the struct's alignment
|
|
|
|
|
is double since it contains doubles. */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
int c_ucode; /* Exception no. from u_code */
|
|
|
|
|
/* (this member is not accessible by name since we don't
|
1991-05-21 02:14:16 +02:00
|
|
|
|
portably know the size of fp_stuff.) */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
};
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct external_sun3_core
|
|
|
|
|
{
|
|
|
|
|
int c_magic; /* Corefile magic number */
|
|
|
|
|
int c_len; /* Sizeof (struct core) */
|
1991-08-23 09:24:32 +02:00
|
|
|
|
#define SUN3_CORE_LEN 826 /* As of SunOS 4.1.1 */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
int c_regs[18]; /* General purpose registers -- MACHDEP SIZE */
|
|
|
|
|
struct external_exec c_aouthdr; /* A.out header */
|
|
|
|
|
int c_signo; /* Killing signal, if any */
|
|
|
|
|
int c_tsize; /* Text size (bytes) */
|
|
|
|
|
int c_dsize; /* Data size (bytes) */
|
|
|
|
|
int c_ssize; /* Stack size (bytes) */
|
|
|
|
|
char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
|
|
|
|
|
double fp_stuff[1]; /* external FPU state (size unknown by us) */
|
|
|
|
|
/* The type "double" is critical here, for alignment.
|
1991-08-23 09:24:32 +02:00
|
|
|
|
SunOS declares a struct here, but the struct's alignment
|
|
|
|
|
is double since it contains doubles. */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
int c_ucode; /* Exception no. from u_code */
|
|
|
|
|
/* (this member is not accessible by name since we don't
|
1991-08-23 09:24:32 +02:00
|
|
|
|
portably know the size of fp_stuff.) */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
};
|
1991-08-23 09:24:32 +02:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct internal_sunos_core
|
|
|
|
|
{
|
|
|
|
|
int c_magic; /* Corefile magic number */
|
|
|
|
|
int c_len; /* Sizeof (struct core) */
|
|
|
|
|
long c_regs_pos; /* file offset of General purpose registers */
|
|
|
|
|
int c_regs_size; /* size of General purpose registers */
|
|
|
|
|
struct internal_exec c_aouthdr; /* A.out header */
|
|
|
|
|
int c_signo; /* Killing signal, if any */
|
|
|
|
|
int c_tsize; /* Text size (bytes) */
|
|
|
|
|
int c_dsize; /* Data size (bytes) */
|
|
|
|
|
int c_ssize; /* Stack size (bytes) */
|
|
|
|
|
bfd_vma c_stacktop; /* Stack top (address) */
|
|
|
|
|
char c_cmdname[CORE_NAMELEN + 1]; /* Command name */
|
|
|
|
|
long fp_stuff_pos; /* file offset of external FPU state (regs) */
|
|
|
|
|
int fp_stuff_size; /* Size of it */
|
|
|
|
|
int c_ucode; /* Exception no. from u_code */
|
|
|
|
|
};
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* byte-swap in the Sun-3 core structure */
|
|
|
|
|
static void
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
swapcore_sun3 (abfd, ext, intcore)
|
|
|
|
|
bfd *abfd;
|
|
|
|
|
char *ext;
|
|
|
|
|
struct internal_sunos_core *intcore;
|
1991-08-23 09:24:32 +02:00
|
|
|
|
{
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct external_sun3_core *extcore = (struct external_sun3_core *) ext;
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
intcore->c_magic = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_magic);
|
|
|
|
|
intcore->c_len = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_len);
|
|
|
|
|
intcore->c_regs_pos = (long) (((struct external_sun3_core *) 0)->c_regs);
|
1991-08-23 09:24:32 +02:00
|
|
|
|
intcore->c_regs_size = sizeof (extcore->c_regs);
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
NAME (aout, swap_exec_header_in) (abfd, &extcore->c_aouthdr, &intcore->c_aouthdr);
|
|
|
|
|
intcore->c_signo = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_signo);
|
|
|
|
|
intcore->c_tsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_tsize);
|
|
|
|
|
intcore->c_dsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_dsize);
|
|
|
|
|
intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize);
|
1992-10-09 02:39:06 +01:00
|
|
|
|
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
intcore->fp_stuff_pos = (long) (((struct external_sun3_core *) 0)->fp_stuff);
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* FP stuff takes up whole rest of struct, except c_ucode. */
|
|
|
|
|
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
(file_ptr) (((struct external_sun3_core *) 0)->fp_stuff);
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* Ucode is the last thing in the struct -- just before the end */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
intcore->c_ucode =
|
|
|
|
|
bfd_h_get_32 (abfd,
|
|
|
|
|
intcore->c_len - sizeof (extcore->c_ucode) + (unsigned char *) extcore);
|
|
|
|
|
intcore->c_stacktop = 0x0E000000; /* By experimentation */
|
1991-08-23 09:24:32 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
1991-09-27 00:28:46 +02:00
|
|
|
|
/* byte-swap in the Sparc core structure */
|
1991-08-23 09:24:32 +02:00
|
|
|
|
static void
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
swapcore_sparc (abfd, ext, intcore)
|
|
|
|
|
bfd *abfd;
|
|
|
|
|
char *ext;
|
|
|
|
|
struct internal_sunos_core *intcore;
|
1991-08-23 09:24:32 +02:00
|
|
|
|
{
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct external_sparc_core *extcore = (struct external_sparc_core *) ext;
|
|
|
|
|
|
|
|
|
|
intcore->c_magic = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_magic);
|
|
|
|
|
intcore->c_len = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_len);
|
|
|
|
|
intcore->c_regs_pos = (long) (((struct external_sparc_core *) 0)->c_regs);
|
1991-08-23 09:24:32 +02:00
|
|
|
|
intcore->c_regs_size = sizeof (extcore->c_regs);
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
NAME (aout, swap_exec_header_in) (abfd, &extcore->c_aouthdr, &intcore->c_aouthdr);
|
|
|
|
|
intcore->c_signo = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_signo);
|
|
|
|
|
intcore->c_tsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_tsize);
|
|
|
|
|
intcore->c_dsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_dsize);
|
|
|
|
|
intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize);
|
1992-10-09 02:39:06 +01:00
|
|
|
|
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
intcore->fp_stuff_pos = (long) (((struct external_sparc_core *) 0)->fp_stuff);
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* FP stuff takes up whole rest of struct, except c_ucode. */
|
|
|
|
|
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
(file_ptr) (((struct external_sparc_core *) 0)->fp_stuff);
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* Ucode is the last thing in the struct -- just before the end */
|
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint.
* libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents.
* libbfd.c (bfd_generic_{get,set}_section_contents): Check that
last byte of transfer, not first byte, is within the section.
* host-aout.c: Remove `BSD' archive support. Lint.
* archures.c: Rename `struct bfd_arch_info_struct' to `struct
bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to
`bfd_arch_info_type'. All uses changed.
* reloc.c: Rename `bfd_reloc_status_enum_type' to
`bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type'
to `bfd_reloc_code_real_type'. (This seems to be a misnomer,
it needs a better name.) All uses changed.
* targets.c: Rename `enum target_flavour_enum' to `enum
target_flavour', and remove the `_enum' from all of the enum
values themselves. All uses changed.
* configure.in, config/h-i386mach: i386 mach host.
* config/t-i386-aout: Use host-aout.c.
* trad-core.c: Give it its own xvec's to make it independent
of other file formats.
* ecoff.c, host-aout.c: Remove refs to trad-core.
* config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE.
* targets.c: #ifdef TRAD_CORE, include it in the vector.
1991-10-05 06:18:08 +01:00
|
|
|
|
intcore->c_ucode =
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
bfd_h_get_32 (abfd,
|
|
|
|
|
intcore->c_len - sizeof (extcore->c_ucode) + (unsigned char *) extcore);
|
1993-04-17 03:44:18 +02:00
|
|
|
|
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* Supposedly the user stack grows downward from the bottom of kernel memory.
|
1993-04-17 03:44:18 +02:00
|
|
|
|
Presuming that this remains true, this definition will work. */
|
|
|
|
|
/* Now sun has provided us with another challenge. The value is different
|
|
|
|
|
for sparc2 and sparc10 (both running SunOS 4.1.3). We pick one or
|
|
|
|
|
the other based on the current value of the stack pointer. This
|
|
|
|
|
loses (a) if the stack pointer has been clobbered, or (b) if the stack
|
|
|
|
|
is larger than 128 megabytes.
|
|
|
|
|
|
|
|
|
|
It's times like these you're glad they're switching to ELF.
|
|
|
|
|
|
|
|
|
|
Note that using include files or nlist on /vmunix would be wrong,
|
|
|
|
|
because we want the value for this core file, no matter what kind of
|
|
|
|
|
machine we were compiled on or are running on. */
|
|
|
|
|
#define SPARC_USRSTACK_SPARC2 ((bfd_vma)0xf8000000)
|
|
|
|
|
#define SPARC_USRSTACK_SPARC10 ((bfd_vma)0xf0000000)
|
|
|
|
|
{
|
|
|
|
|
bfd_vma sp = bfd_h_get_32
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
(abfd, (unsigned char *) &((struct regs *) &extcore->c_regs[0])->r_o6);
|
1993-04-17 03:44:18 +02:00
|
|
|
|
if (sp < SPARC_USRSTACK_SPARC10)
|
|
|
|
|
intcore->c_stacktop = SPARC_USRSTACK_SPARC10;
|
|
|
|
|
else
|
|
|
|
|
intcore->c_stacktop = SPARC_USRSTACK_SPARC2;
|
|
|
|
|
}
|
1991-08-23 09:24:32 +02:00
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* need this cast because ptr is really void * */
|
1992-10-09 02:39:06 +01:00
|
|
|
|
#define core_hdr(bfd) ((bfd)->tdata.sun_core_data)
|
|
|
|
|
#define core_datasec(bfd) (core_hdr(bfd)->data_section)
|
|
|
|
|
#define core_stacksec(bfd) (core_hdr(bfd)->stack_section)
|
|
|
|
|
#define core_regsec(bfd) (core_hdr(bfd)->reg_section)
|
|
|
|
|
#define core_reg2sec(bfd) (core_hdr(bfd)->reg2_section)
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
/* These are stored in the bfd's tdata */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct sun_core_struct
|
|
|
|
|
{
|
|
|
|
|
struct internal_sunos_core *hdr; /* core file header */
|
1991-08-23 09:24:32 +02:00
|
|
|
|
asection *data_section;
|
|
|
|
|
asection *stack_section;
|
|
|
|
|
asection *reg_section;
|
|
|
|
|
asection *reg2_section;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static bfd_target *
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
sunos4_core_file_p (abfd)
|
|
|
|
|
bfd *abfd;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
{
|
|
|
|
|
unsigned char longbuf[4]; /* Raw bytes of various header fields */
|
|
|
|
|
int core_size;
|
|
|
|
|
int core_mag;
|
1991-08-23 09:24:32 +02:00
|
|
|
|
struct internal_sunos_core *core;
|
|
|
|
|
char *extcore;
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
struct mergem
|
|
|
|
|
{
|
|
|
|
|
struct sun_core_struct suncoredata;
|
|
|
|
|
struct internal_sunos_core internal_sunos_core;
|
|
|
|
|
char external_core[1];
|
|
|
|
|
}
|
|
|
|
|
*mergem;
|
|
|
|
|
|
|
|
|
|
if (bfd_read ((PTR) longbuf, 1, sizeof (longbuf), abfd) !=
|
1991-05-21 02:14:16 +02:00
|
|
|
|
sizeof (longbuf))
|
|
|
|
|
return 0;
|
|
|
|
|
core_mag = bfd_h_get_32 (abfd, longbuf);
|
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (core_mag != CORE_MAGIC)
|
|
|
|
|
return 0;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
/* SunOS core headers can vary in length; second word is size; */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (bfd_read ((PTR) longbuf, 1, sizeof (longbuf), abfd) !=
|
1991-05-21 02:14:16 +02:00
|
|
|
|
sizeof (longbuf))
|
|
|
|
|
return 0;
|
|
|
|
|
core_size = bfd_h_get_32 (abfd, longbuf);
|
|
|
|
|
/* Sanity check */
|
|
|
|
|
if (core_size > 20000)
|
|
|
|
|
return 0;
|
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) < 0)
|
1991-05-21 02:14:16 +02:00
|
|
|
|
return 0;
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
|
|
|
|
|
mergem = (struct mergem *) bfd_zalloc (abfd, core_size + sizeof (struct mergem));
|
|
|
|
|
if (mergem == NULL)
|
|
|
|
|
{
|
|
|
|
|
bfd_set_error (bfd_error_no_memory);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1991-08-23 09:24:32 +02:00
|
|
|
|
extcore = mergem->external_core;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if ((bfd_read ((PTR) extcore, 1, core_size, abfd)) != core_size)
|
|
|
|
|
{
|
|
|
|
|
bfd_set_error (bfd_error_system_call);
|
|
|
|
|
bfd_release (abfd, (char *) mergem);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
1991-08-23 09:24:32 +02:00
|
|
|
|
|
|
|
|
|
/* Validate that it's a core file we know how to handle, due to sun
|
|
|
|
|
botching the positioning of registers and other fields in a machine
|
|
|
|
|
dependent way. */
|
|
|
|
|
core = &mergem->internal_sunos_core;
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
switch (core_size)
|
|
|
|
|
{
|
|
|
|
|
case SPARC_CORE_LEN:
|
|
|
|
|
swapcore_sparc (abfd, extcore, core);
|
|
|
|
|
break;
|
|
|
|
|
case SUN3_CORE_LEN:
|
|
|
|
|
swapcore_sun3 (abfd, extcore, core);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
bfd_set_error (bfd_error_system_call); /* FIXME */
|
|
|
|
|
bfd_release (abfd, (char *) mergem);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
abfd->tdata.sun_core_data = &mergem->suncoredata;
|
|
|
|
|
abfd->tdata.sun_core_data->hdr = core;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
/* create the sections. This is raunchy, but bfd_close wants to reclaim
|
|
|
|
|
them */
|
|
|
|
|
core_stacksec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (core_stacksec (abfd) == NULL)
|
|
|
|
|
{
|
|
|
|
|
loser:
|
|
|
|
|
bfd_set_error (bfd_error_no_memory);
|
|
|
|
|
bfd_release (abfd, (char *) mergem);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
core_datasec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (core_datasec (abfd) == NULL)
|
|
|
|
|
{
|
|
|
|
|
loser1:
|
|
|
|
|
bfd_release (abfd, core_stacksec (abfd));
|
|
|
|
|
goto loser;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
core_regsec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (core_regsec (abfd) == NULL)
|
|
|
|
|
{
|
|
|
|
|
loser2:
|
|
|
|
|
bfd_release (abfd, core_datasec (abfd));
|
|
|
|
|
goto loser1;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
core_reg2sec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (core_reg2sec (abfd) == NULL)
|
|
|
|
|
{
|
|
|
|
|
bfd_release (abfd, core_regsec (abfd));
|
|
|
|
|
goto loser2;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
core_stacksec (abfd)->name = ".stack";
|
|
|
|
|
core_datasec (abfd)->name = ".data";
|
|
|
|
|
core_regsec (abfd)->name = ".reg";
|
|
|
|
|
core_reg2sec (abfd)->name = ".reg2";
|
|
|
|
|
|
1991-09-04 09:52:46 +02:00
|
|
|
|
core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
|
|
|
|
|
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
|
|
|
|
|
core_regsec (abfd)->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
|
|
|
|
|
core_reg2sec (abfd)->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1992-10-09 02:39:06 +01:00
|
|
|
|
core_stacksec (abfd)->_raw_size = core->c_ssize;
|
|
|
|
|
core_datasec (abfd)->_raw_size = core->c_dsize;
|
|
|
|
|
core_regsec (abfd)->_raw_size = core->c_regs_size;
|
|
|
|
|
core_reg2sec (abfd)->_raw_size = core->fp_stuff_size;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
1991-08-23 09:24:32 +02:00
|
|
|
|
core_stacksec (abfd)->vma = (core->c_stacktop - core->c_ssize);
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
core_datasec (abfd)->vma = N_DATADDR (core->c_aouthdr);
|
1991-11-04 01:35:19 +01:00
|
|
|
|
core_regsec (abfd)->vma = 0;
|
|
|
|
|
core_reg2sec (abfd)->vma = 0;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
core_stacksec (abfd)->filepos = core->c_len + core->c_dsize;
|
|
|
|
|
core_datasec (abfd)->filepos = core->c_len;
|
1991-08-23 09:24:32 +02:00
|
|
|
|
/* We'll access the regs afresh in the core file, like any section: */
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
core_regsec (abfd)->filepos = (file_ptr) core->c_regs_pos;
|
|
|
|
|
core_reg2sec (abfd)->filepos = (file_ptr) core->fp_stuff_pos;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
|
|
|
|
/* Align to word at least */
|
|
|
|
|
core_stacksec (abfd)->alignment_power = 2;
|
|
|
|
|
core_datasec (abfd)->alignment_power = 2;
|
|
|
|
|
core_regsec (abfd)->alignment_power = 2;
|
|
|
|
|
core_reg2sec (abfd)->alignment_power = 2;
|
|
|
|
|
|
|
|
|
|
abfd->sections = core_stacksec (abfd);
|
|
|
|
|
core_stacksec (abfd)->next = core_datasec (abfd);
|
|
|
|
|
core_datasec (abfd)->next = core_regsec (abfd);
|
|
|
|
|
core_regsec (abfd)->next = core_reg2sec (abfd);
|
|
|
|
|
|
|
|
|
|
abfd->section_count = 4;
|
|
|
|
|
|
|
|
|
|
return abfd->xvec;
|
|
|
|
|
}
|
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
static char *
|
|
|
|
|
sunos4_core_file_failing_command (abfd)
|
|
|
|
|
bfd *abfd;
|
|
|
|
|
{
|
1992-10-09 02:39:06 +01:00
|
|
|
|
return core_hdr (abfd)->hdr->c_cmdname;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
sunos4_core_file_failing_signal (abfd)
|
|
|
|
|
bfd *abfd;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
{
|
1992-10-09 02:39:06 +01:00
|
|
|
|
return core_hdr (abfd)->hdr->c_signo;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static boolean
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
sunos4_core_file_matches_executable_p (core_bfd, exec_bfd)
|
|
|
|
|
bfd *core_bfd;
|
|
|
|
|
bfd *exec_bfd;
|
1991-05-21 02:14:16 +02:00
|
|
|
|
{
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
if (core_bfd->xvec != exec_bfd->xvec)
|
|
|
|
|
{
|
|
|
|
|
bfd_set_error (bfd_error_system_call);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
return (memcmp ((char *) &((core_hdr (core_bfd)->hdr)->c_aouthdr),
|
1992-10-09 02:39:06 +01:00
|
|
|
|
(char *) exec_hdr (exec_bfd),
|
|
|
|
|
sizeof (struct internal_exec)) == 0) ? true : false;
|
|
|
|
|
}
|
|
|
|
|
|
1993-04-17 03:44:18 +02:00
|
|
|
|
#define MY_set_sizes sunos4_set_sizes
|
1992-10-09 02:39:06 +01:00
|
|
|
|
static boolean
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
sunos4_set_sizes (abfd)
|
|
|
|
|
bfd *abfd;
|
1992-10-09 02:39:06 +01:00
|
|
|
|
{
|
|
|
|
|
switch (bfd_get_arch (abfd))
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
return false;
|
|
|
|
|
case bfd_arch_sparc:
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
adata (abfd).page_size = 0x2000;
|
|
|
|
|
adata (abfd).segment_size = 0x2000;
|
|
|
|
|
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
|
1992-10-09 02:39:06 +01:00
|
|
|
|
return true;
|
|
|
|
|
case bfd_arch_m68k:
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
adata (abfd).page_size = 0x2000;
|
|
|
|
|
adata (abfd).segment_size = 0x20000;
|
|
|
|
|
adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
|
1992-10-09 02:39:06 +01:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
* syms.c (BSF_DYNAMIC): New symbol flag.
(bfd_print_symbol_vandf): Print it.
* bfd-in2.h: Rebuilt.
* libaout.h (struct aout_backend_data): New read_dynamic_symbols
and read_dynamic_relocs fields.
(struct aoutdata): New dynamic_info field.
(obj_aout_dynamic_info): New accessor macro.
* sunos.c (struct sunos_dynamic_info): New structure.
(sunos_read_dynamic_info, MY(read_dynamic_symbols),
MY(read_dynamic_relocs)): New functions to read dynamic symbols
and relocs.
* aoutx.h (NAME(aout,some_aout_object_p)): If the object is
dynamically linked, set SEC_RELOC for both the .text and .data
sections.
(translate_from_native_sym_flags): Don't set BSF_LOCAL for an
undefined symbol.
(translate_symbol_table): New function, split out of
slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
(NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
(NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
(NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
return value.
* aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
out dynamic symbols or relocs against reloc symbols, since they
are already in the .text section and we wouldn't know where to
write them anyhow.
(sunos4_aout_backend): Initialize read_dynamic_symbols and
read_dynamic_relocs fields.
* aout-target.h (MY(backend_data)): Initialize
read_dynamic_symbols and read_dynamic_relocs fields.
1994-01-21 07:29:21 +01:00
|
|
|
|
#ifndef MY_read_dynamic_symbols
|
|
|
|
|
#define MY_read_dynamic_symbols 0
|
|
|
|
|
#endif
|
|
|
|
|
#ifndef MY_read_dynamic_relocs
|
|
|
|
|
#define MY_read_dynamic_relocs 0
|
|
|
|
|
#endif
|
|
|
|
|
|
* Most files:
Replace DEFUN and DEFUN_VOID with K&R-style function definition.
Indent some of them to GNU standards.
* aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
Update copyright years.
1994-03-15 16:13:13 +01:00
|
|
|
|
static CONST struct aout_backend_data sunos4_aout_backend =
|
|
|
|
|
{
|
* syms.c (BSF_DYNAMIC): New symbol flag.
(bfd_print_symbol_vandf): Print it.
* bfd-in2.h: Rebuilt.
* libaout.h (struct aout_backend_data): New read_dynamic_symbols
and read_dynamic_relocs fields.
(struct aoutdata): New dynamic_info field.
(obj_aout_dynamic_info): New accessor macro.
* sunos.c (struct sunos_dynamic_info): New structure.
(sunos_read_dynamic_info, MY(read_dynamic_symbols),
MY(read_dynamic_relocs)): New functions to read dynamic symbols
and relocs.
* aoutx.h (NAME(aout,some_aout_object_p)): If the object is
dynamically linked, set SEC_RELOC for both the .text and .data
sections.
(translate_from_native_sym_flags): Don't set BSF_LOCAL for an
undefined symbol.
(translate_symbol_table): New function, split out of
slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
(NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
(NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
(NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
return value.
* aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
out dynamic symbols or relocs against reloc symbols, since they
are already in the .text section and we wouldn't know where to
write them anyhow.
(sunos4_aout_backend): Initialize read_dynamic_symbols and
read_dynamic_relocs fields.
* aout-target.h (MY(backend_data)): Initialize
read_dynamic_symbols and read_dynamic_relocs fields.
1994-01-21 07:29:21 +01:00
|
|
|
|
0, /* zmagic files are not contiguous */
|
|
|
|
|
1, /* text includes header */
|
|
|
|
|
0, /* default text vma */
|
|
|
|
|
sunos4_set_sizes,
|
|
|
|
|
0, /* header is counted in zmagic text */
|
|
|
|
|
MY_read_dynamic_symbols,
|
|
|
|
|
MY_read_dynamic_relocs
|
1992-10-09 02:39:06 +01:00
|
|
|
|
};
|
1991-05-21 02:14:16 +02:00
|
|
|
|
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
#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
|
1991-07-04 18:52:56 +02:00
|
|
|
|
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
#define MY_bfd_debug_info_start bfd_void
|
|
|
|
|
#define MY_bfd_debug_info_end bfd_void
|
1993-04-17 03:44:18 +02:00
|
|
|
|
#define MY_bfd_debug_info_accumulate \
|
|
|
|
|
(void (*) PARAMS ((bfd *, struct sec *))) bfd_void
|
|
|
|
|
#define MY_core_file_p sunos4_core_file_p
|
|
|
|
|
#define MY_write_object_contents NAME(aout,sunos4_write_object_contents)
|
1992-10-09 02:39:06 +01:00
|
|
|
|
#define MY_backend_data &sunos4_aout_backend
|
1991-07-04 18:52:56 +02:00
|
|
|
|
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
#define TARGET_IS_BIG_ENDIAN_P
|
1991-07-04 18:52:56 +02:00
|
|
|
|
|
* 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.
1991-12-01 06:24:02 +01:00
|
|
|
|
#include "aout-target.h"
|