Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
/* Generic target-file-type support for the BFD library.
|
1995-03-08 04:41:13 +00:00
|
|
|
Copyright 1990, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
Written by Cygnus Support.
|
1991-03-21 21:11:25 +00:00
|
|
|
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
1991-03-21 21:11:25 +00:00
|
|
|
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
1991-03-21 21:11:25 +00:00
|
|
|
it under the terms of the GNU General Public License as published by
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
1991-03-21 21:11:25 +00:00
|
|
|
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
This program is distributed in the hope that it will be useful,
|
1991-03-21 21:11:25 +00: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
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
1991-03-21 21:11:25 +00:00
|
|
|
|
|
|
|
#include "bfd.h"
|
1991-10-11 10:11:37 +00:00
|
|
|
#include "sysdep.h"
|
1991-03-21 21:11:25 +00:00
|
|
|
#include "libbfd.h"
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
/*
|
|
|
|
SECTION
|
|
|
|
Targets
|
|
|
|
|
1992-01-24 22:44:51 +00:00
|
|
|
DESCRIPTION
|
1991-12-01 00:39:12 +00:00
|
|
|
Each port of BFD to a different machine requries the creation
|
|
|
|
of a target back end. All the back end provides to the root
|
|
|
|
part of BFD is a structure containing pointers to functions
|
|
|
|
which perform certain low level operations on files. BFD
|
|
|
|
translates the applications's requests through a pointer into
|
|
|
|
calls to the back end routines.
|
|
|
|
|
|
|
|
When a file is opened with <<bfd_openr>>, its format and
|
|
|
|
target are unknown. BFD uses various mechanisms to determine
|
|
|
|
how to interpret the file. The operations performed are:
|
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
o Create a BFD by calling the internal routine
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
<<_bfd_new_bfd>>, then call <<bfd_find_target>> with the
|
1991-12-01 00:39:12 +00:00
|
|
|
target string supplied to <<bfd_openr>> and the new BFD pointer.
|
|
|
|
|
|
|
|
o If a null target string was provided to <<bfd_find_target>>,
|
1993-11-05 19:51:52 +00:00
|
|
|
look up the environment variable <<GNUTARGET>> and use
|
1991-12-01 00:39:12 +00:00
|
|
|
that as the target string.
|
|
|
|
|
1993-11-17 20:31:32 +00:00
|
|
|
o If the target string is still <<NULL>>, or the target string is
|
1993-11-05 19:51:52 +00:00
|
|
|
<<default>>, then use the first item in the target vector
|
|
|
|
as the target type, and set <<target_defaulted>> in the BFD to
|
1992-09-26 02:20:05 +00:00
|
|
|
cause <<bfd_check_format>> to loop through all the targets.
|
|
|
|
@xref{bfd_target}. @xref{Formats}.
|
1991-12-01 00:39:12 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
o Otherwise, inspect the elements in the target vector
|
1991-12-01 00:39:12 +00:00
|
|
|
one by one, until a match on target name is found. When found,
|
1993-11-05 19:51:52 +00:00
|
|
|
use it.
|
1991-12-01 00:39:12 +00:00
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
o Otherwise return the error <<bfd_error_invalid_target>> to
|
1991-12-01 00:39:12 +00:00
|
|
|
<<bfd_openr>>.
|
|
|
|
|
|
|
|
o <<bfd_openr>> attempts to open the file using
|
|
|
|
<<bfd_open_file>>, and returns the BFD.
|
|
|
|
|
|
|
|
Once the BFD has been opened and the target selected, the file
|
|
|
|
format may be determined. This is done by calling
|
1992-09-26 02:20:05 +00:00
|
|
|
<<bfd_check_format>> on the BFD with a suggested format.
|
|
|
|
If <<target_defaulted>> has been set, each possible target
|
1993-11-05 19:51:52 +00:00
|
|
|
type is tried to see if it recognizes the specified format.
|
|
|
|
<<bfd_check_format>> returns <<true>> when the caller guesses right.
|
1991-10-08 19:20:35 +00:00
|
|
|
@menu
|
1992-01-24 22:44:51 +00:00
|
|
|
@* bfd_target::
|
1991-10-08 19:20:35 +00:00
|
|
|
@end menu
|
1991-07-04 16:52:56 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
/*
|
|
|
|
|
1992-01-24 22:44:51 +00:00
|
|
|
INODE
|
|
|
|
bfd_target, , Targets, Targets
|
1992-08-27 22:11:48 +00:00
|
|
|
DOCDD
|
1991-12-01 00:39:12 +00:00
|
|
|
SUBSECTION
|
|
|
|
bfd_target
|
|
|
|
|
1992-01-24 22:44:51 +00:00
|
|
|
DESCRIPTION
|
1991-12-01 00:39:12 +00:00
|
|
|
This structure contains everything that BFD knows about a
|
1993-11-05 19:51:52 +00:00
|
|
|
target. It includes things like its byte order, name, and which
|
|
|
|
routines to call to do various operations.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
Every BFD points to a target structure with its <<xvec>>
|
|
|
|
member.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
The macros below are used to dispatch to functions through the
|
|
|
|
<<bfd_target>> vector. They are used in a number of macros further
|
1991-12-01 00:39:12 +00:00
|
|
|
down in @file{bfd.h}, and are also used when calling various
|
1993-11-05 19:51:52 +00:00
|
|
|
routines by hand inside the BFD implementation. The @var{arglist}
|
1991-12-01 00:39:12 +00:00
|
|
|
argument must be parenthesized; it contains all the arguments
|
|
|
|
to the called function.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1992-06-16 12:04:03 +00:00
|
|
|
They make the documentation (more) unpleasant to read, so if
|
|
|
|
someone wants to fix this and not break the above, please do.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
.#define BFD_SEND(bfd, message, arglist) \
|
|
|
|
. ((*((bfd)->xvec->message)) arglist)
|
1994-02-27 23:45:18 +00:00
|
|
|
.
|
|
|
|
.#ifdef DEBUG_BFD_SEND
|
|
|
|
.#undef BFD_SEND
|
|
|
|
.#define BFD_SEND(bfd, message, arglist) \
|
|
|
|
. (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
|
|
|
|
. ((*((bfd)->xvec->message)) arglist) : \
|
|
|
|
. (bfd_assert (__FILE__,__LINE__), NULL))
|
|
|
|
.#endif
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
For operations which index on the BFD format:
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
.#define BFD_SEND_FMT(bfd, message, arglist) \
|
|
|
|
. (((bfd)->xvec->message[(int)((bfd)->format)]) arglist)
|
1994-02-27 23:45:18 +00:00
|
|
|
.
|
|
|
|
.#ifdef DEBUG_BFD_SEND
|
|
|
|
.#undef BFD_SEND_FMT
|
|
|
|
.#define BFD_SEND_FMT(bfd, message, arglist) \
|
|
|
|
. (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
|
|
|
|
. (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \
|
|
|
|
. (bfd_assert (__FILE__,__LINE__), NULL))
|
|
|
|
.#endif
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
This is the structure which defines the type of BFD this is. The
|
1991-12-01 00:39:12 +00:00
|
|
|
<<xvec>> member of the struct <<bfd>> itself points here. Each
|
|
|
|
module that implements access to a different target under BFD,
|
|
|
|
defines one of these.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
FIXME, these names should be rationalised with the names of
|
|
|
|
the entry points which call them. Too bad we can't have one
|
|
|
|
macro to define them both!
|
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
.enum bfd_flavour {
|
|
|
|
. bfd_target_unknown_flavour,
|
|
|
|
. bfd_target_aout_flavour,
|
|
|
|
. bfd_target_coff_flavour,
|
|
|
|
. bfd_target_ecoff_flavour,
|
|
|
|
. bfd_target_elf_flavour,
|
|
|
|
. bfd_target_ieee_flavour,
|
|
|
|
. bfd_target_nlm_flavour,
|
|
|
|
. bfd_target_oasys_flavour,
|
|
|
|
. bfd_target_tekhex_flavour,
|
|
|
|
. bfd_target_srec_flavour,
|
1994-02-28 23:49:08 +00:00
|
|
|
. bfd_target_som_flavour,
|
1995-03-08 04:41:13 +00:00
|
|
|
. bfd_target_os9k_flavour,
|
1995-06-29 01:17:58 +00:00
|
|
|
. bfd_target_versados_flavour
|
1995-03-08 04:41:13 +00:00
|
|
|
.};
|
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 19:56:50 +00:00
|
|
|
.
|
|
|
|
.{* Forward declaration. *}
|
|
|
|
.typedef struct bfd_link_info _bfd_link_info;
|
|
|
|
.
|
1991-12-01 00:39:12 +00:00
|
|
|
.typedef struct bfd_target
|
|
|
|
.{
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
Identifies the kind of target, e.g., SunOS4, Ultrix, etc.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
. char *name;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
The "flavour" of a back end is a general indication about the contents
|
|
|
|
of a file.
|
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
. enum bfd_flavour flavour;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
The order of bytes within the data area of a file.
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
. boolean byteorder_big_p;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
The order of bytes within the header parts of a file.
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
. boolean header_byteorder_big_p;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
A mask of all the flags which an executable may have set -
|
1991-12-01 00:39:12 +00:00
|
|
|
from the set <<NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
. flagword object_flags;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
A mask of all the flags which a section may have set - from
|
1991-12-01 00:39:12 +00:00
|
|
|
the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
. flagword section_flags;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1992-11-05 13:17:38 +00:00
|
|
|
The character normally found at the front of a symbol
|
1993-11-05 19:51:52 +00:00
|
|
|
(if any), perhaps `_'.
|
1992-11-05 13:17:38 +00:00
|
|
|
|
|
|
|
. char symbol_leading_char;
|
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
The pad character for file names within an archive header.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
. char ar_pad_char;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
The maximum number of characters in an archive header.
|
|
|
|
|
1992-12-21 21:17:54 +00:00
|
|
|
. unsigned short ar_max_namelen;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
The minimum alignment restriction for any section.
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
. unsigned int align_power_min;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
Entries for byte swapping for data. These are different from the other
|
|
|
|
entry points, since they don't take a BFD asthe first argument.
|
|
|
|
Certain other handlers could do the same.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1994-01-22 04:28:17 +00:00
|
|
|
. bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
|
|
|
|
. bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
|
1992-12-21 21:17:54 +00:00
|
|
|
. void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
|
1994-01-22 04:28:17 +00:00
|
|
|
. bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
|
|
|
|
. bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
|
1992-12-21 21:17:54 +00:00
|
|
|
. void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
|
1994-01-22 04:28:17 +00:00
|
|
|
. bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
|
|
|
|
. bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
|
1992-12-21 21:17:54 +00:00
|
|
|
. void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
Byte swapping for the headers
|
|
|
|
|
1994-01-22 04:28:17 +00:00
|
|
|
. bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
|
|
|
|
. bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
|
1992-12-21 21:17:54 +00:00
|
|
|
. void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
|
1994-01-22 04:28:17 +00:00
|
|
|
. bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
|
|
|
|
. bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
|
1992-12-21 21:17:54 +00:00
|
|
|
. void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
|
1994-01-22 04:28:17 +00:00
|
|
|
. bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
|
|
|
|
. bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
|
1992-12-21 21:17:54 +00:00
|
|
|
. void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1992-12-21 21:17:54 +00:00
|
|
|
Format dependent routines: these are vectors of entry points
|
|
|
|
within the target vector structure, one for each format to check.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
Check the format of a file being read. Return a <<bfd_target *>> or zero.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
. const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
Set the format of a file being written.
|
|
|
|
|
1992-12-21 21:17:54 +00:00
|
|
|
. boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
Write cached information into a file being written, at <<bfd_close>>.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1992-12-21 21:17:54 +00:00
|
|
|
. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
|
1991-07-04 16:52:56 +00:00
|
|
|
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
The general target vector.
|
1991-07-04 16:52:56 +00:00
|
|
|
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
.
|
|
|
|
. {* Generic entry points. *}
|
|
|
|
.#define BFD_JUMP_TABLE_GENERIC(NAME)\
|
|
|
|
.CAT(NAME,_close_and_cleanup),\
|
|
|
|
.CAT(NAME,_bfd_free_cached_info),\
|
|
|
|
.CAT(NAME,_new_section_hook),\
|
|
|
|
.CAT(NAME,_get_section_contents)
|
|
|
|
. {* Called when the BFD is being closed to do any necessary cleanup. *}
|
|
|
|
. boolean (*_close_and_cleanup) PARAMS ((bfd *));
|
|
|
|
. {* Ask the BFD to free all cached information. *}
|
|
|
|
. boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
|
|
|
|
. {* Called when a new section is created. *}
|
|
|
|
. boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
|
|
|
|
. {* Read the contents of a section. *}
|
|
|
|
. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
|
|
|
|
. file_ptr, bfd_size_type));
|
|
|
|
.
|
|
|
|
. {* Entry points to copy private data. *}
|
|
|
|
.#define BFD_JUMP_TABLE_COPY(NAME)\
|
|
|
|
.CAT(NAME,_bfd_copy_private_bfd_data),\
|
1995-05-09 21:07:06 +00:00
|
|
|
.CAT(NAME,_bfd_merge_private_bfd_data),\
|
|
|
|
.CAT(NAME,_bfd_copy_private_section_data),\
|
1995-06-29 01:17:58 +00:00
|
|
|
.CAT(NAME,_bfd_copy_private_symbol_data),\
|
1995-05-09 21:07:06 +00:00
|
|
|
.CAT(NAME,_bfd_set_private_flags)
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. {* Called to copy BFD general private data from one object file
|
|
|
|
. to another. *}
|
|
|
|
. boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
|
1995-05-09 21:07:06 +00:00
|
|
|
. {* Called to merge BFD general private data from one object file
|
|
|
|
. to a common output file when linking. *}
|
|
|
|
. boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. {* Called to copy BFD private section data from one object file
|
|
|
|
. to another. *}
|
|
|
|
. boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
|
|
|
|
. bfd *, sec_ptr));
|
1995-06-29 01:17:58 +00:00
|
|
|
. {* Called to copy BFD private symbol data from one symbol
|
|
|
|
. to another. *}
|
|
|
|
. boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
|
|
|
|
. bfd *, asymbol *));
|
1995-05-09 21:07:06 +00:00
|
|
|
. {* Called to set private backend flags *}
|
|
|
|
. boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
.
|
|
|
|
. {* Core file entry points. *}
|
|
|
|
.#define BFD_JUMP_TABLE_CORE(NAME)\
|
|
|
|
.CAT(NAME,_core_file_failing_command),\
|
|
|
|
.CAT(NAME,_core_file_failing_signal),\
|
|
|
|
.CAT(NAME,_core_file_matches_executable_p)
|
1992-12-21 21:17:54 +00:00
|
|
|
. char * (*_core_file_failing_command) PARAMS ((bfd *));
|
|
|
|
. int (*_core_file_failing_signal) PARAMS ((bfd *));
|
|
|
|
. boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
.
|
|
|
|
. {* Archive entry points. *}
|
|
|
|
.#define BFD_JUMP_TABLE_ARCHIVE(NAME)\
|
|
|
|
.CAT(NAME,_slurp_armap),\
|
|
|
|
.CAT(NAME,_slurp_extended_name_table),\
|
1994-10-21 23:43:29 +00:00
|
|
|
.CAT(NAME,_construct_extended_name_table),\
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
.CAT(NAME,_truncate_arname),\
|
|
|
|
.CAT(NAME,_write_armap),\
|
|
|
|
.CAT(NAME,_openr_next_archived_file),\
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
.CAT(NAME,_generic_stat_arch_elt),\
|
|
|
|
.CAT(NAME,_update_armap_timestamp)
|
1992-12-21 21:17:54 +00:00
|
|
|
. boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
|
|
|
|
. boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
|
1994-10-21 23:43:29 +00:00
|
|
|
. boolean (*_bfd_construct_extended_name_table)
|
|
|
|
. PARAMS ((bfd *, char **, bfd_size_type *, const char **));
|
1992-12-21 21:17:54 +00:00
|
|
|
. void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
|
|
|
|
. boolean (*write_armap) PARAMS ((bfd *arch,
|
1991-12-01 00:39:12 +00:00
|
|
|
. unsigned int elength,
|
|
|
|
. struct orl *map,
|
|
|
|
. unsigned int orl_count,
|
|
|
|
. int stridx));
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
. bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
|
|
|
|
. int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
|
|
|
|
. boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
|
|
|
|
.
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. {* Entry points used for symbols. *}
|
|
|
|
.#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
|
|
|
|
.CAT(NAME,_get_symtab_upper_bound),\
|
|
|
|
.CAT(NAME,_get_symtab),\
|
|
|
|
.CAT(NAME,_make_empty_symbol),\
|
|
|
|
.CAT(NAME,_print_symbol),\
|
|
|
|
.CAT(NAME,_get_symbol_info),\
|
|
|
|
.CAT(NAME,_bfd_is_local_label),\
|
|
|
|
.CAT(NAME,_get_lineno),\
|
|
|
|
.CAT(NAME,_find_nearest_line),\
|
|
|
|
.CAT(NAME,_bfd_make_debug_symbol)
|
Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Changes to let BFD return an error indication from
get_symtab_upper_bound, bfd_canonicalize_symtab,
bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now
return long instead of unsigned int, and use -1 to indicate an
error. Along the way, rename get_symtab_upper_bound to
bfd_get_symtab_upper_bound.
* bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
errors.
(bfd_canonicalize_reloc): Likewise.
* syms.c (bfd_get_symtab_upper_bound): Renamed from
get_symtab_upper_bound.
* targets.c (bfd_target): Renamed _get_symtab_upper_bound to
_bfd_get_symtab_upper_bound, and changed it and
_bfd_canonicalize_symtab and _get_reloc_upper_bound and
_bfd_canonicalize_reloc to all return long.
* aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
(NAME(aout,canonicalize_reloc)): Likewise.
(NAME(aout,get_reloc_upper_bound)): Likewise.
(NAME(aout,get_symtab_upper_bound)): Likewise.
* bout.c (b_out_canonicalize_reloc): Likewise.
(b_out_get_reloc_upper_bound): Likewise.
* coffcode.h (coff_canonicalize_reloc): Likewise.
* coffgen.c (coff_get_symtab_upper_bound): Likewise.
(coff_get_symtab): Likewise.
(coff_get_reloc_upper_bound): Likewise.
* ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
(ecoff_get_symtab): Likewise.
(ecoff_canonicalize_reloc): Likewise.
* elfcode.h (elf_get_symtab_upper_bound): Likewise.
(elf_get_reloc_upper_bound): Likewise.
(elf_canonicalize_reloc): Likewise.
(elf_get_symtab): Likewise.
* hp300hpux.c (MY(get_symtab)): Likewise.
(MY(get_symtab_upper_bound)): Likewise.
(MY(canonicalize_reloc)): Likewise.
* i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
* ieee.c (ieee_slurp_external_symbols): Change return type to
boolean. Check for errors from get_symbol.
(ieee_slurp_symbol_table): Change return type to boolean. Check
for errors from ieee_slurp_external_symbols.
(ieee_get_symtab_upper_bound): Return long, and -1 on errors.
(ieee_get_symtab): Likewise.
(ieee_get_reloc_upper_bound): Likewise.
(ieee_canonicalize_reloc): Likewise.
* mipsbsd.c (MY(canonicalize_reloc)): Likewise.
* nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
(nlm_get_symtab): Likewise.
(nlm_get_reloc_upper_bound): Likewise.
(nlm_canonicalize_reloc): Likewise.
* oasys.c (oasys_get_symtab_upper_bound): Likewise.
(oasys_get_symtab): Likewise.
(oasys_get_reloc_upper_bound): Likewise.
(oasys_canonicalize_reloc): Likewise.
* som.c (som_get_symtab_upper_bound): Likewise.
(som_get_symtab): Likewise.
(som_get_reloc_upper_bound): Likewise.
(som_canonicalize_reloc): Likewise.
* srec.c (srec_get_symtab_upper_bound): Likewise.
(srec_get_symtab): Likewise.
(srec_get_reloc_upper_bound): Define as bfd_0l.
(srec_canonicalize_reloc): Likewise.
* tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
(tekhex_get_symtab_upper_bound): Likewise.
(tekhex_get_reloc_upper_bound): Define as bfd_0l.
(tekhex_canonicalize_reloc): Likewise.
* libaout.h (NAME(aout,get_symtab_upper_bound)): Change
declaration to return long.
(NAME(aout,get_symtab)): Likewise.
(NAME(aout,canonicalize_reloc)): Likewise.
(NAME(aout,get_reloc_upper_bound)): Likewise.
* libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
(coff_get_symtab): Likewise.
(coff_get_reloc_upper_bound): Likewise.
* libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
(ecoff_get_symtab): Likewise.
(ecoff_canonicalize_reloc): Likewise.
* libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
(bfd_elf32_get_symtab): Likewise.
(bfd_elf32_get_reloc_upper_bound): Likewise.
(bfd_elf32_canonicalize_reloc): Likewise.
(bfd_elf64_get_symtab_upper_bound): Likewise.
(bfd_elf64_get_symtab): Likewise.
(bfd_elf64_get_reloc_upper_bound): Likewise.
(bfd_elf64_canonicalize_reloc): Likewise.
* libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
(nlmNAME(get_symtab)): Likewise.
(nlmNAME(get_reloc_upper_bound)): Likewise.
(nlmNAME(canonicalize_reloc)): Likewise.
* archive.c (compute_and_write_armap): Use error_return and
no_memory_return labels rather than freeing information in various
places. Change storage, symcount and src_count to long. Check
errors from bfd_get_symtab_upper_bound and
bfd_canonicalize_symtab.
* bout.c (b_out_relax_section): Change reloc_size to long. Check
for errors from bfd_get_reloc_upper_bound and
bfd_canonicalize_reloc.
(b_out_get_relocated_section_contents): Likewise.
* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
Likewise.
* elf32-mips.c: Likewise.
* elf32-hppa.c (hppa_elf_stub_finish): Likewise.
(hppa_look_for_stubs_in_section): Check for errors from
bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
bfd_canonicalize_reloc.
* ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
* linker.c (generic_link_read_symbols): Likewise.
(_bfd_generic_final_link): Check for errors from
bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
* reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
(bfd_coff_reloc16_get_relocated_section_contents): Likewise.
* libbfd.c (bfd_0l): New function.
* libbfd-in.h (bfd_0l): Declare.
* aix386-core.c: Change get_symtab_upper_bound, get_symtab,
get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
than bfd_0u.
* cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
* irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
* libcoff.h: Rebuilt.
* nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
temp and name.
1994-03-30 22:15:07 +00:00
|
|
|
. long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
|
|
|
|
. long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
|
|
|
|
. struct symbol_cache_entry **));
|
1992-12-21 21:17:54 +00:00
|
|
|
. struct symbol_cache_entry *
|
|
|
|
. (*_bfd_make_empty_symbol) PARAMS ((bfd *));
|
|
|
|
. void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
|
|
|
|
. struct symbol_cache_entry *,
|
1991-12-01 00:39:12 +00:00
|
|
|
. bfd_print_symbol_type));
|
|
|
|
.#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
|
1993-05-21 21:06:25 +00:00
|
|
|
. void (*_bfd_get_symbol_info) PARAMS ((bfd *,
|
|
|
|
. struct symbol_cache_entry *,
|
|
|
|
. symbol_info *));
|
|
|
|
.#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
|
1994-03-30 08:53:45 +00:00
|
|
|
. boolean (*_bfd_is_local_label) PARAMS ((bfd *, asymbol *));
|
1991-12-01 00:39:12 +00:00
|
|
|
.
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
|
1992-12-21 21:17:54 +00:00
|
|
|
. boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
|
|
|
|
. struct sec *section, struct symbol_cache_entry **symbols,
|
|
|
|
. bfd_vma offset, CONST char **file, CONST char **func,
|
|
|
|
. unsigned int *line));
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. {* Back-door to allow format-aware applications to create debug symbols
|
|
|
|
. while using BFD for everything else. Currently used by the assembler
|
|
|
|
. when creating COFF files. *}
|
|
|
|
. asymbol * (*_bfd_make_debug_symbol) PARAMS ((
|
|
|
|
. bfd *abfd,
|
|
|
|
. void *ptr,
|
|
|
|
. unsigned long size));
|
1991-12-01 00:39:12 +00:00
|
|
|
.
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. {* Routines for relocs. *}
|
|
|
|
.#define BFD_JUMP_TABLE_RELOCS(NAME)\
|
|
|
|
.CAT(NAME,_get_reloc_upper_bound),\
|
|
|
|
.CAT(NAME,_canonicalize_reloc),\
|
|
|
|
.CAT(NAME,_bfd_reloc_type_lookup)
|
|
|
|
. long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
|
|
|
|
. long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
|
|
|
|
. struct symbol_cache_entry **));
|
|
|
|
. {* See documentation on reloc types. *}
|
1995-03-08 04:41:13 +00:00
|
|
|
. reloc_howto_type *
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. (*reloc_type_lookup) PARAMS ((bfd *abfd,
|
|
|
|
. bfd_reloc_code_real_type code));
|
1991-12-01 00:39:12 +00:00
|
|
|
.
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. {* Routines used when writing an object file. *}
|
|
|
|
.#define BFD_JUMP_TABLE_WRITE(NAME)\
|
|
|
|
.CAT(NAME,_set_arch_mach),\
|
|
|
|
.CAT(NAME,_set_section_contents)
|
|
|
|
. boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
|
|
|
|
. unsigned long));
|
|
|
|
. boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
|
|
|
|
. file_ptr, bfd_size_type));
|
1991-12-01 00:39:12 +00:00
|
|
|
.
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. {* Routines used by the linker. *}
|
|
|
|
.#define BFD_JUMP_TABLE_LINK(NAME)\
|
|
|
|
.CAT(NAME,_sizeof_headers),\
|
|
|
|
.CAT(NAME,_bfd_get_relocated_section_contents),\
|
|
|
|
.CAT(NAME,_bfd_relax_section),\
|
|
|
|
.CAT(NAME,_bfd_link_hash_table_create),\
|
|
|
|
.CAT(NAME,_bfd_link_add_symbols),\
|
1995-06-29 01:17:58 +00:00
|
|
|
.CAT(NAME,_bfd_final_link),\
|
|
|
|
.CAT(NAME,_bfd_link_split_section)
|
* targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
_bfd_debug_info_accumulate, which were never used.
(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
rather than the single JUMP_TABLE macro. Removed many of the
weird macro definitions needed to support the monolithic
JUMP_TABLE.
* bfd-in.h (JUMP_TABLE): Removed.
* libbfd-in.h: Define a bunch of macros, and declare a few
functions, for use with the new BFD_JUMP_TABLE_* macros.
* libbfd.c (_bfd_dummy_new_section_hook): Removed.
(bfd_false): Set bfd_error_invalid_operation.
(bfd_nullvoidptr): Likewise.
(bfd_n1): New function.
(_bfd_nocore_core_file_matches_executable_p): Renamed from
_bfd_dummy_core_file_matches_executable_p.
(_bfd_nocore_core_file_failing_command): Similar rename. Set
bfd_error_invalid_operation.
(_bfd_nocore_core_file_failing_signal): Likewise.
(_bfd_generic_get_section_contents): Renamed from
bfd_generic_get_section_contents. Changed all callers.
(_bfd_generic_set_section_contents): Similar rename.
* ieee.c: #if 0 out ieee_bfd_debug_info_start,
ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
were never called.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
|
|
|
. int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
|
1992-12-21 21:17:54 +00:00
|
|
|
. bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((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 19:56:50 +00:00
|
|
|
. struct bfd_link_info *, struct bfd_link_order *,
|
|
|
|
. bfd_byte *data, boolean relocateable,
|
|
|
|
. struct symbol_cache_entry **));
|
1991-12-01 00:39:12 +00:00
|
|
|
.
|
1992-12-21 21:17:54 +00:00
|
|
|
. boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
|
1994-03-30 08:53:45 +00:00
|
|
|
. struct bfd_link_info *, boolean *again));
|
1993-02-27 01:43:10 +00:00
|
|
|
.
|
1994-04-07 01:48:51 +00:00
|
|
|
. {* Create a hash table for the linker. Different backends store
|
|
|
|
. different information in this table. *}
|
|
|
|
. struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((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 19:56:50 +00:00
|
|
|
.
|
1994-04-07 01:48:51 +00:00
|
|
|
. {* Add symbols from this object file into the hash table. *}
|
|
|
|
. boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
|
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 19:56:50 +00:00
|
|
|
.
|
1994-04-07 01:48:51 +00:00
|
|
|
. {* Do a link based on the link_order structures attached to each
|
|
|
|
. section of the BFD. *}
|
|
|
|
. boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
|
|
|
|
.
|
1995-06-29 01:17:58 +00:00
|
|
|
. {* Should this section be split up into smaller pieces during linking. *}
|
|
|
|
. boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
|
|
|
|
.
|
1994-04-07 01:48:51 +00:00
|
|
|
. {* Routines to handle dynamic symbols and relocs. *}
|
|
|
|
.#define BFD_JUMP_TABLE_DYNAMIC(NAME)\
|
|
|
|
.CAT(NAME,_get_dynamic_symtab_upper_bound),\
|
|
|
|
.CAT(NAME,_canonicalize_dynamic_symtab),\
|
|
|
|
.CAT(NAME,_get_dynamic_reloc_upper_bound),\
|
|
|
|
.CAT(NAME,_canonicalize_dynamic_reloc)
|
|
|
|
. {* Get the amount of memory required to hold the dynamic symbols. *}
|
|
|
|
. long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
|
|
|
|
. {* Read in the dynamic symbols. *}
|
|
|
|
. long (*_bfd_canonicalize_dynamic_symtab)
|
|
|
|
. PARAMS ((bfd *, struct symbol_cache_entry **));
|
|
|
|
. {* Get the amount of memory required to hold the dynamic relocs. *}
|
|
|
|
. long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
|
|
|
|
. {* Read in the dynamic relocs. *}
|
|
|
|
. long (*_bfd_canonicalize_dynamic_reloc)
|
|
|
|
. PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
|
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 19:56:50 +00:00
|
|
|
.
|
1992-06-16 12:04:03 +00:00
|
|
|
|
1993-04-17 00:39:36 +00:00
|
|
|
Data for use by back-end routines, which isn't generic enough to belong
|
|
|
|
in this structure.
|
1992-06-16 12:04:03 +00:00
|
|
|
|
|
|
|
. PTR backend_data;
|
1991-12-01 00:39:12 +00:00
|
|
|
.} bfd_target;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
*/
|
1991-11-22 19:09:03 +00:00
|
|
|
|
1993-08-19 18:21:58 +00:00
|
|
|
/* All known xvecs (even those that don't compile on all systems).
|
|
|
|
Alphabetized for easy reference.
|
|
|
|
They are listed a second time below, since
|
* aoutx.h, archive.c, archures.c, bfd.c, cache.c, coff-m88k.c,
coffcode.h, core.c, ctor.c, elf.c, format.c, ieee.c, init.c,
libbfd.c, libbfd.h, libcoff.h, opncls.c, reloc.c, section.c,
srec.c, syms.c, targets.c : all new documentation and lint
removal.
1991-12-08 00:56:56 +00:00
|
|
|
we can't intermix extern's and initializers. */
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target a29kcoff_big_vec;
|
|
|
|
extern const bfd_target a_out_adobe_vec;
|
1995-06-29 01:17:58 +00:00
|
|
|
extern const bfd_target aout_arm_big_vec;
|
|
|
|
extern const bfd_target aout_arm_little_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target aout_mips_big_vec;
|
|
|
|
extern const bfd_target aout_mips_little_vec;
|
|
|
|
extern const bfd_target aout0_big_vec;
|
|
|
|
extern const bfd_target apollocoff_vec;
|
1995-06-29 01:17:58 +00:00
|
|
|
extern const bfd_target armpe_vec;
|
|
|
|
extern const bfd_target armpei_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target b_out_vec_big_host;
|
|
|
|
extern const bfd_target b_out_vec_little_host;
|
1995-01-16 05:44:00 +00:00
|
|
|
/* start-sanitize-arc */
|
1995-03-08 04:41:13 +00:00
|
|
|
extern const bfd_target bfd_elf32_bigarc_vec;
|
|
|
|
extern const bfd_target bfd_elf32_littlearc_vec;
|
1995-01-16 05:44:00 +00:00
|
|
|
/* end-sanitize-arc */
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target bfd_elf32_big_generic_vec;
|
|
|
|
extern const bfd_target bfd_elf32_bigmips_vec;
|
|
|
|
extern const bfd_target bfd_elf32_hppa_vec;
|
|
|
|
extern const bfd_target bfd_elf32_i386_vec;
|
|
|
|
extern const bfd_target bfd_elf32_i860_vec;
|
|
|
|
extern const bfd_target bfd_elf32_little_generic_vec;
|
|
|
|
extern const bfd_target bfd_elf32_littlemips_vec;
|
|
|
|
extern const bfd_target bfd_elf32_m68k_vec;
|
|
|
|
extern const bfd_target bfd_elf32_m88k_vec;
|
|
|
|
extern const bfd_target bfd_elf32_powerpc_vec;
|
1995-05-09 21:07:06 +00:00
|
|
|
extern const bfd_target bfd_elf32_powerpcle_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target bfd_elf32_sparc_vec;
|
|
|
|
extern const bfd_target bfd_elf64_big_generic_vec;
|
|
|
|
extern const bfd_target bfd_elf64_little_generic_vec;
|
|
|
|
extern const bfd_target bfd_elf64_sparc_vec;
|
|
|
|
extern const bfd_target demo_64_vec;
|
|
|
|
extern const bfd_target ecoff_big_vec;
|
|
|
|
extern const bfd_target ecoff_little_vec;
|
|
|
|
extern const bfd_target ecoffalpha_little_vec;
|
|
|
|
extern const bfd_target h8300coff_vec;
|
|
|
|
extern const bfd_target h8500coff_vec;
|
|
|
|
extern const bfd_target host_aout_vec;
|
|
|
|
extern const bfd_target hp300bsd_vec;
|
|
|
|
extern const bfd_target hp300hpux_vec;
|
|
|
|
extern const bfd_target som_vec;
|
|
|
|
extern const bfd_target i386aout_vec;
|
|
|
|
extern const bfd_target i386bsd_vec;
|
|
|
|
extern const bfd_target i386dynix_vec;
|
|
|
|
extern const bfd_target i386os9k_vec;
|
|
|
|
extern const bfd_target i386coff_vec;
|
1995-06-29 01:17:58 +00:00
|
|
|
extern const bfd_target i386pe_vec;
|
|
|
|
extern const bfd_target i386pei_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target go32coff_vec;
|
|
|
|
extern const bfd_target i386linux_vec;
|
|
|
|
extern const bfd_target i386lynx_aout_vec;
|
|
|
|
extern const bfd_target i386lynx_coff_vec;
|
|
|
|
extern const bfd_target i386mach3_vec;
|
1995-03-08 04:41:13 +00:00
|
|
|
extern const bfd_target i386msdos_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target i386netbsd_vec;
|
|
|
|
extern const bfd_target icoff_big_vec;
|
|
|
|
extern const bfd_target icoff_little_vec;
|
|
|
|
extern const bfd_target ieee_vec;
|
|
|
|
extern const bfd_target m68kcoff_vec;
|
|
|
|
extern const bfd_target m68kcoffun_vec;
|
|
|
|
extern const bfd_target m68klynx_aout_vec;
|
|
|
|
extern const bfd_target m68klynx_coff_vec;
|
1994-11-24 03:33:48 +00:00
|
|
|
extern const bfd_target m68knetbsd_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target m88kbcs_vec;
|
|
|
|
extern const bfd_target m88kmach3_vec;
|
|
|
|
extern const bfd_target newsos3_vec;
|
|
|
|
extern const bfd_target nlm32_i386_vec;
|
|
|
|
extern const bfd_target nlm32_sparc_vec;
|
|
|
|
extern const bfd_target nlm32_alpha_vec;
|
|
|
|
extern const bfd_target nlm32_powerpc_vec;
|
1994-10-18 18:51:01 +00:00
|
|
|
extern const bfd_target pc532netbsd_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target oasys_vec;
|
|
|
|
extern const bfd_target pc532machaout_vec;
|
|
|
|
extern const bfd_target riscix_vec;
|
|
|
|
extern const bfd_target rs6000coff_vec;
|
|
|
|
extern const bfd_target shcoff_vec;
|
1994-11-25 00:01:26 +00:00
|
|
|
/* start-sanitize-rce */
|
|
|
|
extern bfd_target rce_aout_vec;
|
|
|
|
/* end-sanitize-rce */
|
1994-11-24 03:33:48 +00:00
|
|
|
extern const bfd_target shlcoff_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target sparclynx_aout_vec;
|
|
|
|
extern const bfd_target sparclynx_coff_vec;
|
|
|
|
extern const bfd_target sparcnetbsd_vec;
|
|
|
|
extern const bfd_target sparccoff_vec;
|
|
|
|
extern const bfd_target sunos_big_vec;
|
|
|
|
extern const bfd_target tekhex_vec;
|
1995-06-29 01:17:58 +00:00
|
|
|
extern const bfd_target versados_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target we32kcoff_vec;
|
1995-01-16 05:44:00 +00:00
|
|
|
extern const bfd_target w65_vec;
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target z8kcoff_vec;
|
1993-08-19 18:21:58 +00:00
|
|
|
|
|
|
|
/* srec is always included. */
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target srec_vec;
|
|
|
|
extern const bfd_target symbolsrec_vec;
|
1993-08-19 18:21:58 +00:00
|
|
|
|
1994-10-18 18:51:01 +00:00
|
|
|
/* binary is always included. */
|
|
|
|
extern const bfd_target binary_vec;
|
|
|
|
|
1993-08-19 18:21:58 +00:00
|
|
|
/* All of the xvecs for core files. */
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
extern const bfd_target aix386_core_vec;
|
|
|
|
extern const bfd_target cisco_core_vec;
|
|
|
|
extern const bfd_target hpux_core_vec;
|
|
|
|
extern const bfd_target hppabsd_core_vec;
|
|
|
|
extern const bfd_target irix_core_vec;
|
|
|
|
extern const bfd_target osf_core_vec;
|
|
|
|
extern const bfd_target sco_core_vec;
|
|
|
|
extern const bfd_target trad_core_vec;
|
|
|
|
extern const bfd_target ptrace_core_vec;
|
|
|
|
|
|
|
|
const bfd_target * const bfd_target_vector[] = {
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
|
1993-02-27 01:43:10 +00:00
|
|
|
#ifdef SELECT_VECS
|
1993-04-17 00:39:36 +00:00
|
|
|
|
|
|
|
SELECT_VECS,
|
|
|
|
|
|
|
|
#else /* not SELECT_VECS */
|
1991-12-08 23:40:35 +00:00
|
|
|
|
1993-08-19 18:21:58 +00:00
|
|
|
#ifdef DEFAULT_VECTOR
|
|
|
|
&DEFAULT_VECTOR,
|
|
|
|
#endif
|
|
|
|
/* This list is alphabetized to make it easy to compare
|
|
|
|
with other vector lists -- the decls above and
|
|
|
|
the case statement in configure.in.
|
|
|
|
Vectors that don't compile on all systems, or aren't finished,
|
|
|
|
should have an entry here with #if 0 around it, to show that
|
|
|
|
it wasn't omitted by mistake. */
|
|
|
|
&a29kcoff_big_vec,
|
|
|
|
&a_out_adobe_vec,
|
|
|
|
#if 0 /* No one seems to use this. */
|
1993-02-27 01:43:10 +00:00
|
|
|
&aout_mips_big_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
#endif
|
|
|
|
&aout_mips_little_vec,
|
|
|
|
&b_out_vec_big_host,
|
|
|
|
&b_out_vec_little_host,
|
1993-10-26 21:36:00 +00:00
|
|
|
|
|
|
|
/* This, and other vectors, may not be used in any *.mt configuration.
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
But that does not mean they are unnecessary. If configured with
|
|
|
|
--enable-targets=all, objdump or gdb should be able to examine
|
1993-10-26 21:36:00 +00:00
|
|
|
the file even if we don't recognize the machine type. */
|
1995-03-08 04:41:13 +00:00
|
|
|
&bfd_elf32_big_generic_vec,
|
1995-01-16 05:44:00 +00:00
|
|
|
/* start-sanitize-arc */
|
1995-03-08 04:41:13 +00:00
|
|
|
&bfd_elf32_bigarc_vec,
|
1995-01-16 05:44:00 +00:00
|
|
|
/* end-sanitize-arc */
|
1993-10-26 17:22:20 +00:00
|
|
|
&bfd_elf32_bigmips_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&bfd_elf32_hppa_vec,
|
|
|
|
&bfd_elf32_i386_vec,
|
|
|
|
&bfd_elf32_i860_vec,
|
|
|
|
&bfd_elf32_little_generic_vec,
|
1995-03-08 04:41:13 +00:00
|
|
|
/* start-sanitize-arc */
|
|
|
|
&bfd_elf32_littlearc_vec,
|
|
|
|
/* end-sanitize-arc */
|
1993-10-26 17:22:20 +00:00
|
|
|
&bfd_elf32_littlemips_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&bfd_elf32_m68k_vec,
|
|
|
|
&bfd_elf32_m88k_vec,
|
|
|
|
&bfd_elf32_sparc_vec,
|
1994-05-20 18:22:45 +00:00
|
|
|
&bfd_elf32_powerpc_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
#ifdef BFD64 /* No one seems to use this. */
|
|
|
|
&bfd_elf64_big_generic_vec,
|
|
|
|
&bfd_elf64_little_generic_vec,
|
|
|
|
#endif
|
|
|
|
#if 0
|
|
|
|
&bfd_elf64_sparc_vec,
|
|
|
|
#endif
|
1994-03-30 08:53:45 +00:00
|
|
|
/* We don't include cisco_core_vec. Although it has a magic number,
|
|
|
|
the magic number isn't at the beginning of the file, and thus
|
|
|
|
might spuriously match other kinds of files. */
|
1993-06-18 16:07:34 +00:00
|
|
|
#ifdef BFD64
|
1991-12-08 23:40:35 +00:00
|
|
|
&demo_64_vec, /* Only compiled if host has long-long support */
|
1993-08-19 18:21:58 +00:00
|
|
|
#endif
|
|
|
|
&ecoff_big_vec,
|
|
|
|
&ecoff_little_vec,
|
|
|
|
#if 0
|
|
|
|
&ecoffalpha_little_vec,
|
1991-12-08 23:40:35 +00:00
|
|
|
#endif
|
|
|
|
&h8300coff_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&h8500coff_vec,
|
1993-08-07 22:38:22 +00:00
|
|
|
#if 0
|
1993-10-26 21:36:00 +00:00
|
|
|
/* Since a.out files lack decent magic numbers, no way to recognize
|
|
|
|
which kind of a.out file it is. */
|
1993-08-19 18:21:58 +00:00
|
|
|
&host_aout_vec,
|
1993-08-07 22:38:22 +00:00
|
|
|
#endif
|
1993-08-19 19:11:30 +00:00
|
|
|
#if 0 /* Clashes with sunos_big_vec magic no. */
|
1993-08-19 18:21:58 +00:00
|
|
|
&hp300bsd_vec,
|
1993-08-19 19:11:30 +00:00
|
|
|
#endif
|
1993-08-19 18:21:58 +00:00
|
|
|
&hp300hpux_vec,
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF)
|
1993-10-21 19:22:42 +00:00
|
|
|
&som_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
#endif
|
|
|
|
&i386aout_vec,
|
|
|
|
&i386bsd_vec,
|
|
|
|
&i386coff_vec,
|
1994-06-15 22:10:50 +00:00
|
|
|
&go32coff_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
#if 0
|
1993-10-26 21:36:00 +00:00
|
|
|
/* Since a.out files lack decent magic numbers, no way to recognize
|
|
|
|
which kind of a.out file it is. */
|
1993-08-19 18:21:58 +00:00
|
|
|
&i386linux_vec,
|
|
|
|
#endif
|
1993-10-21 19:22:42 +00:00
|
|
|
&i386lynx_aout_vec,
|
|
|
|
&i386lynx_coff_vec,
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
#if 0
|
|
|
|
/* No distinguishing features for Mach 3 executables. */
|
|
|
|
&i386mach3_vec,
|
|
|
|
#endif
|
1995-03-08 04:41:13 +00:00
|
|
|
&i386msdos_vec,
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
&i386netbsd_vec,
|
1994-02-28 23:49:08 +00:00
|
|
|
&i386os9k_vec,
|
1995-06-29 01:17:58 +00:00
|
|
|
&i386pe_vec,
|
|
|
|
&i386pei_vec,
|
|
|
|
&armpe_vec,
|
|
|
|
&armpei_vec,
|
1991-12-08 23:40:35 +00:00
|
|
|
&icoff_big_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&icoff_little_vec,
|
|
|
|
&ieee_vec,
|
|
|
|
&m68kcoff_vec,
|
|
|
|
&m68kcoffun_vec,
|
1993-10-21 19:22:42 +00:00
|
|
|
&m68klynx_aout_vec,
|
|
|
|
&m68klynx_coff_vec,
|
1994-11-24 03:33:48 +00:00
|
|
|
&m68knetbsd_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&m88kbcs_vec,
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
&m88kmach3_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&newsos3_vec,
|
1993-08-06 20:11:42 +00:00
|
|
|
&nlm32_i386_vec,
|
1993-11-17 20:31:32 +00:00
|
|
|
&nlm32_sparc_vec,
|
1993-07-07 18:05:06 +00:00
|
|
|
#ifdef BFD64
|
1994-01-22 04:28:17 +00:00
|
|
|
&nlm32_alpha_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
#endif
|
1994-10-18 18:51:01 +00:00
|
|
|
&pc532netbsd_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
#if 0
|
|
|
|
/* We have no oasys tools anymore, so we can't test any of this
|
|
|
|
anymore. If you want to test the stuff yourself, go ahead...
|
|
|
|
steve@cygnus.com
|
|
|
|
Worse, since there is no magic number for archives, there
|
|
|
|
can be annoying target mis-matches. */
|
|
|
|
&oasys_vec,
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
#endif
|
|
|
|
&pc532machaout_vec,
|
|
|
|
#if 0
|
1995-06-29 01:17:58 +00:00
|
|
|
/* We have no way of distinguishing these from other a.out variants */
|
|
|
|
&aout_arm_big_vec,
|
|
|
|
&aout_arm_little_vec,
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
&riscix_vec,
|
1993-07-07 18:05:06 +00:00
|
|
|
#endif
|
1991-12-08 23:40:35 +00:00
|
|
|
&rs6000coff_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&shcoff_vec,
|
1994-11-24 03:33:48 +00:00
|
|
|
&shlcoff_vec,
|
1994-11-25 00:01:26 +00:00
|
|
|
/* start-sanitize-rce */
|
|
|
|
&rce_aout_vec,
|
|
|
|
/* end-sanitize-rce */
|
1993-11-05 19:51:52 +00:00
|
|
|
&sparclynx_aout_vec,
|
|
|
|
&sparclynx_coff_vec,
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
&sparcnetbsd_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&sunos_big_vec,
|
1994-05-20 18:22:45 +00:00
|
|
|
&aout0_big_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&tekhex_vec,
|
1992-08-27 22:11:48 +00:00
|
|
|
&we32kcoff_vec,
|
1995-06-29 01:17:58 +00:00
|
|
|
&versados_vec,
|
1993-08-19 18:21:58 +00:00
|
|
|
&z8kcoff_vec,
|
1991-12-08 23:40:35 +00:00
|
|
|
|
1993-08-07 22:38:22 +00:00
|
|
|
#endif /* not SELECT_VECS */
|
|
|
|
|
Thu Aug 12 10:32:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* config/u68k-coff.mt: Fix typo, DEFAULT_TARGET for
DEFAULT_VECTOR.
* config/h8300-coff.mt, h8500-coff.mt, sh-coff.mt, st2000.mt,
z8k-coff.mt (DEFAULT_VECTOR): Define. Don't explicitly add
S-records via SELECT_VECS.
* targets.c (target_vector), Makefile.in (BFD_LIBS): Always
support S-records, for convenience.
* config.bfd: New file, broken out of configure.in.
* configure.in: Use it, and use standard target names for
--with-targets, replacing --with-bfd-targets.
1993-08-12 17:57:02 +00:00
|
|
|
/* Always support S-records, for convenience. */
|
|
|
|
&srec_vec,
|
|
|
|
&symbolsrec_vec,
|
1995-06-29 01:17:58 +00:00
|
|
|
/* And tekhex */
|
|
|
|
&tekhex_vec,
|
1994-10-18 18:51:01 +00:00
|
|
|
/* Likewise for binary output. */
|
|
|
|
&binary_vec,
|
|
|
|
|
1993-08-07 22:38:22 +00:00
|
|
|
/* Add any required traditional-core-file-handler. */
|
|
|
|
|
1992-12-21 21:17:54 +00:00
|
|
|
#ifdef AIX386_CORE
|
1993-06-18 16:07:34 +00:00
|
|
|
&aix386_core_vec,
|
1991-12-08 23:40:35 +00:00
|
|
|
#endif
|
* hpux-core.c: New file; backend for HP/UX style core files.
* bfd.c (struct _bfd): Renamed hppa_core_data field to
hpux_core_data.
* bfd-in2.h: Updated.
* hppa.c (make_bfd_asection, hppa_core_file_p,
hppa_core_file_failing_command, hppa_core_file_failing_signal,
hppa_core_file_matches_executable_p): Moved into hpux-core.c.
Removed from target vector.
* libhppa.h (struct hppa_core_struct and accessor macros): Moved
into hpux-core.c.
* targets.c: If HPUX_CORE is defined, add hpux_core_vec to
target list.
* config/hp300.mh (HDEFINES): Set to -DHPUX_CORE.
(HDEPFILES): Set to hpux-core.o.
* config/hppabsd.mh, config/hppahpux.mh: Likewise.
* hosts/hp300.h (HOST_HP300HPUX): Define.
* Makefile.in (OPTIONAL_BACKENDS): Added sco-core.o,
aix386-core.o, hpux-core.o.
(sco-core.o, aix386-core.o, hpux-core.o): New dependencies.
1993-07-22 19:39:41 +00:00
|
|
|
#ifdef HPUX_CORE
|
|
|
|
&hpux_core_vec,
|
|
|
|
#endif
|
1993-11-17 20:31:32 +00:00
|
|
|
#ifdef HPPABSD_CORE
|
|
|
|
&hppabsd_core_vec,
|
|
|
|
#endif
|
1993-11-30 21:56:40 +00:00
|
|
|
#ifdef IRIX_CORE
|
|
|
|
&irix_core_vec,
|
|
|
|
#endif
|
1993-10-21 19:22:42 +00:00
|
|
|
#ifdef OSF_CORE
|
|
|
|
&osf_core_vec,
|
|
|
|
#endif
|
1993-08-19 18:21:58 +00:00
|
|
|
#ifdef TRAD_CORE
|
|
|
|
&trad_core_vec,
|
|
|
|
#endif
|
1993-02-27 01:43:10 +00:00
|
|
|
|
1993-11-30 21:56:40 +00:00
|
|
|
#ifdef PTRACE_CORE
|
|
|
|
&ptrace_core_vec,
|
|
|
|
#endif
|
|
|
|
|
1993-08-07 22:38:22 +00:00
|
|
|
NULL /* end of list marker */
|
1991-04-18 01:55:45 +00:00
|
|
|
};
|
1991-05-29 00:20:02 +00:00
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
/* bfd_default_vector[0] contains either the address of the default vector,
|
1991-05-29 00:20:02 +00:00
|
|
|
if there is one, or zero if there isn't. */
|
|
|
|
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const bfd_target * const bfd_default_vector[] = {
|
1991-05-29 00:20:02 +00:00
|
|
|
#ifdef DEFAULT_VECTOR
|
* aoutx.h, archive.c, archures.c, bfd.c, cache.c, coff-m88k.c,
coffcode.h, core.c, ctor.c, elf.c, format.c, ieee.c, init.c,
libbfd.c, libbfd.h, libcoff.h, opncls.c, reloc.c, section.c,
srec.c, syms.c, targets.c : all new documentation and lint
removal.
1991-12-08 00:56:56 +00:00
|
|
|
&DEFAULT_VECTOR,
|
1992-08-28 21:10:36 +00:00
|
|
|
#endif
|
1993-08-07 22:38:22 +00:00
|
|
|
NULL
|
1991-05-29 00:20:02 +00:00
|
|
|
};
|
1991-07-04 16:52:56 +00:00
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
/* When there is an ambiguous match, bfd_check_format_matches puts the
|
|
|
|
names of the matching targets in an array. This variable is the maximum
|
|
|
|
number of entries that the array could possibly need. */
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const size_t _bfd_target_vector_entries = sizeof(bfd_target_vector)/sizeof(*bfd_target_vector);
|
1991-07-04 16:52:56 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
/*
|
|
|
|
FUNCTION
|
|
|
|
bfd_find_target
|
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
SYNOPSIS
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const bfd_target *bfd_find_target(CONST char *target_name, bfd *abfd);
|
1993-11-05 19:51:52 +00:00
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
DESCRIPTION
|
1993-11-05 19:51:52 +00:00
|
|
|
Return a pointer to the transfer vector for the object target
|
1993-11-17 20:31:32 +00:00
|
|
|
named @var{target_name}. If @var{target_name} is <<NULL>>, choose the
|
|
|
|
one in the environment variable <<GNUTARGET>>; if that is null or not
|
1993-11-05 19:51:52 +00:00
|
|
|
defined, then choose the first entry in the target list.
|
1991-12-01 00:39:12 +00:00
|
|
|
Passing in the string "default" or setting the environment
|
|
|
|
variable to "default" will cause the first entry in the target
|
|
|
|
list to be returned, and "target_defaulted" will be set in the
|
|
|
|
BFD. This causes <<bfd_check_format>> to loop over all the
|
|
|
|
targets to find the one that matches the file being read.
|
|
|
|
*/
|
1991-07-04 16:52:56 +00:00
|
|
|
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const 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 15:13:13 +00:00
|
|
|
bfd_find_target (target_name, abfd)
|
|
|
|
CONST char *target_name;
|
|
|
|
bfd *abfd;
|
1991-07-04 16:52:56 +00:00
|
|
|
{
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const bfd_target * const *target;
|
1991-07-04 16:52:56 +00:00
|
|
|
extern char *getenv ();
|
1991-11-22 19:09:03 +00:00
|
|
|
CONST char *targname = (target_name ? target_name :
|
|
|
|
(CONST char *) getenv ("GNUTARGET"));
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
/* This is safe; the vector cannot be null */
|
|
|
|
if (targname == NULL || !strcmp (targname, "default")) {
|
|
|
|
abfd->target_defaulted = true;
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
return abfd->xvec = bfd_target_vector[0];
|
1991-07-04 16:52:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
abfd->target_defaulted = false;
|
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
for (target = &bfd_target_vector[0]; *target != NULL; target++) {
|
1991-07-04 16:52:56 +00:00
|
|
|
if (!strcmp (targname, (*target)->name))
|
|
|
|
return abfd->xvec = *target;
|
|
|
|
}
|
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
bfd_set_error (bfd_error_invalid_target);
|
1991-07-04 16:52:56 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
/*
|
|
|
|
FUNCTION
|
|
|
|
bfd_target_list
|
|
|
|
|
|
|
|
SYNOPSIS
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const char **bfd_target_list(void);
|
1991-12-01 00:39:12 +00:00
|
|
|
|
1993-11-05 19:51:52 +00:00
|
|
|
DESCRIPTION
|
|
|
|
Return a freshly malloced NULL-terminated
|
|
|
|
vector of the names of all the valid BFD targets. Do not
|
|
|
|
modify the names.
|
|
|
|
|
1991-12-01 00:39:12 +00:00
|
|
|
*/
|
1991-07-04 16:52:56 +00:00
|
|
|
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const char **
|
* 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 15:13:13 +00:00
|
|
|
bfd_target_list ()
|
1991-07-04 16:52:56 +00:00
|
|
|
{
|
|
|
|
int vec_length= 0;
|
1992-11-05 13:17:38 +00:00
|
|
|
#ifdef NATIVE_HPPAHPUX_COMPILER
|
|
|
|
/* The native compiler on the HP9000/700 has a bug which causes it
|
|
|
|
to loop endlessly when compiling this file. This avoids it. */
|
|
|
|
volatile
|
|
|
|
#endif
|
* configure.host (sparc-*-netbsd): use sparcnbsd.
(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
1994-09-13 18:39:47 +00:00
|
|
|
const bfd_target * const *target;
|
Mon Sep 30 15:13:46 1991 Steve Chamberlain (steve at cygnus.com)
* cpu-a29k.c, cpu-i386.c, cpu-m68k.c, cpu-mips.c, cpu-vax.c,
cpu-h8300.c, cpu-i960.c, cpu-m88k.c, cpu-sparc.c: added. These
files will eventually contain processor specific bits for bfd,
like strange relocation information and dis/assembly. So far only
the H8 has been even partially done. This work also ties in with
the change in handling architectures.
* aout-f1.h: (choose_reloc_size) now calls bfd_get_arch to
discover the architecture of the bfd. (sunos4_callback) calls the
function bfd_set_arch_mach rather than stuffing stuff directly
into the bfd. (sunos4_write_object_contents), changed names of
accessor functions.
* aoutx.h: (set_arch_mach) now calls bfd_default_set_arch_mach to
setup the environment.
* archive.c: (bfd_slurp_coff_armap) coff archives always have the
headers in big endian format, regardless of the endianess of the
host or target.
* archures.c: totally changed. Now an architecture is represented
with a pointer to an info structure rather than an enumerated type
and a long. The old info is available as two elements in the
structure. Future enhancements to architecure support will
involve pointers to methods being placed into the info structure.
* bfd.c: changed the definition of the bfd structure for the new
architecture stuff.
* bout.c: (b_out_set_arch_mach) changed to use the new
architecture mechanism.
* coffcode.h: (coff_set_arch_mach, coff_set_flags) changed to use
the new architecture mechanism.
* configure.in: added h8 stuff.
* ieee.c: too many changes to note. Now ieee files written with
bfd gas and ld can be read by gld and ieee only linkers and
simulators.
* libbfd.c, libbfd.h: changed prototype of bfd_write.
* newsos3.c: (newos3_callback) now calls bfd_set_arch_mach rather
than fixing the structure directly.
* oasys.c: (oasys_object_p) now calls bfd_default_set_arch_mach rather
than fixing the structure directly.
* opncls.c: (new_bfd) makes sure that bfd_init has been called
before opening a bfd.
* srec.c: (srec_set_arch_mach) now calls bfd_default_set_arch_mach
rather than fixing the structure directly.
* targets.c: (target_vector) now by defining SELECT_VECS (perhaps
in the t/hmake file) a user can select which backends they want
linked with bfd without changing the source.
* init.c: new, looks after initializing modules.
* howto.c: for future use, will allow an application to work out
what cookie to use as a handle on a relcoatio howto.
1991-10-01 03:43:43 +00:00
|
|
|
CONST char **name_list, **name_ptr;
|
1991-07-04 16:52:56 +00:00
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
for (target = &bfd_target_vector[0]; *target != NULL; target++)
|
1991-07-04 16:52:56 +00:00
|
|
|
vec_length++;
|
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
name_ptr = name_list = (CONST char **)
|
|
|
|
bfd_zmalloc ((vec_length + 1) * sizeof (char **));
|
1991-07-04 16:52:56 +00:00
|
|
|
|
|
|
|
if (name_list == NULL) {
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
bfd_set_error (bfd_error_no_memory);
|
1991-07-04 16:52:56 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
* bfd.c (bfd_get_error, bfd_set_error): New functions.
(bfd_error): Make static.
(bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
all values.
* bfd-in2.h: Regenerated.
* aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
aoutf1.h, aoutx.h, archive.c, archures.c,
bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
srec.c, sunos.c, syms.c, targets.c, tekhex.c,
trad-core.c: Change callers.
1994-02-17 18:08:41 +00:00
|
|
|
for (target = &bfd_target_vector[0]; *target != NULL; target++)
|
1991-07-04 16:52:56 +00:00
|
|
|
*(name_ptr++) = (*target)->name;
|
|
|
|
|
|
|
|
return name_list;
|
|
|
|
}
|