1999-05-03 15:29:11 +08:00
|
|
|
|
/* Generic target-file-type support for the BFD library.
|
2001-03-09 05:04:02 +08:00
|
|
|
|
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
2008-02-14 23:20:26 +08:00
|
|
|
|
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
1999-05-03 15:29:11 +08:00
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
|
Written by Cygnus Support.
|
|
|
|
|
|
2002-11-06 21:26:29 +08:00
|
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
2002-11-06 21:26:29 +08:00
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-07-03 22:26:43 +08:00
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2002-11-06 21:26:29 +08:00
|
|
|
|
(at your option) any later version.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
2002-11-06 21:26:29 +08:00
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
2002-11-06 21:26:29 +08:00
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
2007-07-03 22:26:43 +08:00
|
|
|
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
|
|
|
MA 02110-1301, USA. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
#include "sysdep.h"
|
2007-04-26 22:47:00 +08:00
|
|
|
|
#include "bfd.h"
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#include "libbfd.h"
|
|
|
|
|
#include "fnmatch.h"
|
|
|
|
|
|
* aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
throughout. Similarly, collapse #if 1'd code.
2005-02-01 07:13:34 +08:00
|
|
|
|
/*
|
|
|
|
|
It's okay to see some:
|
|
|
|
|
#if 0
|
|
|
|
|
directives in this source file, as targets.c uses them to exclude
|
|
|
|
|
certain BFD vectors. This comment is specially formatted to catch
|
|
|
|
|
users who grep for ^#if 0, so please keep it this way!
|
|
|
|
|
*/
|
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
|
/*
|
2000-12-21 03:53:11 +08:00
|
|
|
|
SECTION
|
1999-05-03 15:29:11 +08:00
|
|
|
|
Targets
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
2003-12-01 02:40:41 +08:00
|
|
|
|
Each port of BFD to a different machine requires the creation
|
1999-05-03 15:29:11 +08:00
|
|
|
|
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
|
2000-12-21 03:53:11 +08:00
|
|
|
|
calls to the back end routines.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
|
|
o Create a BFD by calling the internal routine
|
|
|
|
|
<<_bfd_new_bfd>>, then call <<bfd_find_target>> with the
|
2000-12-21 03:53:11 +08:00
|
|
|
|
target string supplied to <<bfd_openr>> and the new BFD pointer.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
o If a null target string was provided to <<bfd_find_target>>,
|
|
|
|
|
look up the environment variable <<GNUTARGET>> and use
|
2000-12-21 03:53:11 +08:00
|
|
|
|
that as the target string.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
o If the target string is still <<NULL>>, or the target string is
|
|
|
|
|
<<default>>, then use the first item in the target vector
|
|
|
|
|
as the target type, and set <<target_defaulted>> in the BFD to
|
|
|
|
|
cause <<bfd_check_format>> to loop through all the targets.
|
|
|
|
|
@xref{bfd_target}. @xref{Formats}.
|
|
|
|
|
|
|
|
|
|
o Otherwise, inspect the elements in the target vector
|
|
|
|
|
one by one, until a match on target name is found. When found,
|
2000-12-21 03:53:11 +08:00
|
|
|
|
use it.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
o Otherwise return the error <<bfd_error_invalid_target>> to
|
|
|
|
|
<<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
|
2000-12-21 03:53:11 +08:00
|
|
|
|
<<bfd_check_format>> on the BFD with a suggested format.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
If <<target_defaulted>> has been set, each possible target
|
|
|
|
|
type is tried to see if it recognizes the specified format.
|
2002-11-30 16:39:46 +08:00
|
|
|
|
<<bfd_check_format>> returns <<TRUE>> when the caller guesses right.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
@menu
|
|
|
|
|
@* bfd_target::
|
|
|
|
|
@end menu
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
INODE
|
|
|
|
|
bfd_target, , Targets, Targets
|
|
|
|
|
DOCDD
|
|
|
|
|
SUBSECTION
|
|
|
|
|
bfd_target
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
This structure contains everything that BFD knows about a
|
|
|
|
|
target. It includes things like its byte order, name, and which
|
2000-12-21 03:53:11 +08:00
|
|
|
|
routines to call to do various operations.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
Every BFD points to a target structure with its <<xvec>>
|
2000-12-21 03:53:11 +08:00
|
|
|
|
member.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
The macros below are used to dispatch to functions through the
|
|
|
|
|
<<bfd_target>> vector. They are used in a number of macros further
|
|
|
|
|
down in @file{bfd.h}, and are also used when calling various
|
|
|
|
|
routines by hand inside the BFD implementation. The @var{arglist}
|
|
|
|
|
argument must be parenthesized; it contains all the arguments
|
2000-12-21 03:53:11 +08:00
|
|
|
|
to the called function.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
They make the documentation (more) unpleasant to read, so if
|
|
|
|
|
someone wants to fix this and not break the above, please do.
|
|
|
|
|
|
|
|
|
|
.#define BFD_SEND(bfd, message, arglist) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. ((*((bfd)->xvec->message)) arglist)
|
1999-05-03 15:29:11 +08: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
|
|
|
|
|
|
|
|
|
|
For operations which index on the BFD format:
|
|
|
|
|
|
|
|
|
|
.#define BFD_SEND_FMT(bfd, message, arglist) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
.#ifdef DEBUG_BFD_SEND
|
|
|
|
|
.#undef BFD_SEND_FMT
|
|
|
|
|
.#define BFD_SEND_FMT(bfd, message, arglist) \
|
|
|
|
|
. (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
|
2000-12-21 03:53:11 +08:00
|
|
|
|
. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. (bfd_assert (__FILE__,__LINE__), NULL))
|
|
|
|
|
.#endif
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
This is the structure which defines the type of BFD this is. The
|
|
|
|
|
<<xvec>> member of the struct <<bfd>> itself points here. Each
|
|
|
|
|
module that implements access to a different target under BFD,
|
|
|
|
|
defines one of these.
|
|
|
|
|
|
|
|
|
|
FIXME, these names should be rationalised with the names of
|
|
|
|
|
the entry points which call them. Too bad we can't have one
|
2000-12-21 03:53:11 +08:00
|
|
|
|
macro to define them both!
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.enum bfd_flavour
|
|
|
|
|
.{
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. bfd_target_unknown_flavour,
|
|
|
|
|
. bfd_target_aout_flavour,
|
|
|
|
|
. bfd_target_coff_flavour,
|
|
|
|
|
. bfd_target_ecoff_flavour,
|
2000-06-17 04:35:08 +08:00
|
|
|
|
. bfd_target_xcoff_flavour,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. bfd_target_elf_flavour,
|
|
|
|
|
. bfd_target_ieee_flavour,
|
|
|
|
|
. bfd_target_nlm_flavour,
|
|
|
|
|
. bfd_target_oasys_flavour,
|
|
|
|
|
. bfd_target_tekhex_flavour,
|
|
|
|
|
. bfd_target_srec_flavour,
|
|
|
|
|
. bfd_target_ihex_flavour,
|
|
|
|
|
. bfd_target_som_flavour,
|
|
|
|
|
. bfd_target_os9k_flavour,
|
|
|
|
|
. bfd_target_versados_flavour,
|
|
|
|
|
. bfd_target_msdos_flavour,
|
|
|
|
|
. bfd_target_ovax_flavour,
|
2001-10-30 23:20:14 +08:00
|
|
|
|
. bfd_target_evax_flavour,
|
2002-11-06 21:26:29 +08:00
|
|
|
|
. bfd_target_mmo_flavour,
|
|
|
|
|
. bfd_target_mach_o_flavour,
|
|
|
|
|
. bfd_target_pef_flavour,
|
|
|
|
|
. bfd_target_pef_xlib_flavour,
|
|
|
|
|
. bfd_target_sym_flavour
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.};
|
|
|
|
|
.
|
|
|
|
|
.enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
|
|
|
|
|
.
|
|
|
|
|
.{* Forward declaration. *}
|
|
|
|
|
.typedef struct bfd_link_info _bfd_link_info;
|
|
|
|
|
.
|
|
|
|
|
.typedef struct bfd_target
|
|
|
|
|
.{
|
2002-01-31 02:12:17 +08:00
|
|
|
|
. {* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. *}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. char *name;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* The "flavour" of a back end is a general indication about
|
|
|
|
|
. the contents of a file. *}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. enum bfd_flavour flavour;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* The order of bytes within the data area of a file. *}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. enum bfd_endian byteorder;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* The order of bytes within the header parts of a file. *}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. enum bfd_endian header_byteorder;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* A mask of all the flags which an executable may have set -
|
|
|
|
|
. from the set <<BFD_NO_FLAGS>>, <<HAS_RELOC>>, ...<<D_PAGED>>. *}
|
2000-12-21 03:53:11 +08:00
|
|
|
|
. flagword object_flags;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* A mask of all the flags which a section may have set - from
|
|
|
|
|
. the set <<SEC_NO_FLAGS>>, <<SEC_ALLOC>>, ...<<SET_NEVER_LOAD>>. *}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. flagword section_flags;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* The character normally found at the front of a symbol.
|
|
|
|
|
. (if any), perhaps `_'. *}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. char symbol_leading_char;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* The pad character for file names within an archive header. *}
|
2000-12-21 03:53:11 +08:00
|
|
|
|
. char ar_pad_char;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* The maximum number of characters in an archive header. *}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. unsigned short ar_max_namelen;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Entries for byte swapping for data. These are different from the
|
2005-03-01 09:56:27 +08:00
|
|
|
|
. other entry points, since they don't take a BFD as the first argument.
|
2002-01-31 02:12:17 +08:00
|
|
|
|
. Certain other handlers could do the same. *}
|
* bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
(BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
(bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
(bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
(bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
* configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
(BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
when using long.
* libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
(bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
(bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
* dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
(read_8_bytes, read_indirect_string, read_address): Likewise.
(read_abbrevs, parse_comp_unit): Likewise.
* targets.c (struct bfd_target): Likewise.
* aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
* hppabsd-core.c: Likewise. Formatting.
* hpux-core.c: Likewise.
* irix-core.c: Likewise.
* netbsd-core.c: Likewise.
* osf-core.c: Likewise.
* ptrace-core.c: Likewise.
* sco5-core.c: Likewise.
* trad-core.c: Likewise.
* configure: Regenerate.
* bfd-in2.h: Regenerate.
2004-03-15 22:21:43 +08:00
|
|
|
|
. bfd_uint64_t (*bfd_getx64) (const void *);
|
|
|
|
|
. bfd_int64_t (*bfd_getx_signed_64) (const void *);
|
|
|
|
|
. void (*bfd_putx64) (bfd_uint64_t, void *);
|
* bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
(bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
(bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
(bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
(bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
(bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
(bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
* libbfd.c: Likewise in function definitions.
(bfd_put_8): Mask with 0xff rather than casting to char.
(bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
(bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
(H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
(H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
(H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
(H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
* libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
(H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
(H_GET_64, H_GET_32, H_GET_16): Likewise.
(H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
* archive.c (do_slurp_coff_armap): Update swap prototype.
* coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
(tic54x_getl_signed_32): Likewise.
(tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
* mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
* pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
(bfd_getp_signed_32, bfd_putp32): Likewise.
* targets.c (struct bfd_target): Use void* in place of bfd_byte* for
bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
bfd_h_getx_signed_16, bfd_h_putx16.
* aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
* hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
* hpux-core.c: Likewise.
* irix-core.c: Likewise.
* netbsd-core.c: Likewise.
* osf-core.c: Likewise.
* ptrace-core.c: Likewise.
* sco5-core.c: Likewise.
* trad-core.c: Likewise.
* bfd-in2.h: Regenerate.
2004-03-15 20:23:11 +08:00
|
|
|
|
. bfd_vma (*bfd_getx32) (const void *);
|
|
|
|
|
. bfd_signed_vma (*bfd_getx_signed_32) (const void *);
|
|
|
|
|
. void (*bfd_putx32) (bfd_vma, void *);
|
|
|
|
|
. bfd_vma (*bfd_getx16) (const void *);
|
|
|
|
|
. bfd_signed_vma (*bfd_getx_signed_16) (const void *);
|
|
|
|
|
. void (*bfd_putx16) (bfd_vma, void *);
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Byte swapping for the headers. *}
|
* bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
(BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
(bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
(bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
(bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
* configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
(BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
when using long.
* libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
(bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
(bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
(bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
* dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
(read_8_bytes, read_indirect_string, read_address): Likewise.
(read_abbrevs, parse_comp_unit): Likewise.
* targets.c (struct bfd_target): Likewise.
* aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
* hppabsd-core.c: Likewise. Formatting.
* hpux-core.c: Likewise.
* irix-core.c: Likewise.
* netbsd-core.c: Likewise.
* osf-core.c: Likewise.
* ptrace-core.c: Likewise.
* sco5-core.c: Likewise.
* trad-core.c: Likewise.
* configure: Regenerate.
* bfd-in2.h: Regenerate.
2004-03-15 22:21:43 +08:00
|
|
|
|
. bfd_uint64_t (*bfd_h_getx64) (const void *);
|
|
|
|
|
. bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
|
|
|
|
|
. void (*bfd_h_putx64) (bfd_uint64_t, void *);
|
* bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
(bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
(bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
(bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
(bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
(bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
(bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
* libbfd.c: Likewise in function definitions.
(bfd_put_8): Mask with 0xff rather than casting to char.
(bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
(bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
(H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
(H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
(H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
(H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
* libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
(H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
(H_GET_64, H_GET_32, H_GET_16): Likewise.
(H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
* archive.c (do_slurp_coff_armap): Update swap prototype.
* coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
(tic54x_getl_signed_32): Likewise.
(tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
* mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
* pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
(bfd_getp_signed_32, bfd_putp32): Likewise.
* targets.c (struct bfd_target): Use void* in place of bfd_byte* for
bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
bfd_h_getx_signed_16, bfd_h_putx16.
* aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
* hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
* hpux-core.c: Likewise.
* irix-core.c: Likewise.
* netbsd-core.c: Likewise.
* osf-core.c: Likewise.
* ptrace-core.c: Likewise.
* sco5-core.c: Likewise.
* trad-core.c: Likewise.
* bfd-in2.h: Regenerate.
2004-03-15 20:23:11 +08:00
|
|
|
|
. bfd_vma (*bfd_h_getx32) (const void *);
|
|
|
|
|
. bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
|
|
|
|
|
. void (*bfd_h_putx32) (bfd_vma, void *);
|
|
|
|
|
. bfd_vma (*bfd_h_getx16) (const void *);
|
|
|
|
|
. bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
|
|
|
|
|
. void (*bfd_h_putx16) (bfd_vma, void *);
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Format dependent routines: these are vectors of entry points
|
|
|
|
|
. within the target vector structure, one for each format to check. *}
|
|
|
|
|
.
|
|
|
|
|
. {* Check the format of a file being read. Return a <<bfd_target *>> or zero. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Set the format of a file being written. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Write cached information into a file being written, at <<bfd_close>>. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
1999-08-18 13:58:46 +08:00
|
|
|
|
The general target vector. These vectors are initialized using the
|
|
|
|
|
BFD_JUMP_TABLE macros.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Generic entry points. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_GENERIC(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_close_and_cleanup, \
|
|
|
|
|
. NAME##_bfd_free_cached_info, \
|
|
|
|
|
. NAME##_new_section_hook, \
|
|
|
|
|
. NAME##_get_section_contents, \
|
|
|
|
|
. NAME##_get_section_contents_in_window
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Called when the BFD is being closed to do any necessary cleanup. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_close_and_cleanup) (bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Ask the BFD to free all cached information. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_free_cached_info) (bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Called when a new section is created. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Read the contents of a section. *}
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_get_section_contents)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_get_section_contents_in_window)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Entry points to copy private data. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_COPY(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_bfd_copy_private_bfd_data, \
|
|
|
|
|
. NAME##_bfd_merge_private_bfd_data, \
|
2005-10-24 09:40:58 +08:00
|
|
|
|
. _bfd_generic_init_private_section_data, \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_bfd_copy_private_section_data, \
|
|
|
|
|
. NAME##_bfd_copy_private_symbol_data, \
|
2004-05-18 00:40:01 +08:00
|
|
|
|
. NAME##_bfd_copy_private_header_data, \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_bfd_set_private_flags, \
|
|
|
|
|
. NAME##_bfd_print_private_bfd_data
|
|
|
|
|
.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Called to copy BFD general private data from one object file
|
|
|
|
|
. to another. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Called to merge BFD general private data from one object file
|
|
|
|
|
. to a common output file when linking. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
|
2005-10-24 09:40:58 +08:00
|
|
|
|
. {* Called to initialize BFD private section data from one object file
|
|
|
|
|
. to another. *}
|
|
|
|
|
.#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
|
|
|
|
|
. BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info))
|
|
|
|
|
. bfd_boolean (*_bfd_init_private_section_data)
|
|
|
|
|
. (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Called to copy BFD private section data from one object file
|
|
|
|
|
. to another. *}
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_copy_private_section_data)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, sec_ptr, bfd *, sec_ptr);
|
2000-12-21 03:53:11 +08:00
|
|
|
|
. {* Called to copy BFD private symbol data from one symbol
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. to another. *}
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_copy_private_symbol_data)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, asymbol *, bfd *, asymbol *);
|
2004-05-18 00:40:01 +08:00
|
|
|
|
. {* Called to copy BFD private header data from one object file
|
|
|
|
|
. to another. *}
|
|
|
|
|
. bfd_boolean (*_bfd_copy_private_header_data)
|
|
|
|
|
. (bfd *, bfd *);
|
2002-01-31 02:12:17 +08:00
|
|
|
|
. {* Called to set private backend flags. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
2002-01-31 02:12:17 +08:00
|
|
|
|
. {* Called to print private BFD data. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Core file entry points. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_CORE(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_core_file_failing_command, \
|
|
|
|
|
. NAME##_core_file_failing_signal, \
|
|
|
|
|
. NAME##_core_file_matches_executable_p
|
|
|
|
|
.
|
|
|
|
|
. char * (*_core_file_failing_command) (bfd *);
|
|
|
|
|
. int (*_core_file_failing_signal) (bfd *);
|
|
|
|
|
. bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Archive entry points. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_slurp_armap, \
|
|
|
|
|
. NAME##_slurp_extended_name_table, \
|
|
|
|
|
. NAME##_construct_extended_name_table, \
|
|
|
|
|
. NAME##_truncate_arname, \
|
|
|
|
|
. NAME##_write_armap, \
|
|
|
|
|
. NAME##_read_ar_hdr, \
|
|
|
|
|
. NAME##_openr_next_archived_file, \
|
|
|
|
|
. NAME##_get_elt_at_index, \
|
|
|
|
|
. NAME##_generic_stat_arch_elt, \
|
|
|
|
|
. NAME##_update_armap_timestamp
|
|
|
|
|
.
|
|
|
|
|
. bfd_boolean (*_bfd_slurp_armap) (bfd *);
|
|
|
|
|
. bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_construct_extended_name_table)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, char **, bfd_size_type *, const char **);
|
|
|
|
|
. void (*_bfd_truncate_arname) (bfd *, const char *, char *);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*write_armap)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, unsigned int, struct orl *, unsigned int, int);
|
|
|
|
|
. void * (*_bfd_read_ar_hdr_fn) (bfd *);
|
|
|
|
|
. bfd * (*openr_next_archived_file) (bfd *, bfd *);
|
|
|
|
|
.#define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
|
|
|
|
|
. bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
|
|
|
|
|
. int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
|
|
|
|
|
. bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Entry points used for symbols. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_get_symtab_upper_bound, \
|
2003-10-16 12:11:10 +08:00
|
|
|
|
. NAME##_canonicalize_symtab, \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_make_empty_symbol, \
|
|
|
|
|
. NAME##_print_symbol, \
|
|
|
|
|
. NAME##_get_symbol_info, \
|
|
|
|
|
. NAME##_bfd_is_local_label_name, \
|
2004-10-08 22:54:04 +08:00
|
|
|
|
. NAME##_bfd_is_target_special_symbol, \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_get_lineno, \
|
|
|
|
|
. NAME##_find_nearest_line, \
|
2005-06-06 22:28:31 +08:00
|
|
|
|
. _bfd_generic_find_line, \
|
2005-05-24 01:44:55 +08:00
|
|
|
|
. NAME##_find_inliner_info, \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_bfd_make_debug_symbol, \
|
|
|
|
|
. NAME##_read_minisymbols, \
|
|
|
|
|
. NAME##_minisymbol_to_symbol
|
|
|
|
|
.
|
|
|
|
|
. long (*_bfd_get_symtab_upper_bound) (bfd *);
|
|
|
|
|
. long (*_bfd_canonicalize_symtab)
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. (bfd *, struct bfd_symbol **);
|
|
|
|
|
. struct bfd_symbol *
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (*_bfd_make_empty_symbol) (bfd *);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. void (*_bfd_print_symbol)
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
|
2003-06-29 18:06:40 +08:00
|
|
|
|
.#define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. void (*_bfd_get_symbol_info)
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. (bfd *, struct bfd_symbol *, symbol_info *);
|
2003-06-29 18:06:40 +08:00
|
|
|
|
.#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
|
|
|
|
|
. bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
|
2004-10-08 22:54:04 +08:00
|
|
|
|
. bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_find_nearest_line)
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. const char **, const char **, unsigned int *);
|
2005-06-06 22:28:31 +08:00
|
|
|
|
. bfd_boolean (*_bfd_find_line)
|
|
|
|
|
. (bfd *, struct bfd_symbol **, struct bfd_symbol *,
|
|
|
|
|
. const char **, unsigned int *);
|
2005-05-24 01:44:55 +08:00
|
|
|
|
. bfd_boolean (*_bfd_find_inliner_info)
|
|
|
|
|
. (bfd *, const char **, const char **, unsigned int *);
|
1999-05-03 15:29:11 +08: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. *}
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. asymbol * (*_bfd_make_debug_symbol)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, void *, unsigned long size);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.#define bfd_read_minisymbols(b, d, m, s) \
|
|
|
|
|
. BFD_SEND (b, _read_minisymbols, (b, d, m, s))
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. long (*_read_minisymbols)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, bfd_boolean, void **, unsigned int *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.#define bfd_minisymbol_to_symbol(b, d, m, f) \
|
|
|
|
|
. BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. asymbol * (*_minisymbol_to_symbol)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, bfd_boolean, const void *, asymbol *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Routines for relocs. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_RELOCS(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_get_reloc_upper_bound, \
|
|
|
|
|
. NAME##_canonicalize_reloc, \
|
2007-03-26 20:23:03 +08:00
|
|
|
|
. NAME##_bfd_reloc_type_lookup, \
|
|
|
|
|
. NAME##_bfd_reloc_name_lookup
|
2003-06-29 18:06:40 +08:00
|
|
|
|
.
|
|
|
|
|
. long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. long (*_bfd_canonicalize_reloc)
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* See documentation on reloc types. *}
|
|
|
|
|
. reloc_howto_type *
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
|
2007-03-26 20:23:03 +08:00
|
|
|
|
. reloc_howto_type *
|
|
|
|
|
. (*reloc_name_lookup) (bfd *, const char *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
2007-02-06 03:50:12 +08:00
|
|
|
|
.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Routines used when writing an object file. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_WRITE(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_set_arch_mach, \
|
|
|
|
|
. NAME##_set_section_contents
|
|
|
|
|
.
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_set_arch_mach)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, enum bfd_architecture, unsigned long);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_set_section_contents)
|
2003-11-04 18:41:52 +08:00
|
|
|
|
. (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Routines used by the linker. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_LINK(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_sizeof_headers, \
|
|
|
|
|
. NAME##_bfd_get_relocated_section_contents, \
|
|
|
|
|
. NAME##_bfd_relax_section, \
|
|
|
|
|
. NAME##_bfd_link_hash_table_create, \
|
|
|
|
|
. NAME##_bfd_link_hash_table_free, \
|
|
|
|
|
. NAME##_bfd_link_add_symbols, \
|
|
|
|
|
. NAME##_bfd_link_just_syms, \
|
|
|
|
|
. NAME##_bfd_final_link, \
|
|
|
|
|
. NAME##_bfd_link_split_section, \
|
|
|
|
|
. NAME##_bfd_gc_sections, \
|
|
|
|
|
. NAME##_bfd_merge_sections, \
|
2004-04-30 22:23:40 +08:00
|
|
|
|
. NAME##_bfd_is_group_section, \
|
2004-07-21 23:42:58 +08:00
|
|
|
|
. NAME##_bfd_discard_group, \
|
2009-04-17 07:07:00 +08:00
|
|
|
|
. NAME##_section_already_linked, \
|
|
|
|
|
. NAME##_bfd_define_common_symbol
|
2003-06-29 18:06:40 +08:00
|
|
|
|
.
|
2006-06-19 21:17:44 +08:00
|
|
|
|
. int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_byte * (*_bfd_get_relocated_section_contents)
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (bfd *, struct bfd_link_info *, struct bfd_link_order *,
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. bfd_byte *, bfd_boolean, struct bfd_symbol **);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_relax_section)
|
2003-10-19 Andrew Cagney <cagney@redhat.com>
* targets.c: Replace "struct sec" with "struct bfd_section"
* syms.c, sparclynx.c, section.c, opncls.c: Ditto.
* libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
* elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
* aout-tic30.c, aout-target.h:
* bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
Index: binutils/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* coffgrok.h (coff_section): Replace 'struct sec" with "struct
bfd_section".
Index: gdb/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* symtab.c: Replace "struct sec" with "struct bfd_section".
* objfiles.c, linespec.c, blockframe.c, block.c: Ditto.
Index: ld/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* pe-dll.c: Replace "struct sec" with "struct bfd_section".
Index: sim/common/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* sim-base.h: Replace "struct sec" with "struct bfd_section".
2003-10-20 22:38:46 +08:00
|
|
|
|
. (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Create a hash table for the linker. Different backends store
|
|
|
|
|
. different information in this table. *}
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. struct bfd_link_hash_table *
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. (*_bfd_link_hash_table_create) (bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
2002-04-05 03:53:38 +08:00
|
|
|
|
. {* Release the memory associated with the linker hash table. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
|
2002-04-05 03:53:38 +08:00
|
|
|
|
.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Add symbols from this object file into the hash table. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
2002-05-15 08:18:58 +08:00
|
|
|
|
. {* Indicate that we are only retrieving symbol values from this section. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
|
2002-05-15 08:18:58 +08:00
|
|
|
|
.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Do a link based on the link_order structures attached to each
|
|
|
|
|
. section of the BFD. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Should this section be split up into smaller pieces during linking. *}
|
2003-10-19 Andrew Cagney <cagney@redhat.com>
* targets.c: Replace "struct sec" with "struct bfd_section"
* syms.c, sparclynx.c, section.c, opncls.c: Ditto.
* libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
* elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
* aout-tic30.c, aout-target.h:
* bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
Index: binutils/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* coffgrok.h (coff_section): Replace 'struct sec" with "struct
bfd_section".
Index: gdb/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* symtab.c: Replace "struct sec" with "struct bfd_section".
* objfiles.c, linespec.c, blockframe.c, block.c: Ditto.
Index: ld/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* pe-dll.c: Replace "struct sec" with "struct bfd_section".
Index: sim/common/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* sim-base.h: Replace "struct sec" with "struct bfd_section".
2003-10-20 22:38:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Remove sections that are not referenced from the output. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
|
* merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
fields, change sec into secinfo.
(struct sec_merge_info): Add chain, remove last fields.
(struct sec_merge_sec_info): Add next, sec, psecinfo fields.
(sec_merge_hash_lookup): If lookup could not use a string only
because it has bad alignment, mark the old string for deletion.
(sec_merge_add): Add secinfo argument. Don't compute entry's
position, instead record the section.
(sec_merge_emit): Update for the sec into secinfo change in
struct sec_merge_hash_entry.
(_bfd_merge_section): Only record the section for merging, defer
putting strings into the hash table.
(cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
_bfd_merge_sections): New functions.
(_bfd_merged_section_offset): Update for the sec_merge_hash_entry
changes.
* libbfd-in.h (_bfd_merge_sections): Add prototype.
(_bfd_nolink_bfd_merge_sections): Define.
* libbfd.h: Likewise.
(bfd_generic_merge_sections): Add prototype.
* targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
(struct bfd_target): Likewise.
* bfd.c (bfd_merge_sections): Define.
* bfd-in2.h: Rebuilt.
* elf.c (_bfd_elf_merge_sections): New function.
* elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
* elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
* reloc.c (bfd_generic_merge_sections): New function.
* vms.c (vms_bfd_merge_sections): New function.
* aout-adobe.c (aout_32_bfd_merge_sections): Define.
* aout-target.h (MY_bfd_merge_sections): Define.
* aout-tic30.c (MY_bfd_merge_sections): Define.
* binary.c (binary_bfd_merge_sections): Define.
* bout.c (b_out_bfd_merge_sections): Define.
* coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
* coffcode.c (coff_bfd_merge_sections): Define.
* coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
* i386msdos.c (msdos_bfd_merge_sections): Define.
* i386os9k.c (os9k_bfd_merge_sections): Define.
* ieee.c (ieee_bfd_merge_sections): Define.
* ihex.c (ihex_bfd_merge_sections): Define.
* nlm-target.h (nlm_bfd_merge_sections): Define.
* oasys.c (oasys_bfd_merge_sections): Define.
* ppcboot.c (ppcboot_bfd_merge_sections): Define.
* som.c (som_bfd_merge_sections): Define.
* srec.c (srec_bfd_merge_sections): Define.
* tekhex.c (tekhex_bfd_merge_sections): Define.
* versados.c (versados_bfd_merge_sections): Define.
* xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
* ldlang.c (lang_process): Call bfd_merge_sections.
2001-05-11 20:23:48 +08:00
|
|
|
|
.
|
|
|
|
|
. {* Attempt to merge SEC_MERGE sections. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
2004-04-30 22:23:40 +08:00
|
|
|
|
. {* Is this section a member of a group? *}
|
|
|
|
|
. bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
|
|
|
|
|
.
|
2002-06-05 11:43:11 +08:00
|
|
|
|
. {* Discard members of a group. *}
|
2003-10-19 Andrew Cagney <cagney@redhat.com>
* targets.c: Replace "struct sec" with "struct bfd_section"
* syms.c, sparclynx.c, section.c, opncls.c: Ditto.
* libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
* elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
* aout-tic30.c, aout-target.h:
* bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
Index: binutils/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* coffgrok.h (coff_section): Replace 'struct sec" with "struct
bfd_section".
Index: gdb/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* symtab.c: Replace "struct sec" with "struct bfd_section".
* objfiles.c, linespec.c, blockframe.c, block.c: Ditto.
Index: ld/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* pe-dll.c: Replace "struct sec" with "struct bfd_section".
Index: sim/common/ChangeLog
2003-10-19 Andrew Cagney <cagney@redhat.com>
* sim-base.h: Replace "struct sec" with "struct bfd_section".
2003-10-20 22:38:46 +08:00
|
|
|
|
. bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
|
2002-06-05 11:43:11 +08:00
|
|
|
|
.
|
2004-07-21 23:42:58 +08:00
|
|
|
|
. {* Check if SEC has been already linked during a reloceatable or
|
|
|
|
|
. final link. *}
|
2006-10-31 07:25:51 +08:00
|
|
|
|
. void (*_section_already_linked) (bfd *, struct bfd_section *,
|
|
|
|
|
. struct bfd_link_info *);
|
2004-07-21 23:42:58 +08:00
|
|
|
|
.
|
2009-04-17 07:07:00 +08:00
|
|
|
|
. {* Define a common symbol. *}
|
|
|
|
|
. bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
|
|
|
|
|
. struct bfd_link_hash_entry *);
|
|
|
|
|
.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Routines to handle dynamic symbols and relocs. *}
|
2001-10-02 13:58:41 +08:00
|
|
|
|
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_get_dynamic_symtab_upper_bound, \
|
|
|
|
|
. NAME##_canonicalize_dynamic_symtab, \
|
2004-04-22 22:45:32 +08:00
|
|
|
|
. NAME##_get_synthetic_symtab, \
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. NAME##_get_dynamic_reloc_upper_bound, \
|
|
|
|
|
. NAME##_canonicalize_dynamic_reloc
|
|
|
|
|
.
|
2002-01-31 02:12:17 +08:00
|
|
|
|
. {* Get the amount of memory required to hold the dynamic symbols. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Read in the dynamic symbols. *}
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. long (*_bfd_canonicalize_dynamic_symtab)
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. (bfd *, struct bfd_symbol **);
|
2004-04-22 22:45:32 +08:00
|
|
|
|
. {* Create synthetized symbols. *}
|
|
|
|
|
. long (*_bfd_get_synthetic_symtab)
|
2004-08-28 11:05:18 +08:00
|
|
|
|
. (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
|
|
|
|
|
. struct bfd_symbol **);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Get the amount of memory required to hold the dynamic relocs. *}
|
2003-06-29 18:06:40 +08:00
|
|
|
|
. long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
. {* Read in the dynamic relocs. *}
|
2002-11-30 16:39:46 +08:00
|
|
|
|
. long (*_bfd_canonicalize_dynamic_reloc)
|
Index: sim/frv/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* traps.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/d10v/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
Index: sim/common/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: ld/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry"
with "struct bfd_symbol".
Index: bfd/ChangeLog
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
bfd_symbol".
* vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
* mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
* cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
* bfd-in2.h: Re-generate.
2003-10-31 13:32:46 +08:00
|
|
|
|
. (bfd *, arelent **, struct bfd_symbol **);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.
|
|
|
|
|
|
1999-07-19 22:55:16 +08:00
|
|
|
|
A pointer to an alternative bfd_target in case the current one is not
|
|
|
|
|
satisfactory. This can happen when the target cpu supports both big
|
|
|
|
|
and little endian code, and target chosen by the linker has the wrong
|
|
|
|
|
endianness. The function open_output() in ld/ldlang.c uses this field
|
|
|
|
|
to find an alternative output format that is suitable.
|
|
|
|
|
|
2002-01-31 02:12:17 +08:00
|
|
|
|
. {* Opposite endian version of this target. *}
|
|
|
|
|
. const struct bfd_target * alternative_target;
|
2000-12-21 03:53:11 +08:00
|
|
|
|
.
|
1999-07-19 22:55:16 +08:00
|
|
|
|
|
2002-01-31 02:12:17 +08:00
|
|
|
|
. {* Data for use by back-end routines, which isn't
|
|
|
|
|
. generic enough to belong in this structure. *}
|
2003-08-07 16:38:11 +08:00
|
|
|
|
. const void *backend_data;
|
2000-12-21 03:53:11 +08:00
|
|
|
|
.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
.} bfd_target;
|
2002-01-31 02:12:17 +08:00
|
|
|
|
.
|
1999-05-03 15:29:11 +08: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
|
|
|
|
|
we can't intermix extern's and initializers. */
|
|
|
|
|
extern const bfd_target a_out_adobe_vec;
|
2002-06-17 10:27:38 +08:00
|
|
|
|
extern const bfd_target aix5coff64_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target aout0_big_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target aout_arm_big_vec;
|
|
|
|
|
extern const bfd_target aout_arm_little_vec;
|
|
|
|
|
extern const bfd_target aout_mips_big_vec;
|
|
|
|
|
extern const bfd_target aout_mips_little_vec;
|
|
|
|
|
extern const bfd_target apollocoff_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target arm_epoc_pe_big_vec;
|
|
|
|
|
extern const bfd_target arm_epoc_pe_little_vec;
|
|
|
|
|
extern const bfd_target arm_epoc_pei_big_vec;
|
|
|
|
|
extern const bfd_target arm_epoc_pei_little_vec;
|
2006-08-21 16:12:46 +08:00
|
|
|
|
extern const bfd_target arm_wince_pe_big_vec;
|
|
|
|
|
extern const bfd_target arm_wince_pe_little_vec;
|
|
|
|
|
extern const bfd_target arm_wince_pei_big_vec;
|
|
|
|
|
extern const bfd_target arm_wince_pei_little_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target armcoff_big_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target armcoff_little_vec;
|
1999-08-24 23:16:53 +08:00
|
|
|
|
extern const bfd_target armnetbsd_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target armpe_big_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target armpe_little_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target armpei_big_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target armpei_little_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target b_out_vec_big_host;
|
|
|
|
|
extern const bfd_target b_out_vec_little_host;
|
bfd/
2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10074
* coffcode.h (bfd_pei_p): New.
* config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
* configure.in: Remove bfd_efi_bsdrv_ia32_vec,
bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
bfd_efi_rtdrv_x86_64_vec,
bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
bfd_efi_ia64_vec with bfd_pei_ia64_vec.
* targets.c: Likewise.
* configure: Regenerated.
* libcoff.h: Likewise.
* Makefile.in: Likewise.
* efi-app-ia32.c: Removed.
* efi-app-x86_64.c: Likewise.
* efi-bsdrv-ia32.c: Likewise.
* efi-bsdrv-ia64.c: Likewise.
* efi-bsdrv-x86_64.c: Likewise.
* efi-rtdrv-ia32.c: Likewise.
* efi-rtdrv-ia64.c: Likewise.
* efi-rtdrv-x86_64.c: Likewise.
* efi-rtdrv-ia32.c: Likewise.
* efi-app-ia64.c: Moved to ...
* pei-ia64.c: This.
(TARGET_SYM): Set to bfd_pei_ia64_vec.
(TARGET_NAME): Set to pei-ia64.
* libpei.h (bfd_target_pei_p): Removed.
(bfd_target_pei_arch): Likewise.
(bfd_target_efi_app_p): Likewise.
(bfd_target_efi_app_arch): Likewise.
(bfd_target_efi_bsdrv_p): Likewise.
(bfd_target_efi_bsdrv_arch): Likewise.
(bfd_target_efi_rtdrv_p): Likewise.
(bfd_target_efi_rtdrv_arch): Likewise.
(bfd_pe_executable_p): Likewise.
* Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
(BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
and efi-rtdrv-ia32.c.
(BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
(BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
efi-rtdrv-x86_64.c. Add pei-ia64.c.
(efi-app-ia64.lo): Removed.
(efi-bsdrv-ia32.lo): Likewise.
(efi-rtdrv-ia32.lo): Likewise.
(efi-app-ia64.lo): Likewise.
(efi-bsdrv-ia64.lo): Likewise.
(efi-rtdrv-ia64.lo): Likewise.
(efi-app-x86_64.lo): Likewise.
(efi-bsdrv-x86_64.lo): Likewise.
(efi-rtdrv-x86_64.lo): Likewise.
(pei-ia64.lo): New.
* peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
with bfd_pei_p.
(arch_type): Removed.
(pe_arch): Likewise.
(pe_bfd_object_p): Just return coff_object_p.
* peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
bfd_pe_executable_p with bfd_pei_p.
binutils/
2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10074
* objcopy.c: Include coff/i386.h and coff/pe.h.
(pe_file_alignment): New.
(pe_heap_commit): Likewise.
(pe_heap_reserve): Likewise.
(pe_image_base): Likewise.
(pe_section_alignment): Likewise.
(pe_stack_commit): Likewise.
(pe_stack_reserve): Likewise.
(pe_subsystem): Likewise.
(pe_major_subsystem_version): Likewise.
(pe_minor_subsystem_version): Likewise.
(set_pe_subsystem): Likewise.
(convert_efi_target): Likewise.
(command_line_switch): Add OPTION_FILE_ALIGNMENT,
OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT,
OPTION_STACK and OPTION_SUBSYSTEM.
(copy_options): Likewise.
(copy_usage): Add --file-alignment, --heap, --image-base,
--section-alignment, --stack and --subsystem.
(copy_object): Set up PE parameters.
(copy_main): Process Add OPTION_FILE_ALIGNMENT,
OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT,
OPTION_STACK and OPTION_SUBSYSTEM. Convert EFI target to
PEI target.
* NEWS: Mention --file-alignment, --heap, --image-base,
--section-alignment, --stack and --subsystem command line
options for objcopy.
* doc/binutils.texi: Document --file-alignment, --heap,
--image-base, --section-alignment, --stack and --subsystem
command line options for objcopy.
2009-04-17 21:46:18 +08:00
|
|
|
|
extern const bfd_target bfd_pei_ia64_vec;
|
2000-03-27 16:39:14 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_avr_vec;
|
2005-09-30 23:36:41 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bfin_vec;
|
* config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
* configure.in: Likewise.
* configure: Regenerate.
* elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
(BFIN_RELOC_MAX): Now 0x21.
(bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
(bfd_elf32_bfinfdpic_vec): Declare.
(IS_FDPIC): New macro.
(struct bfinfdpic_elf_link_hash_table): New struct.
(bfinfdpic_hash_table, bfinfdpic_got_section,
bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
bfinfdpic_plt_initial_offset): Accessor macros for it.
(BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
(struct bfinfdpic_relocs_info): New struct.
(LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
DEFAULT_STACK_SIZE): New macros.
(bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
_bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
_bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
_bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
_bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
_bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
_bfinfdpic_resolve_final_relocs_info,
elf32_bfinfdpic_size_dynamic_sections,
elf32_bfinfdpic_always_size_sections,
elf32_bfinfdpic_modify_segment_map,
_bfinfdpic_count_got_plt_entries,
elf32_bfinfdpic_finish_dynamic_sections,
elf32_bfinfdpic_adjust_dynamic_symbol,
elf32_bfinfdpic_finish_dynamic_symbol,
elf32_bfinfdpic_elf_use_relative_eh_frame,
elf32_bfinfdpic_elf_encode_eh_address,
elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
elf32_bfinfdpic_copy_private_bfd_data,
(struct _bfinfdpic_dynamic_got_info,
struct _bfinfdpic_dynamic_got_plt_info): New structs.
(elf32_bfin_print_private_bfd_data): Print PIC flags.
(elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
(TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
bfd_elf32_bfd_copy_private_bfd_data,
elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
elf_backend_omit_section_dynsym): Redefine these macros and include
"elf32-target.h" again to create the elf32-bfinfdpic target.
* reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
BFD_RELOC_BFIN_GOTOFFLO): New.
* targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
(_bfd_target_vector): Add it.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
2006-03-26 08:38:42 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bfinfdpic_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_big_generic_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bigarc_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bigarm_vec;
|
2004-09-04 01:15:44 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bigarm_symbian_vec;
|
2005-01-07 00:18:25 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bigarm_vxworks_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bigmips_vec;
|
Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
bfd/
* bfd-in2.h: Regenerate.
* config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
* configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
(bfd_elf32_littlemips_vec): Likewise.
(bfd_elf32_nbigmips_vec): Likewise.
(bfd_elf32_nlittlemips_vec): Likewise.
(bfd_elf32_ntradbigmips_vec): Likewise.
(bfd_elf32_ntradlittlemips_vec): Likewise.
(bfd_elf32_tradbigmips_vec): Likewise.
(bfd_elf32_tradlittlemips_vec): Likewise.
(bfd_elf64_bigmips_vec): Likewise.
(bfd_elf64_littlemips_vec): Likewise.
(bfd_elf64_tradbigmips_vec): Likewise.
(bfd_elf64_tradlittlemips_vec): Likewise.
* elf32-mips.c: Include elf-vxworks.h.
(mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
instead of calling mips_elf32_rtype_to_howto directly.
(mips_vxworks_copy_howto_rela): New reloc howto.
(mips_vxworks_jump_slot_howto_rela): Likewise.
(mips_vxworks_bfd_reloc_type_lookup): New function.
(mips_vxworks_rtype_to_howto): Likewise.
(mips_vxworks_final_write_processing): Likewise.
(TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
(TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
(elf_backend_want_got_plt): Likewise.
(elf_backend_want_plt_sym): Likewise.
(elf_backend_got_symbol_offset): Likewise.
(elf_backend_want_dynbss): Likewise.
(elf_backend_may_use_rel_p): Likewise.
(elf_backend_may_use_rela_p): Likewise.
(elf_backend_default_use_rela_p): Likewise.
(elf_backend_got_header_size: Likewise.
(elf_backend_plt_readonly): Likewise.
(bfd_elf32_bfd_reloc_type_lookup): Likewise.
(elf_backend_mips_rtype_to_howto): Likewise.
(elf_backend_adjust_dynamic_symbol): Likewise.
(elf_backend_finish_dynamic_symbol): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing: Likewise.
(elf_backend_additional_program_headers): Likewise.
(elf_backend_modify_segment_map): Likewise.
(elf_backend_symbol_processing): Likewise.
* elfxx-mips.c: Include elf-vxworks.h.
(mips_elf_link_hash_entry): Add is_relocation_target and
is_branch_target fields.
(mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
(MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
(MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
Return 3 for VxWorks.
(ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
mips_elf_link_hash_table. Return 0 for VxWorks.
(MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
(mips_vxworks_exec_plt0_entry): New variable.
(mips_vxworks_exec_plt_entry): Likewise.
(mips_vxworks_shared_plt0_entry): Likewise.
(mips_vxworks_shared_plt_entry): Likewise.
(mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
(mips_elf_rel_dyn_section): Change the bfd argument to a
mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
the name of the section.
(mips_elf_initialize_tls_slots): Update the call to
mips_elf_rel_dyn_section.
(mips_elf_gotplt_index): New function.
(mips_elf_local_got_index): Add an input_section argument.
Update the call to mips_elf_create_local_got_entry.
(mips_elf_got_page): Likewise.
(mips_elf_got16_entry): Likewise.
(mips_elf_create_local_got_entry): Add bfd_link_info and input_section
arguments. Create dynamic relocations for each entry on VxWorks.
(mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
(mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
and MIPS_RESERVED_GOTNO.
(mips_elf_create_got_section): Update the uses of
MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
(is_gott_symbol): New function.
(mips_elf_calculate_relocation): Use a dynobj local variable.
Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
relocations on VxWorks. Add dynamic relocations for references
to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
in VxWorks executables.
(mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
Don't allocate a null entry on VxWorks.
(mips_elf_create_dynamic_relocation): Update the call to
mips_elf_rel_dyn_section. Use absolute rather than relative
relocations for VxWorks, and make them RELA rather than REL.
(_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
Call elf_vxworks_create_dynamic_sections for VxWorks and
initialize the plt_header_size and plt_entry_size fields.
(_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
used in VxWorks executables. Don't allocate dynamic relocations
for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
Set is_relocation_target for each symbol referenced by a relocation.
Allocate .rela.dyn entries for relocations against the special
VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
relocations. Don't set no_fn_stub on VxWorks.
(_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
mips_elf_allocate_dynamic_relocations.
(_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
(_bfd_mips_elf_always_size_sections): Do not allocate GOT page
entries for VxWorks, and do not create multiple GOTs.
(_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
Handle .got specially for VxWorks. Update the uses of
MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
once its final size is known. Set DF_TEXTREL for VxWorks. Add
DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
(_bfd_mips_vxworks_finish_dynamic_symbol): New function.
(mips_vxworks_finish_exec_plt): Likewise.
(mips_vxworks_finish_shared_plt): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
and mips_elf_rel_dyn_section. Use a different GOT header for
VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
(_bfd_mips_elf_link_hash_table_create): Initialize the new
mips_elf_link_hash_table fields.
(_bfd_mips_vxworks_link_hash_table_create): New function.
(_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
* elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(_bfd_mips_vxworks_link_hash_table_create): Likewise.
* libbfd.h: Regenerate.
* Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
(elf32-mips.lo): Likewise.
* Makefile.in: Regenerate.
* reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
* targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(_bfd_target_vector): Add entries for them.
gas/
* config/tc-mips.c (mips_target_format): Handle vxworks targets.
(md_begin): Complain about -G being used for PIC. Don't change
the text, data and bss alignments on VxWorks.
(reloc_needs_lo_p): Don't return true for R_MIPS_GOT16 when
generating VxWorks PIC.
(load_address): Extend SVR4_PIC handling to VXWORKS_PIC.
(macro): Likewise, but do not treat la $25 specially for
VxWorks PIC, and do not handle jal.
(OPTION_MVXWORKS_PIC): New macro.
(md_longopts): Add -mvxworks-pic.
(md_parse_option): Don't complain about using PIC and -G together here.
Handle OPTION_MVXWORKS_PIC.
(md_estimate_size_before_relax): Always use the first relaxation
sequence on VxWorks.
* config/tc-mips.h (VXWORKS_PIC): New.
gas/testsuite/
* gas/mips/vxworks1.s, gas/mips/vxworks1.d,
* gas/mips/vxworks1-xgot.d: New tests.
* gas/mips/mips.exp: Run them. Do not run other tests on VxWorks.
include/elf/
* mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
ld/
* configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
separate VxWorks emulations.
* emulparams/elf32ebmipvxworks.sh: New file.
* emulparams/elf32elmipvxworks.sh: New file.
* Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
eelf32elmipvxworks.o.
(eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-mips/vxworks1.dd, ld-mips/vxworks1.ld, ld-mips/vxworks1-lib.dd,
* ld-mips/vxworks1-lib.nd, ld-mips/vxworks1-lib.rd,
* ld-mips/vxworks1-lib.s, ld-mips/vxworks1.rd, ld-mips/vxworks1.s,
* ld-mips/vxworks1-static.d, ld-mips/vxworks2.s, ld-mips/vxworks2.sd,
* ld-mips/vxworks2-static.sd: New tests.
* ld-mips/mips-elf.exp: Run them.
2006-03-22 17:28:15 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bigmips_vxworks_vec;
|
2007-06-29 22:09:34 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_cr16_vec;
|
2004-03-30 22:04:32 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_cr16c_vec;
|
2000-07-21 00:21:07 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_cris_vec;
|
2004-07-08 01:28:53 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_crx_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_d10v_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_d30v_vec;
|
2002-05-28 22:08:47 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_dlx_big_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_fr30_vec;
|
2002-06-19 05:10:55 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_frv_vec;
|
2004-05-06 10:46:29 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_frvfdpic_vec;
|
2009-04-16 23:39:48 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_moxie_vec;
|
2001-08-29 09:33:52 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_h8300_vec;
|
2001-01-14 19:12:53 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_hppa_linux_vec;
|
2004-07-28 06:30:25 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_hppa_nbsd_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_hppa_vec;
|
2000-02-23 21:52:23 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_i370_vec;
|
2002-09-17 10:24:40 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_i386_freebsd_vec;
|
2005-05-05 22:37:27 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_i386_vxworks_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_i386_vec;
|
2000-07-22 Jason Eckhardt <jle@cygnus.com>
* include/opcode/i860.h (btne, bte, bla): Changed these opcodes
to use sbroff ('r') instead of split16 ('s').
(J, K, L, M): New operand types for 16-bit aligned fields.
(ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to
use I, J, K, L, M instead of just I.
(T, U): New operand types for split 16-bit aligned fields.
(st.x): Changed these opcodes to use S, T, U instead of just S.
(andh, andnoth, orh, xorh): Deleted 3-register forms as they do not
exist on the i860.
(pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860.
(pfeq.ss, pfeq.dd): New opcodes.
(st.s): Fixed incorrect mask bits.
(fmlow): Fixed incorrect mask bits.
(fzchkl, pfzchkl): Fixed incorrect mask bits.
(faddz, pfaddz): Fixed incorrect mask bits.
(form, pform): Fixed incorrect mask bits.
(pfld.l): Fixed incorrect mask bits.
(fst.q): Fixed incorrect mask bits.
(all floating point opcodes): Fixed incorrect mask bits for
handling of dual bit.
* include/elf/i860.h: New file.
(elf_i860_reloc_type): Defined ELF32 i860 relocations.
* bfd/cpu-i860.c: Added comments.
* bfd/elf32-i860.c (TARGET_LITTLE_SYM): Defined to
bfd_elf32_i860_little_vec.
(TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
(ELF_MAXPAGESIZE): Changed to 4096.
* bfd/targets.c (bfd_elf32_i860_little_vec): Declaration of
new target.
(bfd_target_vector): Added bfd_elf32_i860_little_vec.
* bfd/config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
config for little endian elf32 i860.
(targ_defvec): Define for the new config above
as "bfd_elf32_i860_little_vec".
(targ_selvecs): Define for the new config above
as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
* bfd/configure.in (bfd_elf32_i860_little_vec): Added recognition
of new target vec.
* bfd/configure: Regenerated.
* opcodes/i860-dis.c: New file.
(print_insn_i860): New function.
(print_br_address): New function.
(sign_extend): New function.
(BITWISE_OP): New macro.
(I860_REG_PREFIX): New macro.
(grnames, frnames, crnames): New structures.
* opcodes/disassemble.c (ARCH_i860): Define.
(disassembler): Add check for bfd_arch_i860 to set disassemble
function to print_insn_i860.
* include/dis-asm.h (print_insn_i860): Add prototype.
* opcodes/Makefile.in (CFILES): Added i860-dis.c.
(ALL_MACHINES): Added i860-dis.lo.
(i860-dis.lo): New dependences.
* opcodes/configure.in: New bits for bfd_i860_arch.
* opcodes/configure: Regenerated.
2000-07-29 05:10:20 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_i860_little_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_i860_vec;
|
1999-05-28 05:42:14 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_i960_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_ia64_big_vec;
|
2001-12-19 10:14:37 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
|
2002-07-17 22:15:52 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_ip2k_vec;
|
2003-01-04 05:12:28 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_iq2000_vec;
|
2008-12-24 03:10:25 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_lm32_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_lm32fdpic_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_little_generic_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_littlearc_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_littlearm_vec;
|
2004-09-04 01:15:44 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_littlearm_symbian_vec;
|
2005-01-07 00:18:25 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_littlearm_vxworks_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_littlemips_vec;
|
Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
bfd/
* bfd-in2.h: Regenerate.
* config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
* configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
(bfd_elf32_littlemips_vec): Likewise.
(bfd_elf32_nbigmips_vec): Likewise.
(bfd_elf32_nlittlemips_vec): Likewise.
(bfd_elf32_ntradbigmips_vec): Likewise.
(bfd_elf32_ntradlittlemips_vec): Likewise.
(bfd_elf32_tradbigmips_vec): Likewise.
(bfd_elf32_tradlittlemips_vec): Likewise.
(bfd_elf64_bigmips_vec): Likewise.
(bfd_elf64_littlemips_vec): Likewise.
(bfd_elf64_tradbigmips_vec): Likewise.
(bfd_elf64_tradlittlemips_vec): Likewise.
* elf32-mips.c: Include elf-vxworks.h.
(mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
instead of calling mips_elf32_rtype_to_howto directly.
(mips_vxworks_copy_howto_rela): New reloc howto.
(mips_vxworks_jump_slot_howto_rela): Likewise.
(mips_vxworks_bfd_reloc_type_lookup): New function.
(mips_vxworks_rtype_to_howto): Likewise.
(mips_vxworks_final_write_processing): Likewise.
(TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
(TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
(elf_backend_want_got_plt): Likewise.
(elf_backend_want_plt_sym): Likewise.
(elf_backend_got_symbol_offset): Likewise.
(elf_backend_want_dynbss): Likewise.
(elf_backend_may_use_rel_p): Likewise.
(elf_backend_may_use_rela_p): Likewise.
(elf_backend_default_use_rela_p): Likewise.
(elf_backend_got_header_size: Likewise.
(elf_backend_plt_readonly): Likewise.
(bfd_elf32_bfd_reloc_type_lookup): Likewise.
(elf_backend_mips_rtype_to_howto): Likewise.
(elf_backend_adjust_dynamic_symbol): Likewise.
(elf_backend_finish_dynamic_symbol): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing: Likewise.
(elf_backend_additional_program_headers): Likewise.
(elf_backend_modify_segment_map): Likewise.
(elf_backend_symbol_processing): Likewise.
* elfxx-mips.c: Include elf-vxworks.h.
(mips_elf_link_hash_entry): Add is_relocation_target and
is_branch_target fields.
(mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
(MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
(MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
Return 3 for VxWorks.
(ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
mips_elf_link_hash_table. Return 0 for VxWorks.
(MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
(mips_vxworks_exec_plt0_entry): New variable.
(mips_vxworks_exec_plt_entry): Likewise.
(mips_vxworks_shared_plt0_entry): Likewise.
(mips_vxworks_shared_plt_entry): Likewise.
(mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
(mips_elf_rel_dyn_section): Change the bfd argument to a
mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
the name of the section.
(mips_elf_initialize_tls_slots): Update the call to
mips_elf_rel_dyn_section.
(mips_elf_gotplt_index): New function.
(mips_elf_local_got_index): Add an input_section argument.
Update the call to mips_elf_create_local_got_entry.
(mips_elf_got_page): Likewise.
(mips_elf_got16_entry): Likewise.
(mips_elf_create_local_got_entry): Add bfd_link_info and input_section
arguments. Create dynamic relocations for each entry on VxWorks.
(mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
(mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
and MIPS_RESERVED_GOTNO.
(mips_elf_create_got_section): Update the uses of
MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
(is_gott_symbol): New function.
(mips_elf_calculate_relocation): Use a dynobj local variable.
Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
relocations on VxWorks. Add dynamic relocations for references
to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
in VxWorks executables.
(mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
Don't allocate a null entry on VxWorks.
(mips_elf_create_dynamic_relocation): Update the call to
mips_elf_rel_dyn_section. Use absolute rather than relative
relocations for VxWorks, and make them RELA rather than REL.
(_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
Call elf_vxworks_create_dynamic_sections for VxWorks and
initialize the plt_header_size and plt_entry_size fields.
(_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
used in VxWorks executables. Don't allocate dynamic relocations
for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
Set is_relocation_target for each symbol referenced by a relocation.
Allocate .rela.dyn entries for relocations against the special
VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
relocations. Don't set no_fn_stub on VxWorks.
(_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
mips_elf_allocate_dynamic_relocations.
(_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
(_bfd_mips_elf_always_size_sections): Do not allocate GOT page
entries for VxWorks, and do not create multiple GOTs.
(_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
Handle .got specially for VxWorks. Update the uses of
MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
once its final size is known. Set DF_TEXTREL for VxWorks. Add
DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
(_bfd_mips_vxworks_finish_dynamic_symbol): New function.
(mips_vxworks_finish_exec_plt): Likewise.
(mips_vxworks_finish_shared_plt): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
and mips_elf_rel_dyn_section. Use a different GOT header for
VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
(_bfd_mips_elf_link_hash_table_create): Initialize the new
mips_elf_link_hash_table fields.
(_bfd_mips_vxworks_link_hash_table_create): New function.
(_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
* elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(_bfd_mips_vxworks_link_hash_table_create): Likewise.
* libbfd.h: Regenerate.
* Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
(elf32-mips.lo): Likewise.
* Makefile.in: Regenerate.
* reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
* targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(_bfd_target_vector): Add entries for them.
gas/
* config/tc-mips.c (mips_target_format): Handle vxworks targets.
(md_begin): Complain about -G being used for PIC. Don't change
the text, data and bss alignments on VxWorks.
(reloc_needs_lo_p): Don't return true for R_MIPS_GOT16 when
generating VxWorks PIC.
(load_address): Extend SVR4_PIC handling to VXWORKS_PIC.
(macro): Likewise, but do not treat la $25 specially for
VxWorks PIC, and do not handle jal.
(OPTION_MVXWORKS_PIC): New macro.
(md_longopts): Add -mvxworks-pic.
(md_parse_option): Don't complain about using PIC and -G together here.
Handle OPTION_MVXWORKS_PIC.
(md_estimate_size_before_relax): Always use the first relaxation
sequence on VxWorks.
* config/tc-mips.h (VXWORKS_PIC): New.
gas/testsuite/
* gas/mips/vxworks1.s, gas/mips/vxworks1.d,
* gas/mips/vxworks1-xgot.d: New tests.
* gas/mips/mips.exp: Run them. Do not run other tests on VxWorks.
include/elf/
* mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
ld/
* configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
separate VxWorks emulations.
* emulparams/elf32ebmipvxworks.sh: New file.
* emulparams/elf32elmipvxworks.sh: New file.
* Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
eelf32elmipvxworks.o.
(eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-mips/vxworks1.dd, ld-mips/vxworks1.ld, ld-mips/vxworks1-lib.dd,
* ld-mips/vxworks1-lib.nd, ld-mips/vxworks1-lib.rd,
* ld-mips/vxworks1-lib.s, ld-mips/vxworks1.rd, ld-mips/vxworks1.s,
* ld-mips/vxworks1-static.d, ld-mips/vxworks2.s, ld-mips/vxworks2.sd,
* ld-mips/vxworks2-static.sd: New tests.
* ld-mips/mips-elf.exp: Run them.
2006-03-22 17:28:15 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_littlemips_vxworks_vec;
|
ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* configure.in: Add cases for Renesas m32c.
* configure: Regenerated.
bfd/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for m32c-*-elf (Renesas m32c and m16c).
* Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
(ALL_MACHINES_CFILES): Add cpu-m32c.c.
(BFD32_BACKENDS): Add elf32-m32c.lo.
(BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
(cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
* Makefile.in: Regenerated.
* archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
arch and mach codes.
(bfd_m32c_arch): New arch info object.
(bfd_archures_list): List bfd_m32c_arch.
* bfd-in2.h: Regenerated.
* config.bfd: Add case for the m32c.
* configure.in: Add case for the m32c.
* configure: Regenerated.
* cpu-m32c.c, elf32-m32c.c: New files.
* libbfd.h: Regenerated.
* targets.c (bfd_elf32_m32c_vec): Declare.
(_bfd_target_vector): List bfd_elf32_m32c_vec.
binutils/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* readelf.c: #include "elf/m32c.h"
(guess_is_rela, dump_relocations, get_machine_name): Add cases for
EM_M32C.
* Makefile.am (readelf.o): Update dependencies.
* Makefile.in: Regenerated.
cpu/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* m32c.cpu, m32c.opc: Machine description for the Renesas M32C.
gas/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C.
* Makefile.am (CPU_TYPES): List m32c.
(TARGET_CPU_CFILES): List config/tc-m32c.c.
(TARGET_CPU_HFILES): List config/tc-m32c.h.
* configure.in: Add case for m32c.
* configure.tgt: Add cases for m32c and m32c-*-elf.
* configure: Regenerated.
* config/tc-m32c.c, config/tc-m32c.h: New files.
* doc/Makefile.am (CPU_DOCS): Add c-m32c.texi.
* doc/Makefile.in: Regenerated.
* doc/all.texi: Set M32C.
* doc/as.texinfo: Add text for the M32C-specific options and line
comment characters, and refer to c-m32c.texi.
* doc/c-m32c.texi: New file.
include/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* dis-asm.h (print_insn_m32c): New declaration.
include/elf/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for Renesas M32C and M16C.
* common.h (EM_M32C): New machine number.
* m32c.h: New file.
ld/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C and M16C.
* Makefile.am (ALL_EMULATIONS): Add eelf32m32c.o.
(eelf32m32c.c): New target.
* Makefile.in: Regenerated.
* configure.tgt: Add case for m32c-*-elf.
* emulparams/elf32m32c.sh: New file.
opcodes/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C and M16C.
* m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c: New.
* m32c-desc.h, m32c-opc.h: New.
* Makefile.am (HFILES): List m32c-desc.h and m32c-opc.h.
(CFILES): List m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c,
m32c-opc.c.
(ALL_MACHINES): List m32c-asm.lo, m32c-desc.lo, m32c-dis.lo,
m32c-ibld.lo, m32c-opc.lo.
(CLEANFILES): List stamp-m32c.
(M32C_DEPS): List stamp-m32c, if CGEN_MAINT.
(CGEN_CPUS): Add m32c.
(m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c)
(m32c-desc.h, m32c-opc.h): Depend on M32C_DEPS.
(m32c_opc_h): New variable.
(stamp-m32c, m32c-asm.lo, m32c-desc.lo, m32c-dis.lo, m32c-ibld.lo)
(m32c-opc.lo): New rules.
* Makefile.in: Regenerated.
* configure.in: Add case for bfd_m32c_arch.
* configure: Regenerated.
* disassemble.c (ARCH_m32c): New.
[ARCH_m32c]: #include "m32c-desc.h".
(disassembler) [ARCH_m32c]: Add case for bfd_arch_m32c.
(disassemble_init_for_target) [ARCH_m32c]: Same.
* cgen-ops.h, cgen-types.h: New files.
* Makefile.am (HFILES): List them.
* Makefile.in: Regenerated.
2005-07-15 06:52:28 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_m32c_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_m32r_vec;
|
2003-12-19 19:44:01 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_m32rle_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_m32rlin_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_m32rlelin_vec;
|
2000-06-19 09:22:44 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_m68hc11_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_m68hc12_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_m68k_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_m88k_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_mcore_big_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_mcore_little_vec;
|
2007-02-06 03:50:12 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_mep_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_mep_little_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_mn10200_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_mn10300_vec;
|
Second part of ms1 to mt renaming.
* bfd/archures.c (bfd_arch_mt): Renamed.
(bfd_mt_arch): Renamed.
(bfd_archures_list): Adjusted.
* bfd/bfd-in2.h: Rebuilt.
* bfd/config.bfd (mt): Remove special case targ_archs.
(mt-*-elf): Rename bfd_elf32_mt_vec.
* bfd/configure: Rebuilt.
* bfd/configure.in (bfd_elf32_mt_vec): Renamed.
(selarchs) Remove mt special case.
* bfd/cpu-mt.c (arch_info_struct): Adjust.
(bfd_mt_arch): Renamed, adjust.
* bfd/elf32-mt.c (mt_reloc_type_lookup, mt_info_to_howto_rela,
mt_elf_relocate_hi16, mt_final_link_relocate, mt_relocate_section,
mt_elf_howto_table): Renamed, adjusted.
(mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook, mt_elf_check_relocs,
elf32_mt_machine, mt_elf_object_p, mt_elf_set_private_flags,
mt_elf_copy_private_bfd_data, mt_elf_merge_private_bfd_data,
mt_elf_print_private_bfd_data): Renamed, adjusted.
(TARGET_BIG_SYM, TARGET_BIG_NAME, ELF_ARCH, ELF_MACHINE_CODE,
ELF_MAXPAGESIZE, elf_info_to_howto, elf_backend_relocate_section,
bfd_elf32_bfd_reloc_type_lookup, elf_backend_gc_mark_hook,
elf_backend_gc_sweep_hook, elf_backend_check_relocs,
eld_backend_object_p, bfd_elf32_bfd_set_private_flags,
bfd_elf32_bfd_copy_private_bfd_data,
bfd_elf32_bfd_merge_private_bfd_data,
bfd_elf32_bfd_print_private_bfd_data): Adjusted.
* bfd/libbfd.h: Regenerated.
* bfd/reloc.c (BFD_RELOC_MT_PC16, BFD_RELOC_MT_HI16,
BFD_RELOC_MT_LO16, BFD_RELOC_MT_GNU_VTINHERIT,
BFD_RELOC_MT_GNU_VTENTRY, BFD_RELOC_MT_PCINSN8): Renamed.
* bfd/targets.c (bfd_elf32_mt_vec): Renamed.
(_bfd_target_vector): Adjusted.
* binutils/readelf.c (guess_is_rela): Use EM_MT.
(dump_relocations, get_machine_name): Adjust.
* cpu/mt.cpu (define-arch, define-isa): Set name to mt.
(define-mach): Adjust.
* cpu/mt.opc (CGEN_ASM_HASH): Update.
(mt_asm_hash, mt_cgen_insn_supported): Renamed.
(parse_loopsize, parse_imm16): Adjust.
* gas/configure: Rebuilt.
* gas/configure.in (mt): Remove special case.
* gas/config/tc-mt.c (opcodes/mt-desc.h, opcodes/mt-opc.h): Change
#includes.
(mt_insn, mt_mach, mt_mach_bitmask, mt_flags, mt_architectures):
Rename, adjust.
(md_parse_option, md_show_usage, md_begin, md_assemble,
md_cgen_lookup_reloc, md_atof): Adjust.
(mt_force_relocation, mt_apply_fix, mt_fix_adjustable): Rename, adjust.
* gas/config/tc-mt.h (TC_MT): Rename.
(LISTING_HEADER, TARGET_ARCH, TARGET_FORMAT): Adjust.
(md_apply_fix): Adjust.
(mt_apply_fix, mt_fix_adjustable, mt_force_relocation): Rename.
(TC_FORCE_RELOCATION, tc_fix_adjustable): Adjust.
* gdb/mt-tdep.c (mt_arch_constants, mt_gdb_regnums): Rename, adjust.
(mt_register_name, mt_register_type, mt_register_reggroup_p,
mt_return_value, mt_skip_prologue, mt_breapoint_from_pc,
mt_pseudo_register_read, mt_pseudo_register_write, mt_frame_align,
mt_registers_info, mt_push_dummy_call, mt_unwind_cache,
mt_frame_unwind_cache, mt_unwind_pc, mt_unwind_dummy_id,
mt_frame_this_id, mt_frame_prev_register, mt_frame_base_address,
mt_frame_unwind, mt_frame_sniffer, mt_frame_base, mt_gdbarch_init,
_initialize_mt_tdep): Rename & adjust.
* include/dis-asm.h (print_insn_mt): Renamed.
* include/elf/common.h (EM_MT): Renamed.
* include/elf/mt.h: Rename relocs, cpu & other defines.
* ld/emulparams/elf32mt.sh (ARCH, OUTPUT_FORMAT): Adjust.
* opcodes/Makefile.am (HFILES, CFILES, ALL_MACHINES): Adjust.
(stamp-mt): Adjust rule.
(mt-asm.lo, mt-desc.lo, mt-dis.lo, mt-ibld.lo, mt-opc.lo): Rename &
adjust.
* opcodes/Makefile.in: Rebuilt.
* opcodes/configure: Rebuilt.
* opcodes/configure.in (bfd_mt_arch): Rename & adjust.
* opcodes/disassemble.c (ARCH_mt): Renamed.
(disassembler): Adjust.
* opcodes/mt-asm.c: Renamed, rebuilt.
* opcodes/mt-desc.c: Renamed, rebuilt.
* opcodes/mt-desc.h: Renamed, rebuilt.
* opcodes/mt-dis.c: Renamed, rebuilt.
* opcodes/mt-ibld.c: Renamed, rebuilt.
* opcodes/mt-opc.c: Renamed, rebuilt.
* opcodes/mt-opc.h: Renamed, rebuilt.
* sid/Makefile.in: Rebuilt.
* sid/aclocal.m4: Rebuilt.
* sid/configure: Rebuilt.
* sid/sid.spec: Adjust.
* sid/bsp/Makefile.am: Adjust.
* sid/bsp/Makefile.in: Rebuilt.
* sid/bsp/aclocal.m4: Rebuilt.
* sid/bsp/configrun-sid.in: Adjust.
* sid/bsp/pregen/Makefile.in: Rebuilt.
* sid/bsp/pregen/mt-gdb.conf: Renamed & rebuilt.
* sid/bsp/pregen/mt-gloss.conf: Renamed & rebuilt.
* sid/bsp/pregen/pregen-configs.in: Adjust.
* sid/component/aclocal.m4: Rebuilt.
* sid/component/configure: Rebuilt.
* sid/component/tconfig.in: Adjust.
* sid/component/bochs/aclocal.m4: Rebuilt.
* sid/component/cache/Makefile.in: Rebuilt.
* sid/component/cgen-cpu/Makefile.in: Rebuilt.
* sid/component/cgen-cpu/aclocal.m4: Rebuilt.
* sid/component/cgen-cpu/compCGEN.cxx: Adjust.
* sid/component/cgen-cpu/configure: Rebuilt.
* sid/component/cgen-cpu/configure.in: Rebult.
* sid/component/cgen-cpu/mt/Makefile.am: Adjust.
* sid/component/cgen-cpu/mt/Makefile.in: Rebuilt.
* sid/component/cgen-cpu/mt/hw-cpu-mt.txt: Adjust.
* sid/component/cgen-cpu/mt/mt-cpu.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-decode.cxx: Rebuilt.
* sid/component/cgen-cpu/mt/mt-decode.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-defs.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-desc.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-sem.cxx: Rebuilt.
* sid/component/cgen-cpu/mt/mt-write.cxx: Rebuilt.
* sid/component/cgen-cpu/mt/mt.cxx: Adjust.
* sid/component/cgen-cpu/mt/mt.h: Adjust.
* sid/component/consoles/Makefile.in: Rebuilt.
* sid/component/families/aclocal.m4: Rebuilt.
* sid/component/families/configure: Rebuilt.
* sid/component/gdb/Makefile.in: Rebuilt.
* sid/component/gloss/Makefile.in: Rebuilt.
* sid/component/glue/Makefile.in: Rebuilt.
* sid/component/ide/Makefile.in: Rebuilt.
* sid/component/interrupt/Makefile.in: Rebuilt.
* sid/component/lcd/Makefile.in: Rebuilt.
* sid/component/lcd/testsuite/Makefile.in: Rebuilt.
* sid/component/loader/Makefile.am: Rebuilt.
* sid/component/loader/Makefile.in: Rebuilt.
* sid/component/mapper/Makefile.in: Rebuilt.
* sid/component/mapper/testsuite/Makefile.in: Rebuilt.
* sid/component/memory/Makefile.in: Rebuilt.
* sid/component/mmu/Makefile.in: Rebuilt.
* sid/component/parport/Makefile.in: Rebuilt.
* sid/component/profiling/Makefile.in: Rebuilt.
* sid/component/rtc/Makefile.in: Rebuilt.
* sid/component/sched/Makefile.in: Rebuilt.
* sid/component/testsuite/Makefile.in: Rebuilt.
* sid/component/timers/aclocal.m4: Rebuilt.
* sid/component/timers/configure: Rebuilt.
* sid/component/uart/Makefile.in: Rebuilt.
* sid/component/uart/testsuite/Makefile.in: Rebuilt.
* sid/config/config.sub: Adjust.
* sid/config/info.tcl.in: Adjust.
* sid/config/sidtargets.m4: Adjust.
* sid/doc/Makefile.in: Rebuilt.
* sid/main/dynamic/Makefile.am: Rebuilt.
* sid/main/dynamic/Makefile.in: Rebuilt.
* sid/main/dynamic/aclocal.m4: Rebuilt.
* sid/main/dynamic/configure: Rebuilt.
2005-12-16 18:23:12 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_mt_vec;
|
2002-12-31 03:25:13 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_msp430_vec;
|
2002-07-31 08:32:10 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_nbigmips_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_nlittlemips_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_ntradbigmips_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_ntradlittlemips_vec;
|
2001-04-24 23:08:16 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_openrisc_vec;
|
2002-02-01 01:33:08 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_or32_big_vec;
|
1999-09-05 01:07:46 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_pj_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_pjl_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_powerpc_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_powerpcle_vec;
|
2005-05-07 Paul Brook <paul@codesourcery.com>
bfd/
* config.bfd: Add separate case for ppc-vxworks.
* configure: Regenerate.
* configure.in: Include elf-vxworks.lo on ppc targets.
* elf-vxworks.c (elf_vxworks_final_write_processing): Handle
.rela.plt.unloaded.
* elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
(PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
(VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
(ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
(ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
(ppc_elf_create_got): Create .got.plt for VxWorks.
(ppc_elf_create_dynamic_sections): Create unloaded plt relocation
section for VxWorks.
(ppc_elf_select_plt_layout): Handle VxWorks plt format.
(allocate_got): VxWorks does not need a got header.
(allocate_dynrelocs): Handle VxWorks plt format.
(ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
VxWorks. Handle VxWorks plt/got.
(ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
(ppc_elf_vxworks_special_sections): New.
(ppc_elf_vxworks_link_hash_table_create,
ppc_elf_vxworks_add_symbol_hook,
elf_i386_vxworks_link_output_symbol_hook,
ppc_elf_vxworks_final_write_processing): New functions.
* targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
(_bfd_target_vector): Use it.
gas/
* config/tc-ppc.c (ppc_target_format): Add VxWorks.
gas/testsuite/
* gas/ppc/altivec.d: Match all powerpc target vecs.
* gas/ppc/booke.d: Ditto.
* gas/ppc/e500.d: Ditto.
ld/
* Makefile.am (ALL_EMULATIONS): Add eelf32ppcvxworks.o.
(eelf32ppcvxworks.o): Add dependencies.
* Makefile.in: Regenerate.
* configure.tgt: Add entry for powerpc-vxworks.
* emulparams/elf32-ppc.c: Mention elf32ppcvxworks.sh in comment.
* emulparams/elf32ppcvxworks.sh: New file.
* emultempl/ppc32elf.em (bfd_elf32_powerpc_vxworks_vec): Declare.
(is_ppc_elf32_vec): New function.
(ppc_after_open, ppc_before_allocation,
gld${EMULATION_NAME}_after_allocation): Use it.
2005-07-05 21:25:56 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
|
2001-02-10 08:58:38 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_s390_vec;
|
2006-09-17 07:51:50 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_bigscore_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_littlescore_vec;
|
2002-06-17 10:27:38 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_sh64_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_sh64l_vec;
|
2002-10-10 03:03:57 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_sh64lin_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_sh64blin_vec;
|
2002-06-17 10:27:38 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_sh64lnbsd_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_sh64nbsd_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_sh_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shblin_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shl_vec;
|
2004-07-07 00:58:43 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shl_symbian_vec;
|
2000-09-07 12:23:43 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shlin_vec;
|
2002-01-08 12:23:02 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shlnbsd_vec;
|
bfd/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
bfd_elf32_shlvxworks_vec.
* configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
(bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
(bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
(bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
(bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
(bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
(bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
(bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
* configure: Regenerate.
* Makefile.am: Regenerate dependencies.
* Makefile.in: Regenerate.
* elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
(elf_vxworks_add_symbol_hook): Use it.
(elf_vxworks_link_output_symbol_hook): Likewise. Use the hash
table entry to check for weak undefined symbols and to obtain
the original bfd.
(elf_vxworks_emit_relocs): Use target_index instead of this_idx.
* elf32-sh-relocs.h: New file, split from elf32-sh.c.
(R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
special_function field.
(R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
(R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
(R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
(R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
(R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
(R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
(SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
* elf32-sh.c: Include elf32-vxworks.h.
(MINUS_ONE): Define.
(sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
to sh_elf_reloc.
(sh_vxworks_howto_table): New variable. Include elf32-sh-relocs.h
with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
SH_ELF_RELOC set to bfd_elf_generic_reloc.
(vxworks_object_p, get_howto_table): New functions.
(sh_elf_reloc_type_lookup): Fix typo. Use get_howto_table.
(sh_elf_info_to_howto): Use get_howto_table.
(sh_elf_relax_section): Honor the partial_inplace field of the
R_SH_DIR32 howto.
(sh_elf_relax_delete_bytes): Likewise.
(elf_sh_plt_info): New structure.
(PLT_ENTRY_SIZE): Replace both definitions with...
(ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
(elf_sh_plt0_entry_le): Likewise.
(elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
(elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
(elf_sh_plts): New structure, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry): Delete both definitions.
(elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
(elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
(elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
(elf_sh_plt_reloc_offset): Likewise.
(movi_shori_putval): Delete in favor of...
(install_plt_field): ...this new function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(get_plt_info): New function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
(VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
(vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
(vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
(vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
(get_plt_index, get_plt_offset): New functions.
(elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
(sh_elf_link_hash_table_create): Initialize them.
(sh_elf_create_dynamic_sections): Call
elf_vxworks_create_dynamic_sections for VxWorks.
(allocate_dynrelocs): Use htab->plt_info to get the size of PLT
entries. Allocate relocation entries in .rela.plt.unloaded if
generating a VxWorks executable.
(sh_elf_always_size_sections): New function.
(sh_elf_size_dynamic_sections): Extend .rela.plt handling to
.rela.plt.unloaded.
(sh_elf_relocate_section): Use get_howto_table. Honor
partial_inplace when calculating the addend for dynamic
relocations. Use get_plt_index.
(sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
and htab->plt_info. Fill in the bra .plt offset for VxWorks
executables. Populate .rela.plt.unloaded. Do not make
_GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
(sh_elf_finish_dynamic_sections): Use install_plt_field and
htab->plt_info. Handle cases where there is no special PLT header.
Populate the first relocation in .rela.plt.unloaded and fix up
the remaining entries.
(sh_elf_plt_sym_val): Use get_plt_info.
(elf_backend_always_size_sections): Define.
(TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
(TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
(elf32_bed, elf_backend_want_plt_sym): Likewise.
(elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
(elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing): Likewise.
(ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
* targets.c (bfd_elf32_shlvxworks_vec): Declare.
(bfd_elf32_shvxworks_vec): Likewise.
(_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
bfd_elf32_shvxworks_vec.
gas/
* config/tc-sh.c (apply_full_field_fix): New function.
(md_apply_fix): Use it instead of md_number_to_chars. Do not fill
in fx_addnumber for BFD_RELOC_32_PLT_PCREL.
(tc_gen_reloc): Use fx_addnumber rather than 0 as the default case.
* config/tc-sh.h (TARGET_FORMAT): Override for TE_VXWORKS.
ld/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
* Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
eshlelf_vxworks.o.
(eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
* Makefile.in: Regenerate.
* configure.tgt (sh-*-vxworks): Use shelf_vxworks and
shlelf_vxworks.
* emulparams/shelf_vxworks.sh: New file.
* emulparams/shlelf_vxworks.sh: Likewise.
* emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
(OTHER_END_SYMBOLS): Likewise _ehdr.
(DATA_END_SYMBOLS): Likewise _edata.
* emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
is indeed an ELF file before dealing with --force-dynamic.
ld/testsuite/
* ld-sh/rd-sh.exp: Treat vxworks1-static.d specially.
* ld-sh/sh-vxworks.exp: New file.
* ld-sh/sh.exp: Extend sh-linux SIZEOF_HEADERS handling to
sh-*-vxworks.
* ld-sh/vxworks1-le.dd, ld-sh/vxworks1-lib-le.dd,
* ld-sh/vxworks1-lib.dd, ld-sh/vxworks1-lib.nd,
* ld-sh/vxworks1-lib.rd, ld-sh/vxworks1-lib.s,
* ld-sh/vxworks1-static.d, ld-sh/vxworks1.dd,
* ld-sh/vxworks1.ld, ld-sh/vxworks1.rd, ld-sh/vxworks1.s,
* ld-sh/vxworks2-static.sd, ld-sh/vxworks2.s,
* ld-sh/vxworks2.sd, ld-sh/vxworks3-le.dd,
* ld-sh/vxworks3-lib-le.dd, ld-sh/vxworks3-lib.dd,
* ld-sh/vxworks3-lib.s, ld-sh/vxworks3.dd, ld-sh/vxworks3.s,
* ld-sh/vxworks4.d, ld-sh/vxworks4a.s, ld-sh/vxworks4b.s,
* ld-sh/reloc1.s, ld-sh/reloc1.d: New tests.
2006-08-04 21:13:56 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shlvxworks_vec;
|
2002-01-08 12:23:02 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shnbsd_vec;
|
bfd/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
bfd_elf32_shlvxworks_vec.
* configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
(bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
(bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
(bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
(bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
(bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
(bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
(bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
* configure: Regenerate.
* Makefile.am: Regenerate dependencies.
* Makefile.in: Regenerate.
* elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
(elf_vxworks_add_symbol_hook): Use it.
(elf_vxworks_link_output_symbol_hook): Likewise. Use the hash
table entry to check for weak undefined symbols and to obtain
the original bfd.
(elf_vxworks_emit_relocs): Use target_index instead of this_idx.
* elf32-sh-relocs.h: New file, split from elf32-sh.c.
(R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
special_function field.
(R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
(R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
(R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
(R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
(R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
(R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
(SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
* elf32-sh.c: Include elf32-vxworks.h.
(MINUS_ONE): Define.
(sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
to sh_elf_reloc.
(sh_vxworks_howto_table): New variable. Include elf32-sh-relocs.h
with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
SH_ELF_RELOC set to bfd_elf_generic_reloc.
(vxworks_object_p, get_howto_table): New functions.
(sh_elf_reloc_type_lookup): Fix typo. Use get_howto_table.
(sh_elf_info_to_howto): Use get_howto_table.
(sh_elf_relax_section): Honor the partial_inplace field of the
R_SH_DIR32 howto.
(sh_elf_relax_delete_bytes): Likewise.
(elf_sh_plt_info): New structure.
(PLT_ENTRY_SIZE): Replace both definitions with...
(ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
(elf_sh_plt0_entry_le): Likewise.
(elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
(elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
(elf_sh_plts): New structure, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry): Delete both definitions.
(elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
(elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
(elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
(elf_sh_plt_reloc_offset): Likewise.
(movi_shori_putval): Delete in favor of...
(install_plt_field): ...this new function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(get_plt_info): New function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
(VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
(vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
(vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
(vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
(get_plt_index, get_plt_offset): New functions.
(elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
(sh_elf_link_hash_table_create): Initialize them.
(sh_elf_create_dynamic_sections): Call
elf_vxworks_create_dynamic_sections for VxWorks.
(allocate_dynrelocs): Use htab->plt_info to get the size of PLT
entries. Allocate relocation entries in .rela.plt.unloaded if
generating a VxWorks executable.
(sh_elf_always_size_sections): New function.
(sh_elf_size_dynamic_sections): Extend .rela.plt handling to
.rela.plt.unloaded.
(sh_elf_relocate_section): Use get_howto_table. Honor
partial_inplace when calculating the addend for dynamic
relocations. Use get_plt_index.
(sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
and htab->plt_info. Fill in the bra .plt offset for VxWorks
executables. Populate .rela.plt.unloaded. Do not make
_GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
(sh_elf_finish_dynamic_sections): Use install_plt_field and
htab->plt_info. Handle cases where there is no special PLT header.
Populate the first relocation in .rela.plt.unloaded and fix up
the remaining entries.
(sh_elf_plt_sym_val): Use get_plt_info.
(elf_backend_always_size_sections): Define.
(TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
(TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
(elf32_bed, elf_backend_want_plt_sym): Likewise.
(elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
(elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing): Likewise.
(ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
* targets.c (bfd_elf32_shlvxworks_vec): Declare.
(bfd_elf32_shvxworks_vec): Likewise.
(_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
bfd_elf32_shvxworks_vec.
gas/
* config/tc-sh.c (apply_full_field_fix): New function.
(md_apply_fix): Use it instead of md_number_to_chars. Do not fill
in fx_addnumber for BFD_RELOC_32_PLT_PCREL.
(tc_gen_reloc): Use fx_addnumber rather than 0 as the default case.
* config/tc-sh.h (TARGET_FORMAT): Override for TE_VXWORKS.
ld/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
* Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
eshlelf_vxworks.o.
(eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
* Makefile.in: Regenerate.
* configure.tgt (sh-*-vxworks): Use shelf_vxworks and
shlelf_vxworks.
* emulparams/shelf_vxworks.sh: New file.
* emulparams/shlelf_vxworks.sh: Likewise.
* emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
(OTHER_END_SYMBOLS): Likewise _ehdr.
(DATA_END_SYMBOLS): Likewise _edata.
* emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
is indeed an ELF file before dealing with --force-dynamic.
ld/testsuite/
* ld-sh/rd-sh.exp: Treat vxworks1-static.d specially.
* ld-sh/sh-vxworks.exp: New file.
* ld-sh/sh.exp: Extend sh-linux SIZEOF_HEADERS handling to
sh-*-vxworks.
* ld-sh/vxworks1-le.dd, ld-sh/vxworks1-lib-le.dd,
* ld-sh/vxworks1-lib.dd, ld-sh/vxworks1-lib.nd,
* ld-sh/vxworks1-lib.rd, ld-sh/vxworks1-lib.s,
* ld-sh/vxworks1-static.d, ld-sh/vxworks1.dd,
* ld-sh/vxworks1.ld, ld-sh/vxworks1.rd, ld-sh/vxworks1.s,
* ld-sh/vxworks2-static.sd, ld-sh/vxworks2.s,
* ld-sh/vxworks2.sd, ld-sh/vxworks3-le.dd,
* ld-sh/vxworks3-lib-le.dd, ld-sh/vxworks3-lib.dd,
* ld-sh/vxworks3-lib.s, ld-sh/vxworks3.dd, ld-sh/vxworks3.s,
* ld-sh/vxworks4.d, ld-sh/vxworks4a.s, ld-sh/vxworks4b.s,
* ld-sh/reloc1.s, ld-sh/reloc1.d: New tests.
2006-08-04 21:13:56 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_shvxworks_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_sparc_vec;
|
bfd/
* config.bfd (sparc-*-vxworks*): New stanza.
* configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
(bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
* configure: Regenerate.
* elf32-sparc.c: Include elf-vxworks.h.
(elf32_sparc_vxworks_link_hash_table_create: New.
(elf32_sparc_vxworks_final_write_processing): New.
(TARGET_BIG_SYM): Override for VxWorks.
(TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
(elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing, elf32_bed): Likewise.
* elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
(sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
(sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
(_bfd_sparc_elf_link_hash_table_create): Don't initialize
build_plt_entry here.
(create_got_section): Initialize sgotplt for VxWorks.
(_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
plt_header_size and plt_entry_size, with new VxWorks-specific settings.
Call elf_vxworks_create_dynamic_sections for VxWorks.
(allocate_dynrelocs): Use plt_header_size and plt_entry_size.
Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
(_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
for VxWorks. Check for the .got.plt section.
(sparc_vxworks_build_plt_entry): New function.
(_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
absolute on VxWorks.
(sparc32_finish_dyn): Add special handling for DT_RELASZ
and DT_PLTGOT on VxWorks.
(sparc_vxworks_finish_exec_plt): New.
(sparc_vxworks_finish_shared_plt): New.
(_bfd_sparc_elf_finish_dynamic_sections): Call them.
Use plt_header_size and plt_entry_size.
* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
* Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
(elf32-sparc.lo): Likewise.
* Makefile.in: Regenerate.
* targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
(_bfd_target_vector): Add a pointer to it.
gas/
* config/tc-sparc.c (sparc_target_format): Handle TE_VXWORKS.
(GOTT_BASE, GOTT_INDEX): New.
(tc_gen_reloc): Don't alter relocations against GOTT_BASE and
GOTT_INDEX when generating VxWorks PIC.
* configure.tgt (sparc*-*-vxworks*): Remove this special case;
use the generic *-*-vxworks* stanza instead.
gas/testsuite/
* gas/sparc/vxworks-pic.s, gas/sparc/vxworks-pic.d: New test.
* gas/sparc/sparc.exp: Run it. Remove sparc*-*-vxworks* XFAILs.
ld/
* configure.tgt (sparc*-*-vxworks*): New stanza.
* emulparams/elf32_sparc_vxworks.sh: New file.
* Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
(eelf32_sparc_vxworks.c): New rule.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-sparc/vxworks1.dd, ld-sparc/vxworks1.ld, ld-sparc/vxworks1-lib.dd,
* ld-sparc/vxworks1-lib.nd, ld-sparc/vxworks1-lib.rd,
* ld-sparc/vxworks1-lib.s, ld-sparc/vxworks1.rd, ld-sparc/vxworks1.s,
* ld-sparc/vxworks1-static.d, ld-sparc/vxworks2.s,
* ld-sparc/vxworks2.sd, ld-sparc/vxworks2-static.sd: New tests.
* ld-sparc/sparc.exp: Run them.
2006-04-05 20:41:59 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_sparc_vxworks_vec;
|
2006-10-25 14:49:21 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_spu_vec;
|
2000-07-02 09:17:52 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_tradbigmips_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_tradlittlemips_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_us_cris_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_v850_vec;
|
2002-05-30 10:14:13 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_vax_vec;
|
2006-02-17 22:36:28 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_xc16x_vec;
|
2001-12-08 11:46:03 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_xstormy16_vec;
|
2003-04-01 23:50:31 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_xtensa_be_vec;
|
|
|
|
|
extern const bfd_target bfd_elf32_xtensa_le_vec;
|
2002-09-17 10:24:40 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_alpha_freebsd_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_alpha_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_big_generic_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_bigmips_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_hppa_linux_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_hppa_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_ia64_big_vec;
|
2001-12-19 10:14:37 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_ia64_hpux_big_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_ia64_little_vec;
|
* include/elf/ia64.h (SHT_IA_64_VMS_DISPLAY_NAME_INFO,
EF_IA_64_ARCHVER_1): New macros. Minor reformatting.
* bfd/Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
(BFD32_BACKENDS_CFILES): Add new file vmsutil.c
(vmsutil.lo): Add dependency rule
* bfd/Makefile.in: Regenerate
* bfd/config.bfd (ia64*-*-*vms*): Add case.
* bfd/configure.in (bfd_elf64_ia64_vms_vec): Add case.
* bfd/configure: Regenerate
* bfd/vmsutil.[ch]: New files
* bfd/elf-bfd.h (struct bfd_elf_special_section): Change type of
attr to bfd_vma.
* bfd/elfxx-ia64.c (elfNN_vms_post_process_headers,
elfNN_vms_section_processing, elfNN_vms_final_write_processing,
elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
elfNN_vms_object_p): New functions
* bfd/targets.c (bfd_elf64_ia64_vms_vec): New target.
* gas/configure.tgt(ia64-*-*vms*): New target.
* gas/dwarf2dbg.h (dwarf2_loc_mark_labels): Make extern.
* gas/tc.h (md_number_to_chars): Declare iff undefined.
* gas/config/obj-elf.c (obj_elf_change_section): Change type of
arg attr to bfd_vma.
(obj_elf_parse_section_letters): Return a bfd_vma. Change type of
variables attr, md_attr to bfd_vma.
(obj_elf_section_word): Likewise.
(obj_elf_section): Change type of variable attr to bfd_vma
* gas/config/obj-elf.h (obj_elf_change_section): Change type of
arg attr to bfd_vma
* gas/config/tc-ia64.c (bfdver.h,time.h): Include.
(ia64_elf_section_letter): Now returns a bfd_vma.
Handle VMS specific attributes.
(ia64_elf_section_flags): Arg attr now a bfd_vma.
(ia64_init): Don't turn on dependency checking for VMS.
(ia64_target_format): Check for VMS flag bit.
(do_alias): Hande decc$ functions.
(get_vms_time): New function.
(ia64_vms_note): New function.
* gas/config/tc-ia64.h (ia64_elf_section_letter): Now returns a bfd_vma.
(ia64_elf_section_flags): Arg attr now a bfd_vma.
(tc_init_after_args): Define for VMS.
* gas/config/tc-alpha.c (alpha_elf_section_letter): Return a bfd_vma.
(alpha_elf_section_flags): Change type of arg attr to bfd_vma.
* gas/config/tc-alpha.h: Likewise.
* gas/config/tc-i386.c (x86_64_section_letter): Return a bfd_vma.
(x86_64_section_word): Return a bfd_vma.
* gas/config/tc-i386.h: Likewise.
* gas/config/tc-ip2k.c (ip2k_elf_section_flags): Change type of arg
attr to bfd_vma.
* gas/config/tc-ip2k.h: Likewise.
* gas/config/tc-mep.c (mep_elf_section_letter): Return a bfd_vma.
(mep_elf_section_flags): Change type of arg attr to bfd_vma.
* gas/config/tc-mep.h: Likewise.
* gas/config/tc-ppc.c (ppc_section_letter): Return a bfd_vma.
(ppc_section_word): Return a bfd_vma.
(ppc_section_flags): Change type of arg attr to bfd_vma.
* gas/config/tc-ppc.h: Likewise.
* gas/config/te-vms.h (DWARF2_DIR_SHOULD_END_WITH_SEPARATOR,
DWAR2_FILE_TIME_NAME, DWARF2_FILE_SIZE_NAME, DWARF2_FILEN_NAME):
New file with new macros
* gas/dwarf2dbg.c (get_filenum, out_file_list): Default and call new
macros.
2009-01-15 20:42:52 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_ia64_vms_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_little_generic_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_littlemips_vec;
|
2001-10-30 23:20:14 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_mmix_vec;
|
2001-08-27 18:22:03 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_powerpc_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_powerpcle_vec;
|
2001-02-10 08:58:38 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_s390_vec;
|
2002-06-17 10:27:38 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_sh64_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_sh64l_vec;
|
2002-10-10 03:03:57 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_sh64lin_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_sh64blin_vec;
|
2002-06-17 10:27:38 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_sh64lnbsd_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_sh64nbsd_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_sparc_vec;
|
2006-10-19 07:58:52 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_sparc_freebsd_vec;
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_tradbigmips_vec;
|
|
|
|
|
extern const bfd_target bfd_elf64_tradlittlemips_vec;
|
2006-08-03 00:25:14 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_x86_64_freebsd_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_elf64_x86_64_vec;
|
2001-10-30 23:20:14 +08:00
|
|
|
|
extern const bfd_target bfd_mmo_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target bfd_powerpc_pe_vec;
|
|
|
|
|
extern const bfd_target bfd_powerpc_pei_vec;
|
|
|
|
|
extern const bfd_target bfd_powerpcle_pe_vec;
|
|
|
|
|
extern const bfd_target bfd_powerpcle_pei_vec;
|
2000-07-21 00:21:07 +08:00
|
|
|
|
extern const bfd_target cris_aout_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target demo_64_vec;
|
|
|
|
|
extern const bfd_target ecoff_big_vec;
|
|
|
|
|
extern const bfd_target ecoff_biglittle_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target ecoff_little_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target ecoffalpha_little_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target go32coff_vec;
|
|
|
|
|
extern const bfd_target go32stubbedcoff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
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 i386aout_vec;
|
|
|
|
|
extern const bfd_target i386bsd_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target i386coff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target i386dynix_vec;
|
|
|
|
|
extern const bfd_target i386freebsd_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;
|
|
|
|
|
extern const bfd_target i386msdos_vec;
|
|
|
|
|
extern const bfd_target i386netbsd_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target i386os9k_vec;
|
|
|
|
|
extern const bfd_target i386pe_vec;
|
|
|
|
|
extern const bfd_target i386pei_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target i860coff_vec;
|
|
|
|
|
extern const bfd_target icoff_big_vec;
|
|
|
|
|
extern const bfd_target icoff_little_vec;
|
|
|
|
|
extern const bfd_target ieee_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target m68k4knetbsd_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target m68kaux_coff_vec;
|
|
|
|
|
extern const bfd_target m68kcoff_vec;
|
|
|
|
|
extern const bfd_target m68kcoffun_vec;
|
|
|
|
|
extern const bfd_target m68klinux_vec;
|
|
|
|
|
extern const bfd_target m68knetbsd_vec;
|
|
|
|
|
extern const bfd_target m68ksysvcoff_vec;
|
|
|
|
|
extern const bfd_target m88kbcs_vec;
|
|
|
|
|
extern const bfd_target m88kmach3_vec;
|
2004-05-24 22:48:18 +08:00
|
|
|
|
extern const bfd_target m88kopenbsd_vec;
|
2002-11-06 21:26:29 +08:00
|
|
|
|
extern const bfd_target mach_o_be_vec;
|
|
|
|
|
extern const bfd_target mach_o_le_vec;
|
|
|
|
|
extern const bfd_target mach_o_fat_vec;
|
2004-11-08 21:17:43 +08:00
|
|
|
|
extern const bfd_target maxqcoff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target mcore_pe_big_vec;
|
|
|
|
|
extern const bfd_target mcore_pe_little_vec;
|
|
|
|
|
extern const bfd_target mcore_pei_big_vec;
|
|
|
|
|
extern const bfd_target mcore_pei_little_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target mipslpe_vec;
|
|
|
|
|
extern const bfd_target mipslpei_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target newsos3_vec;
|
|
|
|
|
extern const bfd_target nlm32_alpha_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target nlm32_i386_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target nlm32_powerpc_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target nlm32_sparc_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target oasys_vec;
|
2002-02-01 01:33:08 +08:00
|
|
|
|
extern const bfd_target or32coff_big_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target pc532machaout_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target pc532netbsd_vec;
|
2001-02-19 07:33:11 +08:00
|
|
|
|
extern const bfd_target pdp11_aout_vec;
|
2002-11-06 21:26:29 +08:00
|
|
|
|
extern const bfd_target pef_vec;
|
|
|
|
|
extern const bfd_target pef_xlib_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target pmac_xcoff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target ppcboot_vec;
|
|
|
|
|
extern const bfd_target riscix_vec;
|
Add XCOFF64 support.
bfd:
* Makefile.am (coff64-rs6000.lo): New rule.
* Makefile.in: Regenerate.
* coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
xcoff_is_local_label_name, xcoff_rtype2howto,
xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
(NO_COFF_SYMBOLS): Define.
(xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
internally.
(MINUS_ONE): New macro.
(xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
relocation.
(coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
coff_SWAP_aux_out): Map to the new functions.
* coff64-rs6000.c: New file.
* libcoff.h (bfd_coff_backend_data): Add new fields
_bfd_coff_force_symnames_in_strings and
_bfd_coff_debug_string_prefix_length.
(bfd_coff_force_symnames_in_strings,
bfd_coff_debug_string_prefix_length): New macros for above fields.
* coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
of using coff_swap_sym_in directly.
(FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
(coff_set_flags) Set magic for XCOFF64.
(coff_compute_section_file_positions): Add symbol name length to
string section length if bfd_coff_debug_string_prefix_length is
true.
(coff_write_object_contents): Don't do reloc overflow for XCOFF64.
(coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
using coff_swap_lineno_in directly.
(bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
and _bfd_coff_debug_string_prefix_length fields.
* coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
symbol names into strings table when
bfd_coff_force_symnames_in_strings is true.
* coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
SET_RELOC_VADDR): New macros.
(coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
(coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
code.
(coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
changes within RS6000COFF_C specific code.
(coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
* reloc.c (bfd_perform_relocation, bfd_install_relocation):
Extend existing hack on target name.
* xcofflink.c (XCOFF_XVECP): Extend existing hack on
target name.
* coff-tic54x.c (ticof): Keep up to date with new fields
in bfd_coff_backend_data.
* config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
targ_selvecs to include rs6000coff64_vec for rs6000.
* configure.in: Add rs6000coff64_vec case.
* cpu-powerpc.c: New bfd_arch_info_type.
gas:
* as.c (parse_args): Allow md_parse_option to override -a listing
option.
* config/obj-coff.c (add_lineno): Change type of offset parameter
from "int" to "bfd_vma."
* config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine."
(ppc_mach, ppc_subseg_align, ppc_target_format): New.
(ppc_change_csect): Align correctly for XCOFF64.
(ppc_machine): New function, which discards "ppc_machine" line.
(ppc_tc): Cons for 8 when code is 64 bit.
(md_apply_fix3): Don't check operand->insert. Handle 64 bit
relocations.
(md_parse_option): Handle -a64 and -a32.
(ppc_xcoff64): New.
* config/tc-ppc.h (TARGET_MACH): Define.
(TARGET_FORMAT): Move to function.
(SUB_SEGMENT_ALIGN): Use ppc_subseg_align.
include:
* include/coff/rs6k64.h: New file.
opcodes:
* configure.in: Add bfd_powerpc_64_arch.
* disassemble.c (disassembler): Use print_insn_big_powerpc for
64 bit code.
2000-04-26 23:09:44 +08:00
|
|
|
|
extern const bfd_target rs6000coff64_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target rs6000coff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target shcoff_small_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target shcoff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target shlcoff_small_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target shlcoff_vec;
|
2000-02-29 02:56:11 +08:00
|
|
|
|
extern const bfd_target shlpe_vec;
|
|
|
|
|
extern const bfd_target shlpei_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target som_vec;
|
|
|
|
|
extern const bfd_target sparccoff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target sparcle_aout_vec;
|
|
|
|
|
extern const bfd_target sparclinux_vec;
|
|
|
|
|
extern const bfd_target sparclynx_aout_vec;
|
|
|
|
|
extern const bfd_target sparclynx_coff_vec;
|
|
|
|
|
extern const bfd_target sparcnetbsd_vec;
|
|
|
|
|
extern const bfd_target sunos_big_vec;
|
2002-11-06 21:26:29 +08:00
|
|
|
|
extern const bfd_target sym_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target tic30_aout_vec;
|
|
|
|
|
extern const bfd_target tic30_coff_vec;
|
2002-08-28 18:38:51 +08:00
|
|
|
|
extern const bfd_target tic4x_coff0_beh_vec;
|
|
|
|
|
extern const bfd_target tic4x_coff0_vec;
|
|
|
|
|
extern const bfd_target tic4x_coff1_beh_vec;
|
|
|
|
|
extern const bfd_target tic4x_coff1_vec;
|
|
|
|
|
extern const bfd_target tic4x_coff2_beh_vec;
|
|
|
|
|
extern const bfd_target tic4x_coff2_vec;
|
2000-04-08 01:06:58 +08:00
|
|
|
|
extern const bfd_target tic54x_coff0_beh_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target tic54x_coff0_vec;
|
2000-04-08 01:06:58 +08:00
|
|
|
|
extern const bfd_target tic54x_coff1_beh_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target tic54x_coff1_vec;
|
2000-04-08 01:06:58 +08:00
|
|
|
|
extern const bfd_target tic54x_coff2_beh_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target tic54x_coff2_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target tic80coff_vec;
|
2002-07-01 16:31:53 +08:00
|
|
|
|
extern const bfd_target vaxbsd_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target vaxnetbsd_vec;
|
2002-06-09 07:23:08 +08:00
|
|
|
|
extern const bfd_target vax1knetbsd_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target versados_vec;
|
|
|
|
|
extern const bfd_target vms_alpha_vec;
|
|
|
|
|
extern const bfd_target vms_vax_vec;
|
|
|
|
|
extern const bfd_target w65_vec;
|
2001-01-18 15:47:51 +08:00
|
|
|
|
extern const bfd_target we32kcoff_vec;
|
2006-09-20 19:35:11 +08:00
|
|
|
|
extern const bfd_target x86_64pe_vec;
|
|
|
|
|
extern const bfd_target x86_64pei_vec;
|
|
|
|
|
extern const bfd_target x86_64coff_vec;
|
2005-10-26 01:40:19 +08:00
|
|
|
|
extern const bfd_target z80coff_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target z8kcoff_vec;
|
|
|
|
|
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
/* These are always included. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target srec_vec;
|
|
|
|
|
extern const bfd_target symbolsrec_vec;
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
extern const bfd_target tekhex_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target binary_vec;
|
|
|
|
|
extern const bfd_target ihex_vec;
|
|
|
|
|
|
|
|
|
|
/* All of the xvecs for core files. */
|
|
|
|
|
extern const bfd_target aix386_core_vec;
|
1999-09-29 05:45:39 +08:00
|
|
|
|
extern const bfd_target cisco_core_big_vec;
|
|
|
|
|
extern const bfd_target cisco_core_little_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target hppabsd_core_vec;
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
extern const bfd_target hpux_core_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target irix_core_vec;
|
|
|
|
|
extern const bfd_target netbsd_core_vec;
|
|
|
|
|
extern const bfd_target osf_core_vec;
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
extern const bfd_target ptrace_core_vec;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
extern const bfd_target sco5_core_vec;
|
|
|
|
|
extern const bfd_target trad_core_vec;
|
|
|
|
|
|
2003-07-10 12:44:37 +08:00
|
|
|
|
extern const bfd_target bfd_elf32_am33lin_vec;
|
2006-09-20 19:35:11 +08:00
|
|
|
|
static const bfd_target * const _bfd_target_vector[] =
|
|
|
|
|
{
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#ifdef SELECT_VECS
|
|
|
|
|
|
|
|
|
|
SELECT_VECS,
|
|
|
|
|
|
|
|
|
|
#else /* not SELECT_VECS */
|
|
|
|
|
|
|
|
|
|
#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. */
|
|
|
|
|
&a_out_adobe_vec,
|
2002-06-25 18:05:05 +08:00
|
|
|
|
#ifdef BFD64
|
2002-06-17 10:27:38 +08:00
|
|
|
|
&aix5coff64_vec,
|
2002-06-25 18:05:05 +08:00
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&aout0_big_vec,
|
|
|
|
|
#if 0
|
2003-02-14 19:16:09 +08:00
|
|
|
|
/* We have no way of distinguishing these from other a.out variants. */
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&aout_arm_big_vec,
|
|
|
|
|
&aout_arm_little_vec,
|
|
|
|
|
/* No one seems to use this. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&aout_mips_big_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&aout_mips_little_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#if 0
|
|
|
|
|
&apollocoff_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&arm_epoc_pe_big_vec,
|
|
|
|
|
&arm_epoc_pe_little_vec,
|
|
|
|
|
&arm_epoc_pei_big_vec,
|
|
|
|
|
&arm_epoc_pei_little_vec,
|
2006-08-21 16:12:46 +08:00
|
|
|
|
&arm_wince_pe_big_vec,
|
|
|
|
|
&arm_wince_pe_little_vec,
|
|
|
|
|
&arm_wince_pei_big_vec,
|
|
|
|
|
&arm_wince_pei_little_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&armcoff_big_vec,
|
|
|
|
|
&armcoff_little_vec,
|
|
|
|
|
&armnetbsd_vec,
|
|
|
|
|
&armpe_big_vec,
|
|
|
|
|
&armpe_little_vec,
|
|
|
|
|
&armpei_big_vec,
|
|
|
|
|
&armpei_little_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&b_out_vec_big_host,
|
|
|
|
|
&b_out_vec_little_host,
|
2000-04-18 12:03:16 +08:00
|
|
|
|
#ifdef BFD64
|
bfd/
2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10074
* coffcode.h (bfd_pei_p): New.
* config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
* configure.in: Remove bfd_efi_bsdrv_ia32_vec,
bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
bfd_efi_rtdrv_x86_64_vec,
bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
bfd_efi_ia64_vec with bfd_pei_ia64_vec.
* targets.c: Likewise.
* configure: Regenerated.
* libcoff.h: Likewise.
* Makefile.in: Likewise.
* efi-app-ia32.c: Removed.
* efi-app-x86_64.c: Likewise.
* efi-bsdrv-ia32.c: Likewise.
* efi-bsdrv-ia64.c: Likewise.
* efi-bsdrv-x86_64.c: Likewise.
* efi-rtdrv-ia32.c: Likewise.
* efi-rtdrv-ia64.c: Likewise.
* efi-rtdrv-x86_64.c: Likewise.
* efi-rtdrv-ia32.c: Likewise.
* efi-app-ia64.c: Moved to ...
* pei-ia64.c: This.
(TARGET_SYM): Set to bfd_pei_ia64_vec.
(TARGET_NAME): Set to pei-ia64.
* libpei.h (bfd_target_pei_p): Removed.
(bfd_target_pei_arch): Likewise.
(bfd_target_efi_app_p): Likewise.
(bfd_target_efi_app_arch): Likewise.
(bfd_target_efi_bsdrv_p): Likewise.
(bfd_target_efi_bsdrv_arch): Likewise.
(bfd_target_efi_rtdrv_p): Likewise.
(bfd_target_efi_rtdrv_arch): Likewise.
(bfd_pe_executable_p): Likewise.
* Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
(BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
and efi-rtdrv-ia32.c.
(BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
(BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
efi-rtdrv-x86_64.c. Add pei-ia64.c.
(efi-app-ia64.lo): Removed.
(efi-bsdrv-ia32.lo): Likewise.
(efi-rtdrv-ia32.lo): Likewise.
(efi-app-ia64.lo): Likewise.
(efi-bsdrv-ia64.lo): Likewise.
(efi-rtdrv-ia64.lo): Likewise.
(efi-app-x86_64.lo): Likewise.
(efi-bsdrv-x86_64.lo): Likewise.
(efi-rtdrv-x86_64.lo): Likewise.
(pei-ia64.lo): New.
* peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
with bfd_pei_p.
(arch_type): Removed.
(pe_arch): Likewise.
(pe_bfd_object_p): Just return coff_object_p.
* peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
bfd_pe_executable_p with bfd_pei_p.
binutils/
2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10074
* objcopy.c: Include coff/i386.h and coff/pe.h.
(pe_file_alignment): New.
(pe_heap_commit): Likewise.
(pe_heap_reserve): Likewise.
(pe_image_base): Likewise.
(pe_section_alignment): Likewise.
(pe_stack_commit): Likewise.
(pe_stack_reserve): Likewise.
(pe_subsystem): Likewise.
(pe_major_subsystem_version): Likewise.
(pe_minor_subsystem_version): Likewise.
(set_pe_subsystem): Likewise.
(convert_efi_target): Likewise.
(command_line_switch): Add OPTION_FILE_ALIGNMENT,
OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT,
OPTION_STACK and OPTION_SUBSYSTEM.
(copy_options): Likewise.
(copy_usage): Add --file-alignment, --heap, --image-base,
--section-alignment, --stack and --subsystem.
(copy_object): Set up PE parameters.
(copy_main): Process Add OPTION_FILE_ALIGNMENT,
OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT,
OPTION_STACK and OPTION_SUBSYSTEM. Convert EFI target to
PEI target.
* NEWS: Mention --file-alignment, --heap, --image-base,
--section-alignment, --stack and --subsystem command line
options for objcopy.
* doc/binutils.texi: Document --file-alignment, --heap,
--image-base, --section-alignment, --stack and --subsystem
command line options for objcopy.
2009-04-17 21:46:18 +08:00
|
|
|
|
&bfd_pei_ia64_vec,
|
2000-04-18 12:03:16 +08:00
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_avr_vec,
|
2005-09-30 23:36:41 +08:00
|
|
|
|
&bfd_elf32_bfin_vec,
|
* config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
* configure.in: Likewise.
* configure: Regenerate.
* elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
(BFIN_RELOC_MAX): Now 0x21.
(bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
(bfd_elf32_bfinfdpic_vec): Declare.
(IS_FDPIC): New macro.
(struct bfinfdpic_elf_link_hash_table): New struct.
(bfinfdpic_hash_table, bfinfdpic_got_section,
bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
bfinfdpic_plt_initial_offset): Accessor macros for it.
(BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
(struct bfinfdpic_relocs_info): New struct.
(LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
DEFAULT_STACK_SIZE): New macros.
(bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
_bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
_bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
_bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
_bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
_bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
_bfinfdpic_resolve_final_relocs_info,
elf32_bfinfdpic_size_dynamic_sections,
elf32_bfinfdpic_always_size_sections,
elf32_bfinfdpic_modify_segment_map,
_bfinfdpic_count_got_plt_entries,
elf32_bfinfdpic_finish_dynamic_sections,
elf32_bfinfdpic_adjust_dynamic_symbol,
elf32_bfinfdpic_finish_dynamic_symbol,
elf32_bfinfdpic_elf_use_relative_eh_frame,
elf32_bfinfdpic_elf_encode_eh_address,
elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
elf32_bfinfdpic_copy_private_bfd_data,
(struct _bfinfdpic_dynamic_got_info,
struct _bfinfdpic_dynamic_got_plt_info): New structs.
(elf32_bfin_print_private_bfd_data): Print PIC flags.
(elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
(TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
bfd_elf32_bfd_copy_private_bfd_data,
elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
elf_backend_omit_section_dynsym): Redefine these macros and include
"elf32-target.h" again to create the elf32-bfinfdpic target.
* reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
BFD_RELOC_BFIN_GOTOFFLO): New.
* targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
(_bfd_target_vector): Add it.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
2006-03-26 08:38:42 +08:00
|
|
|
|
&bfd_elf32_bfinfdpic_vec,
|
2000-04-18 12:03:16 +08:00
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
|
/* This, and other vectors, may not be used in any *.mt configuration.
|
|
|
|
|
But that does not mean they are unnecessary. If configured with
|
|
|
|
|
--enable-targets=all, objdump or gdb should be able to examine
|
|
|
|
|
the file even if we don't recognize the machine type. */
|
|
|
|
|
&bfd_elf32_big_generic_vec,
|
|
|
|
|
&bfd_elf32_bigarc_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_bigarm_vec,
|
2004-09-04 01:15:44 +08:00
|
|
|
|
&bfd_elf32_bigarm_symbian_vec,
|
2005-01-07 00:18:25 +08:00
|
|
|
|
&bfd_elf32_bigarm_vxworks_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_bigmips_vec,
|
Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
bfd/
* bfd-in2.h: Regenerate.
* config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
* configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
(bfd_elf32_littlemips_vec): Likewise.
(bfd_elf32_nbigmips_vec): Likewise.
(bfd_elf32_nlittlemips_vec): Likewise.
(bfd_elf32_ntradbigmips_vec): Likewise.
(bfd_elf32_ntradlittlemips_vec): Likewise.
(bfd_elf32_tradbigmips_vec): Likewise.
(bfd_elf32_tradlittlemips_vec): Likewise.
(bfd_elf64_bigmips_vec): Likewise.
(bfd_elf64_littlemips_vec): Likewise.
(bfd_elf64_tradbigmips_vec): Likewise.
(bfd_elf64_tradlittlemips_vec): Likewise.
* elf32-mips.c: Include elf-vxworks.h.
(mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
instead of calling mips_elf32_rtype_to_howto directly.
(mips_vxworks_copy_howto_rela): New reloc howto.
(mips_vxworks_jump_slot_howto_rela): Likewise.
(mips_vxworks_bfd_reloc_type_lookup): New function.
(mips_vxworks_rtype_to_howto): Likewise.
(mips_vxworks_final_write_processing): Likewise.
(TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
(TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
(elf_backend_want_got_plt): Likewise.
(elf_backend_want_plt_sym): Likewise.
(elf_backend_got_symbol_offset): Likewise.
(elf_backend_want_dynbss): Likewise.
(elf_backend_may_use_rel_p): Likewise.
(elf_backend_may_use_rela_p): Likewise.
(elf_backend_default_use_rela_p): Likewise.
(elf_backend_got_header_size: Likewise.
(elf_backend_plt_readonly): Likewise.
(bfd_elf32_bfd_reloc_type_lookup): Likewise.
(elf_backend_mips_rtype_to_howto): Likewise.
(elf_backend_adjust_dynamic_symbol): Likewise.
(elf_backend_finish_dynamic_symbol): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing: Likewise.
(elf_backend_additional_program_headers): Likewise.
(elf_backend_modify_segment_map): Likewise.
(elf_backend_symbol_processing): Likewise.
* elfxx-mips.c: Include elf-vxworks.h.
(mips_elf_link_hash_entry): Add is_relocation_target and
is_branch_target fields.
(mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
(MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
(MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
Return 3 for VxWorks.
(ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
mips_elf_link_hash_table. Return 0 for VxWorks.
(MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
(mips_vxworks_exec_plt0_entry): New variable.
(mips_vxworks_exec_plt_entry): Likewise.
(mips_vxworks_shared_plt0_entry): Likewise.
(mips_vxworks_shared_plt_entry): Likewise.
(mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
(mips_elf_rel_dyn_section): Change the bfd argument to a
mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
the name of the section.
(mips_elf_initialize_tls_slots): Update the call to
mips_elf_rel_dyn_section.
(mips_elf_gotplt_index): New function.
(mips_elf_local_got_index): Add an input_section argument.
Update the call to mips_elf_create_local_got_entry.
(mips_elf_got_page): Likewise.
(mips_elf_got16_entry): Likewise.
(mips_elf_create_local_got_entry): Add bfd_link_info and input_section
arguments. Create dynamic relocations for each entry on VxWorks.
(mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
(mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
and MIPS_RESERVED_GOTNO.
(mips_elf_create_got_section): Update the uses of
MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
(is_gott_symbol): New function.
(mips_elf_calculate_relocation): Use a dynobj local variable.
Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
relocations on VxWorks. Add dynamic relocations for references
to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
in VxWorks executables.
(mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
Don't allocate a null entry on VxWorks.
(mips_elf_create_dynamic_relocation): Update the call to
mips_elf_rel_dyn_section. Use absolute rather than relative
relocations for VxWorks, and make them RELA rather than REL.
(_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
Call elf_vxworks_create_dynamic_sections for VxWorks and
initialize the plt_header_size and plt_entry_size fields.
(_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
used in VxWorks executables. Don't allocate dynamic relocations
for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
Set is_relocation_target for each symbol referenced by a relocation.
Allocate .rela.dyn entries for relocations against the special
VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
relocations. Don't set no_fn_stub on VxWorks.
(_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
mips_elf_allocate_dynamic_relocations.
(_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
(_bfd_mips_elf_always_size_sections): Do not allocate GOT page
entries for VxWorks, and do not create multiple GOTs.
(_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
Handle .got specially for VxWorks. Update the uses of
MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
once its final size is known. Set DF_TEXTREL for VxWorks. Add
DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
(_bfd_mips_vxworks_finish_dynamic_symbol): New function.
(mips_vxworks_finish_exec_plt): Likewise.
(mips_vxworks_finish_shared_plt): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
and mips_elf_rel_dyn_section. Use a different GOT header for
VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
(_bfd_mips_elf_link_hash_table_create): Initialize the new
mips_elf_link_hash_table fields.
(_bfd_mips_vxworks_link_hash_table_create): New function.
(_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
* elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(_bfd_mips_vxworks_link_hash_table_create): Likewise.
* libbfd.h: Regenerate.
* Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
(elf32-mips.lo): Likewise.
* Makefile.in: Regenerate.
* reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
* targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(_bfd_target_vector): Add entries for them.
gas/
* config/tc-mips.c (mips_target_format): Handle vxworks targets.
(md_begin): Complain about -G being used for PIC. Don't change
the text, data and bss alignments on VxWorks.
(reloc_needs_lo_p): Don't return true for R_MIPS_GOT16 when
generating VxWorks PIC.
(load_address): Extend SVR4_PIC handling to VXWORKS_PIC.
(macro): Likewise, but do not treat la $25 specially for
VxWorks PIC, and do not handle jal.
(OPTION_MVXWORKS_PIC): New macro.
(md_longopts): Add -mvxworks-pic.
(md_parse_option): Don't complain about using PIC and -G together here.
Handle OPTION_MVXWORKS_PIC.
(md_estimate_size_before_relax): Always use the first relaxation
sequence on VxWorks.
* config/tc-mips.h (VXWORKS_PIC): New.
gas/testsuite/
* gas/mips/vxworks1.s, gas/mips/vxworks1.d,
* gas/mips/vxworks1-xgot.d: New tests.
* gas/mips/mips.exp: Run them. Do not run other tests on VxWorks.
include/elf/
* mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
ld/
* configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
separate VxWorks emulations.
* emulparams/elf32ebmipvxworks.sh: New file.
* emulparams/elf32elmipvxworks.sh: New file.
* Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
eelf32elmipvxworks.o.
(eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-mips/vxworks1.dd, ld-mips/vxworks1.ld, ld-mips/vxworks1-lib.dd,
* ld-mips/vxworks1-lib.nd, ld-mips/vxworks1-lib.rd,
* ld-mips/vxworks1-lib.s, ld-mips/vxworks1.rd, ld-mips/vxworks1.s,
* ld-mips/vxworks1-static.d, ld-mips/vxworks2.s, ld-mips/vxworks2.sd,
* ld-mips/vxworks2-static.sd: New tests.
* ld-mips/mips-elf.exp: Run them.
2006-03-22 17:28:15 +08:00
|
|
|
|
&bfd_elf32_bigmips_vxworks_vec,
|
2007-06-29 22:09:34 +08:00
|
|
|
|
&bfd_elf32_cr16_vec,
|
2004-03-30 22:04:32 +08:00
|
|
|
|
&bfd_elf32_cr16c_vec,
|
2000-07-21 00:21:07 +08:00
|
|
|
|
&bfd_elf32_cris_vec,
|
2004-07-08 01:28:53 +08:00
|
|
|
|
&bfd_elf32_crx_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_d10v_vec,
|
|
|
|
|
&bfd_elf32_d30v_vec,
|
2002-05-28 22:08:47 +08:00
|
|
|
|
&bfd_elf32_dlx_big_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_fr30_vec,
|
2002-06-19 05:10:55 +08:00
|
|
|
|
&bfd_elf32_frv_vec,
|
2004-05-06 10:46:29 +08:00
|
|
|
|
&bfd_elf32_frvfdpic_vec,
|
2009-04-16 23:39:48 +08:00
|
|
|
|
&bfd_elf32_moxie_vec,
|
2002-01-23 20:21:07 +08:00
|
|
|
|
&bfd_elf32_h8300_vec,
|
2001-01-14 19:12:53 +08:00
|
|
|
|
&bfd_elf32_hppa_linux_vec,
|
2004-07-28 06:30:25 +08:00
|
|
|
|
&bfd_elf32_hppa_nbsd_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_hppa_vec,
|
2000-02-23 21:52:23 +08:00
|
|
|
|
&bfd_elf32_i370_vec,
|
2002-09-17 10:24:40 +08:00
|
|
|
|
&bfd_elf32_i386_freebsd_vec,
|
2005-05-05 22:37:27 +08:00
|
|
|
|
&bfd_elf32_i386_vxworks_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_i386_vec,
|
2000-07-22 Jason Eckhardt <jle@cygnus.com>
* include/opcode/i860.h (btne, bte, bla): Changed these opcodes
to use sbroff ('r') instead of split16 ('s').
(J, K, L, M): New operand types for 16-bit aligned fields.
(ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to
use I, J, K, L, M instead of just I.
(T, U): New operand types for split 16-bit aligned fields.
(st.x): Changed these opcodes to use S, T, U instead of just S.
(andh, andnoth, orh, xorh): Deleted 3-register forms as they do not
exist on the i860.
(pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860.
(pfeq.ss, pfeq.dd): New opcodes.
(st.s): Fixed incorrect mask bits.
(fmlow): Fixed incorrect mask bits.
(fzchkl, pfzchkl): Fixed incorrect mask bits.
(faddz, pfaddz): Fixed incorrect mask bits.
(form, pform): Fixed incorrect mask bits.
(pfld.l): Fixed incorrect mask bits.
(fst.q): Fixed incorrect mask bits.
(all floating point opcodes): Fixed incorrect mask bits for
handling of dual bit.
* include/elf/i860.h: New file.
(elf_i860_reloc_type): Defined ELF32 i860 relocations.
* bfd/cpu-i860.c: Added comments.
* bfd/elf32-i860.c (TARGET_LITTLE_SYM): Defined to
bfd_elf32_i860_little_vec.
(TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
(ELF_MAXPAGESIZE): Changed to 4096.
* bfd/targets.c (bfd_elf32_i860_little_vec): Declaration of
new target.
(bfd_target_vector): Added bfd_elf32_i860_little_vec.
* bfd/config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
config for little endian elf32 i860.
(targ_defvec): Define for the new config above
as "bfd_elf32_i860_little_vec".
(targ_selvecs): Define for the new config above
as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
* bfd/configure.in (bfd_elf32_i860_little_vec): Added recognition
of new target vec.
* bfd/configure: Regenerated.
* opcodes/i860-dis.c: New file.
(print_insn_i860): New function.
(print_br_address): New function.
(sign_extend): New function.
(BITWISE_OP): New macro.
(I860_REG_PREFIX): New macro.
(grnames, frnames, crnames): New structures.
* opcodes/disassemble.c (ARCH_i860): Define.
(disassembler): Add check for bfd_arch_i860 to set disassemble
function to print_insn_i860.
* include/dis-asm.h (print_insn_i860): Add prototype.
* opcodes/Makefile.in (CFILES): Added i860-dis.c.
(ALL_MACHINES): Added i860-dis.lo.
(i860-dis.lo): New dependences.
* opcodes/configure.in: New bits for bfd_i860_arch.
* opcodes/configure: Regenerated.
2000-07-29 05:10:20 +08:00
|
|
|
|
&bfd_elf32_i860_little_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_i860_vec,
|
1999-05-28 05:42:14 +08:00
|
|
|
|
&bfd_elf32_i960_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#if 0
|
|
|
|
|
&bfd_elf32_ia64_big_vec,
|
|
|
|
|
#endif
|
2005-03-25 05:02:19 +08:00
|
|
|
|
#ifdef BFD64
|
2002-01-23 20:21:07 +08:00
|
|
|
|
&bfd_elf32_ia64_hpux_big_vec,
|
2005-03-25 05:02:19 +08:00
|
|
|
|
#endif
|
2002-07-17 22:15:52 +08:00
|
|
|
|
&bfd_elf32_ip2k_vec,
|
2003-01-04 05:12:28 +08:00
|
|
|
|
&bfd_elf32_iq2000_vec,
|
2008-12-24 03:10:25 +08:00
|
|
|
|
&bfd_elf32_lm32_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_little_generic_vec,
|
|
|
|
|
&bfd_elf32_littlearc_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_littlearm_vec,
|
2004-09-04 01:15:44 +08:00
|
|
|
|
&bfd_elf32_littlearm_symbian_vec,
|
2005-01-07 00:18:25 +08:00
|
|
|
|
&bfd_elf32_littlearm_vxworks_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_littlemips_vec,
|
Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
bfd/
* bfd-in2.h: Regenerate.
* config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
* configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
(bfd_elf32_littlemips_vec): Likewise.
(bfd_elf32_nbigmips_vec): Likewise.
(bfd_elf32_nlittlemips_vec): Likewise.
(bfd_elf32_ntradbigmips_vec): Likewise.
(bfd_elf32_ntradlittlemips_vec): Likewise.
(bfd_elf32_tradbigmips_vec): Likewise.
(bfd_elf32_tradlittlemips_vec): Likewise.
(bfd_elf64_bigmips_vec): Likewise.
(bfd_elf64_littlemips_vec): Likewise.
(bfd_elf64_tradbigmips_vec): Likewise.
(bfd_elf64_tradlittlemips_vec): Likewise.
* elf32-mips.c: Include elf-vxworks.h.
(mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
instead of calling mips_elf32_rtype_to_howto directly.
(mips_vxworks_copy_howto_rela): New reloc howto.
(mips_vxworks_jump_slot_howto_rela): Likewise.
(mips_vxworks_bfd_reloc_type_lookup): New function.
(mips_vxworks_rtype_to_howto): Likewise.
(mips_vxworks_final_write_processing): Likewise.
(TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
(TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
(elf_backend_want_got_plt): Likewise.
(elf_backend_want_plt_sym): Likewise.
(elf_backend_got_symbol_offset): Likewise.
(elf_backend_want_dynbss): Likewise.
(elf_backend_may_use_rel_p): Likewise.
(elf_backend_may_use_rela_p): Likewise.
(elf_backend_default_use_rela_p): Likewise.
(elf_backend_got_header_size: Likewise.
(elf_backend_plt_readonly): Likewise.
(bfd_elf32_bfd_reloc_type_lookup): Likewise.
(elf_backend_mips_rtype_to_howto): Likewise.
(elf_backend_adjust_dynamic_symbol): Likewise.
(elf_backend_finish_dynamic_symbol): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing: Likewise.
(elf_backend_additional_program_headers): Likewise.
(elf_backend_modify_segment_map): Likewise.
(elf_backend_symbol_processing): Likewise.
* elfxx-mips.c: Include elf-vxworks.h.
(mips_elf_link_hash_entry): Add is_relocation_target and
is_branch_target fields.
(mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
(MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
(MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
Return 3 for VxWorks.
(ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
mips_elf_link_hash_table. Return 0 for VxWorks.
(MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
(mips_vxworks_exec_plt0_entry): New variable.
(mips_vxworks_exec_plt_entry): Likewise.
(mips_vxworks_shared_plt0_entry): Likewise.
(mips_vxworks_shared_plt_entry): Likewise.
(mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
(mips_elf_rel_dyn_section): Change the bfd argument to a
mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
the name of the section.
(mips_elf_initialize_tls_slots): Update the call to
mips_elf_rel_dyn_section.
(mips_elf_gotplt_index): New function.
(mips_elf_local_got_index): Add an input_section argument.
Update the call to mips_elf_create_local_got_entry.
(mips_elf_got_page): Likewise.
(mips_elf_got16_entry): Likewise.
(mips_elf_create_local_got_entry): Add bfd_link_info and input_section
arguments. Create dynamic relocations for each entry on VxWorks.
(mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
(mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
and MIPS_RESERVED_GOTNO.
(mips_elf_create_got_section): Update the uses of
MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
(is_gott_symbol): New function.
(mips_elf_calculate_relocation): Use a dynobj local variable.
Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
relocations on VxWorks. Add dynamic relocations for references
to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
in VxWorks executables.
(mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
Don't allocate a null entry on VxWorks.
(mips_elf_create_dynamic_relocation): Update the call to
mips_elf_rel_dyn_section. Use absolute rather than relative
relocations for VxWorks, and make them RELA rather than REL.
(_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
Call elf_vxworks_create_dynamic_sections for VxWorks and
initialize the plt_header_size and plt_entry_size fields.
(_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
used in VxWorks executables. Don't allocate dynamic relocations
for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
Set is_relocation_target for each symbol referenced by a relocation.
Allocate .rela.dyn entries for relocations against the special
VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
relocations. Don't set no_fn_stub on VxWorks.
(_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
mips_elf_allocate_dynamic_relocations.
(_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
(_bfd_mips_elf_always_size_sections): Do not allocate GOT page
entries for VxWorks, and do not create multiple GOTs.
(_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
Handle .got specially for VxWorks. Update the uses of
MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
once its final size is known. Set DF_TEXTREL for VxWorks. Add
DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
(_bfd_mips_vxworks_finish_dynamic_symbol): New function.
(mips_vxworks_finish_exec_plt): Likewise.
(mips_vxworks_finish_shared_plt): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
and mips_elf_rel_dyn_section. Use a different GOT header for
VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
(_bfd_mips_elf_link_hash_table_create): Initialize the new
mips_elf_link_hash_table fields.
(_bfd_mips_vxworks_link_hash_table_create): New function.
(_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
* elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(_bfd_mips_vxworks_link_hash_table_create): Likewise.
* libbfd.h: Regenerate.
* Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
(elf32-mips.lo): Likewise.
* Makefile.in: Regenerate.
* reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
* targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
(bfd_elf32_littlemips_vxworks_vec): Likewise.
(_bfd_target_vector): Add entries for them.
gas/
* config/tc-mips.c (mips_target_format): Handle vxworks targets.
(md_begin): Complain about -G being used for PIC. Don't change
the text, data and bss alignments on VxWorks.
(reloc_needs_lo_p): Don't return true for R_MIPS_GOT16 when
generating VxWorks PIC.
(load_address): Extend SVR4_PIC handling to VXWORKS_PIC.
(macro): Likewise, but do not treat la $25 specially for
VxWorks PIC, and do not handle jal.
(OPTION_MVXWORKS_PIC): New macro.
(md_longopts): Add -mvxworks-pic.
(md_parse_option): Don't complain about using PIC and -G together here.
Handle OPTION_MVXWORKS_PIC.
(md_estimate_size_before_relax): Always use the first relaxation
sequence on VxWorks.
* config/tc-mips.h (VXWORKS_PIC): New.
gas/testsuite/
* gas/mips/vxworks1.s, gas/mips/vxworks1.d,
* gas/mips/vxworks1-xgot.d: New tests.
* gas/mips/mips.exp: Run them. Do not run other tests on VxWorks.
include/elf/
* mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
ld/
* configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
separate VxWorks emulations.
* emulparams/elf32ebmipvxworks.sh: New file.
* emulparams/elf32elmipvxworks.sh: New file.
* Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
eelf32elmipvxworks.o.
(eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-mips/vxworks1.dd, ld-mips/vxworks1.ld, ld-mips/vxworks1-lib.dd,
* ld-mips/vxworks1-lib.nd, ld-mips/vxworks1-lib.rd,
* ld-mips/vxworks1-lib.s, ld-mips/vxworks1.rd, ld-mips/vxworks1.s,
* ld-mips/vxworks1-static.d, ld-mips/vxworks2.s, ld-mips/vxworks2.sd,
* ld-mips/vxworks2-static.sd: New tests.
* ld-mips/mips-elf.exp: Run them.
2006-03-22 17:28:15 +08:00
|
|
|
|
&bfd_elf32_littlemips_vxworks_vec,
|
ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* configure.in: Add cases for Renesas m32c.
* configure: Regenerated.
bfd/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for m32c-*-elf (Renesas m32c and m16c).
* Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
(ALL_MACHINES_CFILES): Add cpu-m32c.c.
(BFD32_BACKENDS): Add elf32-m32c.lo.
(BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
(cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
* Makefile.in: Regenerated.
* archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
arch and mach codes.
(bfd_m32c_arch): New arch info object.
(bfd_archures_list): List bfd_m32c_arch.
* bfd-in2.h: Regenerated.
* config.bfd: Add case for the m32c.
* configure.in: Add case for the m32c.
* configure: Regenerated.
* cpu-m32c.c, elf32-m32c.c: New files.
* libbfd.h: Regenerated.
* targets.c (bfd_elf32_m32c_vec): Declare.
(_bfd_target_vector): List bfd_elf32_m32c_vec.
binutils/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* readelf.c: #include "elf/m32c.h"
(guess_is_rela, dump_relocations, get_machine_name): Add cases for
EM_M32C.
* Makefile.am (readelf.o): Update dependencies.
* Makefile.in: Regenerated.
cpu/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* m32c.cpu, m32c.opc: Machine description for the Renesas M32C.
gas/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C.
* Makefile.am (CPU_TYPES): List m32c.
(TARGET_CPU_CFILES): List config/tc-m32c.c.
(TARGET_CPU_HFILES): List config/tc-m32c.h.
* configure.in: Add case for m32c.
* configure.tgt: Add cases for m32c and m32c-*-elf.
* configure: Regenerated.
* config/tc-m32c.c, config/tc-m32c.h: New files.
* doc/Makefile.am (CPU_DOCS): Add c-m32c.texi.
* doc/Makefile.in: Regenerated.
* doc/all.texi: Set M32C.
* doc/as.texinfo: Add text for the M32C-specific options and line
comment characters, and refer to c-m32c.texi.
* doc/c-m32c.texi: New file.
include/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
* dis-asm.h (print_insn_m32c): New declaration.
include/elf/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for Renesas M32C and M16C.
* common.h (EM_M32C): New machine number.
* m32c.h: New file.
ld/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C and M16C.
* Makefile.am (ALL_EMULATIONS): Add eelf32m32c.o.
(eelf32m32c.c): New target.
* Makefile.in: Regenerated.
* configure.tgt: Add case for m32c-*-elf.
* emulparams/elf32m32c.sh: New file.
opcodes/ChangeLog:
2005-07-14 Jim Blandy <jimb@redhat.com>
Add support for the Renesas M32C and M16C.
* m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c: New.
* m32c-desc.h, m32c-opc.h: New.
* Makefile.am (HFILES): List m32c-desc.h and m32c-opc.h.
(CFILES): List m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c,
m32c-opc.c.
(ALL_MACHINES): List m32c-asm.lo, m32c-desc.lo, m32c-dis.lo,
m32c-ibld.lo, m32c-opc.lo.
(CLEANFILES): List stamp-m32c.
(M32C_DEPS): List stamp-m32c, if CGEN_MAINT.
(CGEN_CPUS): Add m32c.
(m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c)
(m32c-desc.h, m32c-opc.h): Depend on M32C_DEPS.
(m32c_opc_h): New variable.
(stamp-m32c, m32c-asm.lo, m32c-desc.lo, m32c-dis.lo, m32c-ibld.lo)
(m32c-opc.lo): New rules.
* Makefile.in: Regenerated.
* configure.in: Add case for bfd_m32c_arch.
* configure: Regenerated.
* disassemble.c (ARCH_m32c): New.
[ARCH_m32c]: #include "m32c-desc.h".
(disassembler) [ARCH_m32c]: Add case for bfd_arch_m32c.
(disassemble_init_for_target) [ARCH_m32c]: Same.
* cgen-ops.h, cgen-types.h: New files.
* Makefile.am (HFILES): List them.
* Makefile.in: Regenerated.
2005-07-15 06:52:28 +08:00
|
|
|
|
&bfd_elf32_m32c_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_m32r_vec,
|
2003-12-19 19:44:01 +08:00
|
|
|
|
&bfd_elf32_m32rle_vec,
|
|
|
|
|
&bfd_elf32_m32rlin_vec,
|
|
|
|
|
&bfd_elf32_m32rlelin_vec,
|
2000-06-19 09:22:44 +08:00
|
|
|
|
&bfd_elf32_m68hc11_vec,
|
|
|
|
|
&bfd_elf32_m68hc12_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_m68k_vec,
|
|
|
|
|
&bfd_elf32_m88k_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_mcore_big_vec,
|
|
|
|
|
&bfd_elf32_mcore_little_vec,
|
2007-02-06 03:50:12 +08:00
|
|
|
|
&bfd_elf32_mep_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_mn10200_vec,
|
|
|
|
|
&bfd_elf32_mn10300_vec,
|
Second part of ms1 to mt renaming.
* bfd/archures.c (bfd_arch_mt): Renamed.
(bfd_mt_arch): Renamed.
(bfd_archures_list): Adjusted.
* bfd/bfd-in2.h: Rebuilt.
* bfd/config.bfd (mt): Remove special case targ_archs.
(mt-*-elf): Rename bfd_elf32_mt_vec.
* bfd/configure: Rebuilt.
* bfd/configure.in (bfd_elf32_mt_vec): Renamed.
(selarchs) Remove mt special case.
* bfd/cpu-mt.c (arch_info_struct): Adjust.
(bfd_mt_arch): Renamed, adjust.
* bfd/elf32-mt.c (mt_reloc_type_lookup, mt_info_to_howto_rela,
mt_elf_relocate_hi16, mt_final_link_relocate, mt_relocate_section,
mt_elf_howto_table): Renamed, adjusted.
(mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook, mt_elf_check_relocs,
elf32_mt_machine, mt_elf_object_p, mt_elf_set_private_flags,
mt_elf_copy_private_bfd_data, mt_elf_merge_private_bfd_data,
mt_elf_print_private_bfd_data): Renamed, adjusted.
(TARGET_BIG_SYM, TARGET_BIG_NAME, ELF_ARCH, ELF_MACHINE_CODE,
ELF_MAXPAGESIZE, elf_info_to_howto, elf_backend_relocate_section,
bfd_elf32_bfd_reloc_type_lookup, elf_backend_gc_mark_hook,
elf_backend_gc_sweep_hook, elf_backend_check_relocs,
eld_backend_object_p, bfd_elf32_bfd_set_private_flags,
bfd_elf32_bfd_copy_private_bfd_data,
bfd_elf32_bfd_merge_private_bfd_data,
bfd_elf32_bfd_print_private_bfd_data): Adjusted.
* bfd/libbfd.h: Regenerated.
* bfd/reloc.c (BFD_RELOC_MT_PC16, BFD_RELOC_MT_HI16,
BFD_RELOC_MT_LO16, BFD_RELOC_MT_GNU_VTINHERIT,
BFD_RELOC_MT_GNU_VTENTRY, BFD_RELOC_MT_PCINSN8): Renamed.
* bfd/targets.c (bfd_elf32_mt_vec): Renamed.
(_bfd_target_vector): Adjusted.
* binutils/readelf.c (guess_is_rela): Use EM_MT.
(dump_relocations, get_machine_name): Adjust.
* cpu/mt.cpu (define-arch, define-isa): Set name to mt.
(define-mach): Adjust.
* cpu/mt.opc (CGEN_ASM_HASH): Update.
(mt_asm_hash, mt_cgen_insn_supported): Renamed.
(parse_loopsize, parse_imm16): Adjust.
* gas/configure: Rebuilt.
* gas/configure.in (mt): Remove special case.
* gas/config/tc-mt.c (opcodes/mt-desc.h, opcodes/mt-opc.h): Change
#includes.
(mt_insn, mt_mach, mt_mach_bitmask, mt_flags, mt_architectures):
Rename, adjust.
(md_parse_option, md_show_usage, md_begin, md_assemble,
md_cgen_lookup_reloc, md_atof): Adjust.
(mt_force_relocation, mt_apply_fix, mt_fix_adjustable): Rename, adjust.
* gas/config/tc-mt.h (TC_MT): Rename.
(LISTING_HEADER, TARGET_ARCH, TARGET_FORMAT): Adjust.
(md_apply_fix): Adjust.
(mt_apply_fix, mt_fix_adjustable, mt_force_relocation): Rename.
(TC_FORCE_RELOCATION, tc_fix_adjustable): Adjust.
* gdb/mt-tdep.c (mt_arch_constants, mt_gdb_regnums): Rename, adjust.
(mt_register_name, mt_register_type, mt_register_reggroup_p,
mt_return_value, mt_skip_prologue, mt_breapoint_from_pc,
mt_pseudo_register_read, mt_pseudo_register_write, mt_frame_align,
mt_registers_info, mt_push_dummy_call, mt_unwind_cache,
mt_frame_unwind_cache, mt_unwind_pc, mt_unwind_dummy_id,
mt_frame_this_id, mt_frame_prev_register, mt_frame_base_address,
mt_frame_unwind, mt_frame_sniffer, mt_frame_base, mt_gdbarch_init,
_initialize_mt_tdep): Rename & adjust.
* include/dis-asm.h (print_insn_mt): Renamed.
* include/elf/common.h (EM_MT): Renamed.
* include/elf/mt.h: Rename relocs, cpu & other defines.
* ld/emulparams/elf32mt.sh (ARCH, OUTPUT_FORMAT): Adjust.
* opcodes/Makefile.am (HFILES, CFILES, ALL_MACHINES): Adjust.
(stamp-mt): Adjust rule.
(mt-asm.lo, mt-desc.lo, mt-dis.lo, mt-ibld.lo, mt-opc.lo): Rename &
adjust.
* opcodes/Makefile.in: Rebuilt.
* opcodes/configure: Rebuilt.
* opcodes/configure.in (bfd_mt_arch): Rename & adjust.
* opcodes/disassemble.c (ARCH_mt): Renamed.
(disassembler): Adjust.
* opcodes/mt-asm.c: Renamed, rebuilt.
* opcodes/mt-desc.c: Renamed, rebuilt.
* opcodes/mt-desc.h: Renamed, rebuilt.
* opcodes/mt-dis.c: Renamed, rebuilt.
* opcodes/mt-ibld.c: Renamed, rebuilt.
* opcodes/mt-opc.c: Renamed, rebuilt.
* opcodes/mt-opc.h: Renamed, rebuilt.
* sid/Makefile.in: Rebuilt.
* sid/aclocal.m4: Rebuilt.
* sid/configure: Rebuilt.
* sid/sid.spec: Adjust.
* sid/bsp/Makefile.am: Adjust.
* sid/bsp/Makefile.in: Rebuilt.
* sid/bsp/aclocal.m4: Rebuilt.
* sid/bsp/configrun-sid.in: Adjust.
* sid/bsp/pregen/Makefile.in: Rebuilt.
* sid/bsp/pregen/mt-gdb.conf: Renamed & rebuilt.
* sid/bsp/pregen/mt-gloss.conf: Renamed & rebuilt.
* sid/bsp/pregen/pregen-configs.in: Adjust.
* sid/component/aclocal.m4: Rebuilt.
* sid/component/configure: Rebuilt.
* sid/component/tconfig.in: Adjust.
* sid/component/bochs/aclocal.m4: Rebuilt.
* sid/component/cache/Makefile.in: Rebuilt.
* sid/component/cgen-cpu/Makefile.in: Rebuilt.
* sid/component/cgen-cpu/aclocal.m4: Rebuilt.
* sid/component/cgen-cpu/compCGEN.cxx: Adjust.
* sid/component/cgen-cpu/configure: Rebuilt.
* sid/component/cgen-cpu/configure.in: Rebult.
* sid/component/cgen-cpu/mt/Makefile.am: Adjust.
* sid/component/cgen-cpu/mt/Makefile.in: Rebuilt.
* sid/component/cgen-cpu/mt/hw-cpu-mt.txt: Adjust.
* sid/component/cgen-cpu/mt/mt-cpu.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-decode.cxx: Rebuilt.
* sid/component/cgen-cpu/mt/mt-decode.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-defs.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-desc.h: Rebuilt.
* sid/component/cgen-cpu/mt/mt-sem.cxx: Rebuilt.
* sid/component/cgen-cpu/mt/mt-write.cxx: Rebuilt.
* sid/component/cgen-cpu/mt/mt.cxx: Adjust.
* sid/component/cgen-cpu/mt/mt.h: Adjust.
* sid/component/consoles/Makefile.in: Rebuilt.
* sid/component/families/aclocal.m4: Rebuilt.
* sid/component/families/configure: Rebuilt.
* sid/component/gdb/Makefile.in: Rebuilt.
* sid/component/gloss/Makefile.in: Rebuilt.
* sid/component/glue/Makefile.in: Rebuilt.
* sid/component/ide/Makefile.in: Rebuilt.
* sid/component/interrupt/Makefile.in: Rebuilt.
* sid/component/lcd/Makefile.in: Rebuilt.
* sid/component/lcd/testsuite/Makefile.in: Rebuilt.
* sid/component/loader/Makefile.am: Rebuilt.
* sid/component/loader/Makefile.in: Rebuilt.
* sid/component/mapper/Makefile.in: Rebuilt.
* sid/component/mapper/testsuite/Makefile.in: Rebuilt.
* sid/component/memory/Makefile.in: Rebuilt.
* sid/component/mmu/Makefile.in: Rebuilt.
* sid/component/parport/Makefile.in: Rebuilt.
* sid/component/profiling/Makefile.in: Rebuilt.
* sid/component/rtc/Makefile.in: Rebuilt.
* sid/component/sched/Makefile.in: Rebuilt.
* sid/component/testsuite/Makefile.in: Rebuilt.
* sid/component/timers/aclocal.m4: Rebuilt.
* sid/component/timers/configure: Rebuilt.
* sid/component/uart/Makefile.in: Rebuilt.
* sid/component/uart/testsuite/Makefile.in: Rebuilt.
* sid/config/config.sub: Adjust.
* sid/config/info.tcl.in: Adjust.
* sid/config/sidtargets.m4: Adjust.
* sid/doc/Makefile.in: Rebuilt.
* sid/main/dynamic/Makefile.am: Rebuilt.
* sid/main/dynamic/Makefile.in: Rebuilt.
* sid/main/dynamic/aclocal.m4: Rebuilt.
* sid/main/dynamic/configure: Rebuilt.
2005-12-16 18:23:12 +08:00
|
|
|
|
&bfd_elf32_mt_vec,
|
2002-12-31 03:25:13 +08:00
|
|
|
|
&bfd_elf32_msp430_vec,
|
2002-07-31 08:32:10 +08:00
|
|
|
|
#ifdef BFD64
|
|
|
|
|
&bfd_elf32_nbigmips_vec,
|
|
|
|
|
&bfd_elf32_nlittlemips_vec,
|
|
|
|
|
&bfd_elf32_ntradbigmips_vec,
|
|
|
|
|
&bfd_elf32_ntradlittlemips_vec,
|
|
|
|
|
#endif
|
2001-04-26 03:09:30 +08:00
|
|
|
|
&bfd_elf32_openrisc_vec,
|
2002-02-01 01:33:08 +08:00
|
|
|
|
&bfd_elf32_or32_big_vec,
|
1999-09-05 01:07:46 +08:00
|
|
|
|
&bfd_elf32_pj_vec,
|
|
|
|
|
&bfd_elf32_pjl_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_powerpc_vec,
|
2005-05-07 Paul Brook <paul@codesourcery.com>
bfd/
* config.bfd: Add separate case for ppc-vxworks.
* configure: Regenerate.
* configure.in: Include elf-vxworks.lo on ppc targets.
* elf-vxworks.c (elf_vxworks_final_write_processing): Handle
.rela.plt.unloaded.
* elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
(PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
(VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
(ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
(ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
(ppc_elf_create_got): Create .got.plt for VxWorks.
(ppc_elf_create_dynamic_sections): Create unloaded plt relocation
section for VxWorks.
(ppc_elf_select_plt_layout): Handle VxWorks plt format.
(allocate_got): VxWorks does not need a got header.
(allocate_dynrelocs): Handle VxWorks plt format.
(ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
VxWorks. Handle VxWorks plt/got.
(ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
(ppc_elf_vxworks_special_sections): New.
(ppc_elf_vxworks_link_hash_table_create,
ppc_elf_vxworks_add_symbol_hook,
elf_i386_vxworks_link_output_symbol_hook,
ppc_elf_vxworks_final_write_processing): New functions.
* targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
(_bfd_target_vector): Use it.
gas/
* config/tc-ppc.c (ppc_target_format): Add VxWorks.
gas/testsuite/
* gas/ppc/altivec.d: Match all powerpc target vecs.
* gas/ppc/booke.d: Ditto.
* gas/ppc/e500.d: Ditto.
ld/
* Makefile.am (ALL_EMULATIONS): Add eelf32ppcvxworks.o.
(eelf32ppcvxworks.o): Add dependencies.
* Makefile.in: Regenerate.
* configure.tgt: Add entry for powerpc-vxworks.
* emulparams/elf32-ppc.c: Mention elf32ppcvxworks.sh in comment.
* emulparams/elf32ppcvxworks.sh: New file.
* emultempl/ppc32elf.em (bfd_elf32_powerpc_vxworks_vec): Declare.
(is_ppc_elf32_vec): New function.
(ppc_after_open, ppc_before_allocation,
gld${EMULATION_NAME}_after_allocation): Use it.
2005-07-05 21:25:56 +08:00
|
|
|
|
&bfd_elf32_powerpc_vxworks_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf32_powerpcle_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_s390_vec,
|
2009-03-19 00:58:33 +08:00
|
|
|
|
#ifdef BFD64
|
2006-09-17 07:51:50 +08:00
|
|
|
|
&bfd_elf32_bigscore_vec,
|
2009-03-19 00:58:33 +08:00
|
|
|
|
&bfd_elf32_littlescore_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_sh_vec,
|
|
|
|
|
&bfd_elf32_shblin_vec,
|
|
|
|
|
&bfd_elf32_shl_vec,
|
2004-07-07 00:58:43 +08:00
|
|
|
|
&bfd_elf32_shl_symbian_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_shlin_vec,
|
2002-01-08 12:23:02 +08:00
|
|
|
|
&bfd_elf32_shlnbsd_vec,
|
bfd/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
bfd_elf32_shlvxworks_vec.
* configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
(bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
(bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
(bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
(bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
(bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
(bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
(bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
* configure: Regenerate.
* Makefile.am: Regenerate dependencies.
* Makefile.in: Regenerate.
* elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
(elf_vxworks_add_symbol_hook): Use it.
(elf_vxworks_link_output_symbol_hook): Likewise. Use the hash
table entry to check for weak undefined symbols and to obtain
the original bfd.
(elf_vxworks_emit_relocs): Use target_index instead of this_idx.
* elf32-sh-relocs.h: New file, split from elf32-sh.c.
(R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
special_function field.
(R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
(R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
(R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
(R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
(R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
(R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
(SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
* elf32-sh.c: Include elf32-vxworks.h.
(MINUS_ONE): Define.
(sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
to sh_elf_reloc.
(sh_vxworks_howto_table): New variable. Include elf32-sh-relocs.h
with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
SH_ELF_RELOC set to bfd_elf_generic_reloc.
(vxworks_object_p, get_howto_table): New functions.
(sh_elf_reloc_type_lookup): Fix typo. Use get_howto_table.
(sh_elf_info_to_howto): Use get_howto_table.
(sh_elf_relax_section): Honor the partial_inplace field of the
R_SH_DIR32 howto.
(sh_elf_relax_delete_bytes): Likewise.
(elf_sh_plt_info): New structure.
(PLT_ENTRY_SIZE): Replace both definitions with...
(ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
(elf_sh_plt0_entry_le): Likewise.
(elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
(elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
(elf_sh_plts): New structure, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry): Delete both definitions.
(elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
(elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
(elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
(elf_sh_plt_reloc_offset): Likewise.
(movi_shori_putval): Delete in favor of...
(install_plt_field): ...this new function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(get_plt_info): New function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
(VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
(vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
(vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
(vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
(get_plt_index, get_plt_offset): New functions.
(elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
(sh_elf_link_hash_table_create): Initialize them.
(sh_elf_create_dynamic_sections): Call
elf_vxworks_create_dynamic_sections for VxWorks.
(allocate_dynrelocs): Use htab->plt_info to get the size of PLT
entries. Allocate relocation entries in .rela.plt.unloaded if
generating a VxWorks executable.
(sh_elf_always_size_sections): New function.
(sh_elf_size_dynamic_sections): Extend .rela.plt handling to
.rela.plt.unloaded.
(sh_elf_relocate_section): Use get_howto_table. Honor
partial_inplace when calculating the addend for dynamic
relocations. Use get_plt_index.
(sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
and htab->plt_info. Fill in the bra .plt offset for VxWorks
executables. Populate .rela.plt.unloaded. Do not make
_GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
(sh_elf_finish_dynamic_sections): Use install_plt_field and
htab->plt_info. Handle cases where there is no special PLT header.
Populate the first relocation in .rela.plt.unloaded and fix up
the remaining entries.
(sh_elf_plt_sym_val): Use get_plt_info.
(elf_backend_always_size_sections): Define.
(TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
(TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
(elf32_bed, elf_backend_want_plt_sym): Likewise.
(elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
(elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing): Likewise.
(ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
* targets.c (bfd_elf32_shlvxworks_vec): Declare.
(bfd_elf32_shvxworks_vec): Likewise.
(_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
bfd_elf32_shvxworks_vec.
gas/
* config/tc-sh.c (apply_full_field_fix): New function.
(md_apply_fix): Use it instead of md_number_to_chars. Do not fill
in fx_addnumber for BFD_RELOC_32_PLT_PCREL.
(tc_gen_reloc): Use fx_addnumber rather than 0 as the default case.
* config/tc-sh.h (TARGET_FORMAT): Override for TE_VXWORKS.
ld/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
* Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
eshlelf_vxworks.o.
(eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
* Makefile.in: Regenerate.
* configure.tgt (sh-*-vxworks): Use shelf_vxworks and
shlelf_vxworks.
* emulparams/shelf_vxworks.sh: New file.
* emulparams/shlelf_vxworks.sh: Likewise.
* emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
(OTHER_END_SYMBOLS): Likewise _ehdr.
(DATA_END_SYMBOLS): Likewise _edata.
* emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
is indeed an ELF file before dealing with --force-dynamic.
ld/testsuite/
* ld-sh/rd-sh.exp: Treat vxworks1-static.d specially.
* ld-sh/sh-vxworks.exp: New file.
* ld-sh/sh.exp: Extend sh-linux SIZEOF_HEADERS handling to
sh-*-vxworks.
* ld-sh/vxworks1-le.dd, ld-sh/vxworks1-lib-le.dd,
* ld-sh/vxworks1-lib.dd, ld-sh/vxworks1-lib.nd,
* ld-sh/vxworks1-lib.rd, ld-sh/vxworks1-lib.s,
* ld-sh/vxworks1-static.d, ld-sh/vxworks1.dd,
* ld-sh/vxworks1.ld, ld-sh/vxworks1.rd, ld-sh/vxworks1.s,
* ld-sh/vxworks2-static.sd, ld-sh/vxworks2.s,
* ld-sh/vxworks2.sd, ld-sh/vxworks3-le.dd,
* ld-sh/vxworks3-lib-le.dd, ld-sh/vxworks3-lib.dd,
* ld-sh/vxworks3-lib.s, ld-sh/vxworks3.dd, ld-sh/vxworks3.s,
* ld-sh/vxworks4.d, ld-sh/vxworks4a.s, ld-sh/vxworks4b.s,
* ld-sh/reloc1.s, ld-sh/reloc1.d: New tests.
2006-08-04 21:13:56 +08:00
|
|
|
|
&bfd_elf32_shlvxworks_vec,
|
2002-01-08 12:23:02 +08:00
|
|
|
|
&bfd_elf32_shnbsd_vec,
|
bfd/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com>
* config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
bfd_elf32_shlvxworks_vec.
* configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
(bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
(bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
(bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
(bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
(bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
(bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
(bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
* configure: Regenerate.
* Makefile.am: Regenerate dependencies.
* Makefile.in: Regenerate.
* elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
(elf_vxworks_add_symbol_hook): Use it.
(elf_vxworks_link_output_symbol_hook): Likewise. Use the hash
table entry to check for weak undefined symbols and to obtain
the original bfd.
(elf_vxworks_emit_relocs): Use target_index instead of this_idx.
* elf32-sh-relocs.h: New file, split from elf32-sh.c.
(R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
special_function field.
(R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
(R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
(R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
(R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
(R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
(R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
(SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
* elf32-sh.c: Include elf32-vxworks.h.
(MINUS_ONE): Define.
(sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
to sh_elf_reloc.
(sh_vxworks_howto_table): New variable. Include elf32-sh-relocs.h
with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
SH_ELF_RELOC set to bfd_elf_generic_reloc.
(vxworks_object_p, get_howto_table): New functions.
(sh_elf_reloc_type_lookup): Fix typo. Use get_howto_table.
(sh_elf_info_to_howto): Use get_howto_table.
(sh_elf_relax_section): Honor the partial_inplace field of the
R_SH_DIR32 howto.
(sh_elf_relax_delete_bytes): Likewise.
(elf_sh_plt_info): New structure.
(PLT_ENTRY_SIZE): Replace both definitions with...
(ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
(elf_sh_plt0_entry_le): Likewise.
(elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
(elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
(elf_sh_plts): New structure, with separate definitions for
INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_entry): Delete both definitions.
(elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
(elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
(elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
(elf_sh_plt_reloc_offset): Likewise.
(movi_shori_putval): Delete in favor of...
(install_plt_field): ...this new function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(get_plt_info): New function, with separate definitions
for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
(elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
(VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
(vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
(vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
(vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
(get_plt_index, get_plt_offset): New functions.
(elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
(sh_elf_link_hash_table_create): Initialize them.
(sh_elf_create_dynamic_sections): Call
elf_vxworks_create_dynamic_sections for VxWorks.
(allocate_dynrelocs): Use htab->plt_info to get the size of PLT
entries. Allocate relocation entries in .rela.plt.unloaded if
generating a VxWorks executable.
(sh_elf_always_size_sections): New function.
(sh_elf_size_dynamic_sections): Extend .rela.plt handling to
.rela.plt.unloaded.
(sh_elf_relocate_section): Use get_howto_table. Honor
partial_inplace when calculating the addend for dynamic
relocations. Use get_plt_index.
(sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
and htab->plt_info. Fill in the bra .plt offset for VxWorks
executables. Populate .rela.plt.unloaded. Do not make
_GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
(sh_elf_finish_dynamic_sections): Use install_plt_field and
htab->plt_info. Handle cases where there is no special PLT header.
Populate the first relocation in .rela.plt.unloaded and fix up
the remaining entries.
(sh_elf_plt_sym_val): Use get_plt_info.
(elf_backend_always_size_sections): Define.
(TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
(TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
(elf32_bed, elf_backend_want_plt_sym): Likewise.
(elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
(elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
(elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing): Likewise.
(ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
* targets.c (bfd_elf32_shlvxworks_vec): Declare.
(bfd_elf32_shvxworks_vec): Likewise.
(_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
bfd_elf32_shvxworks_vec.
gas/
* config/tc-sh.c (apply_full_field_fix): New function.
(md_apply_fix): Use it instead of md_number_to_chars. Do not fill
in fx_addnumber for BFD_RELOC_32_PLT_PCREL.
(tc_gen_reloc): Use fx_addnumber rather than 0 as the default case.
* config/tc-sh.h (TARGET_FORMAT): Override for TE_VXWORKS.
ld/
2006-08-02 Richard Sandiford <richard@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
* Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
eshlelf_vxworks.o.
(eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
* Makefile.in: Regenerate.
* configure.tgt (sh-*-vxworks): Use shelf_vxworks and
shlelf_vxworks.
* emulparams/shelf_vxworks.sh: New file.
* emulparams/shlelf_vxworks.sh: Likewise.
* emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
(OTHER_END_SYMBOLS): Likewise _ehdr.
(DATA_END_SYMBOLS): Likewise _edata.
* emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
is indeed an ELF file before dealing with --force-dynamic.
ld/testsuite/
* ld-sh/rd-sh.exp: Treat vxworks1-static.d specially.
* ld-sh/sh-vxworks.exp: New file.
* ld-sh/sh.exp: Extend sh-linux SIZEOF_HEADERS handling to
sh-*-vxworks.
* ld-sh/vxworks1-le.dd, ld-sh/vxworks1-lib-le.dd,
* ld-sh/vxworks1-lib.dd, ld-sh/vxworks1-lib.nd,
* ld-sh/vxworks1-lib.rd, ld-sh/vxworks1-lib.s,
* ld-sh/vxworks1-static.d, ld-sh/vxworks1.dd,
* ld-sh/vxworks1.ld, ld-sh/vxworks1.rd, ld-sh/vxworks1.s,
* ld-sh/vxworks2-static.sd, ld-sh/vxworks2.s,
* ld-sh/vxworks2.sd, ld-sh/vxworks3-le.dd,
* ld-sh/vxworks3-lib-le.dd, ld-sh/vxworks3-lib.dd,
* ld-sh/vxworks3-lib.s, ld-sh/vxworks3.dd, ld-sh/vxworks3.s,
* ld-sh/vxworks4.d, ld-sh/vxworks4a.s, ld-sh/vxworks4b.s,
* ld-sh/reloc1.s, ld-sh/reloc1.d: New tests.
2006-08-04 21:13:56 +08:00
|
|
|
|
&bfd_elf32_shvxworks_vec,
|
2002-06-17 10:27:38 +08:00
|
|
|
|
#ifdef BFD64
|
|
|
|
|
&bfd_elf32_sh64_vec,
|
|
|
|
|
&bfd_elf32_sh64l_vec,
|
|
|
|
|
&bfd_elf32_sh64lnbsd_vec,
|
|
|
|
|
&bfd_elf32_sh64nbsd_vec,
|
2002-11-05 09:18:56 +08:00
|
|
|
|
&bfd_elf32_sh64lin_vec,
|
|
|
|
|
&bfd_elf32_sh64blin_vec,
|
2002-06-17 10:27:38 +08:00
|
|
|
|
#endif
|
2001-04-26 03:09:30 +08:00
|
|
|
|
&bfd_elf32_sparc_vec,
|
bfd/
* config.bfd (sparc-*-vxworks*): New stanza.
* configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
(bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
* configure: Regenerate.
* elf32-sparc.c: Include elf-vxworks.h.
(elf32_sparc_vxworks_link_hash_table_create: New.
(elf32_sparc_vxworks_final_write_processing): New.
(TARGET_BIG_SYM): Override for VxWorks.
(TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
(bfd_elf32_bfd_link_hash_table_create): Likewise.
(elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
(elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
(elf_backend_link_output_symbol_hook): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_final_write_processing, elf32_bed): Likewise.
* elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
(sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
(sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
(_bfd_sparc_elf_link_hash_table_create): Don't initialize
build_plt_entry here.
(create_got_section): Initialize sgotplt for VxWorks.
(_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
plt_header_size and plt_entry_size, with new VxWorks-specific settings.
Call elf_vxworks_create_dynamic_sections for VxWorks.
(allocate_dynrelocs): Use plt_header_size and plt_entry_size.
Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
(_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
for VxWorks. Check for the .got.plt section.
(sparc_vxworks_build_plt_entry): New function.
(_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
absolute on VxWorks.
(sparc32_finish_dyn): Add special handling for DT_RELASZ
and DT_PLTGOT on VxWorks.
(sparc_vxworks_finish_exec_plt): New.
(sparc_vxworks_finish_shared_plt): New.
(_bfd_sparc_elf_finish_dynamic_sections): Call them.
Use plt_header_size and plt_entry_size.
* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
* Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
(elf32-sparc.lo): Likewise.
* Makefile.in: Regenerate.
* targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
(_bfd_target_vector): Add a pointer to it.
gas/
* config/tc-sparc.c (sparc_target_format): Handle TE_VXWORKS.
(GOTT_BASE, GOTT_INDEX): New.
(tc_gen_reloc): Don't alter relocations against GOTT_BASE and
GOTT_INDEX when generating VxWorks PIC.
* configure.tgt (sparc*-*-vxworks*): Remove this special case;
use the generic *-*-vxworks* stanza instead.
gas/testsuite/
* gas/sparc/vxworks-pic.s, gas/sparc/vxworks-pic.d: New test.
* gas/sparc/sparc.exp: Run it. Remove sparc*-*-vxworks* XFAILs.
ld/
* configure.tgt (sparc*-*-vxworks*): New stanza.
* emulparams/elf32_sparc_vxworks.sh: New file.
* Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
(eelf32_sparc_vxworks.c): New rule.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-sparc/vxworks1.dd, ld-sparc/vxworks1.ld, ld-sparc/vxworks1-lib.dd,
* ld-sparc/vxworks1-lib.nd, ld-sparc/vxworks1-lib.rd,
* ld-sparc/vxworks1-lib.s, ld-sparc/vxworks1.rd, ld-sparc/vxworks1.s,
* ld-sparc/vxworks1-static.d, ld-sparc/vxworks2.s,
* ld-sparc/vxworks2.sd, ld-sparc/vxworks2-static.sd: New tests.
* ld-sparc/sparc.exp: Run them.
2006-04-05 20:41:59 +08:00
|
|
|
|
&bfd_elf32_sparc_vxworks_vec,
|
2006-10-25 14:49:21 +08:00
|
|
|
|
&bfd_elf32_spu_vec,
|
2000-07-02 09:17:52 +08:00
|
|
|
|
&bfd_elf32_tradbigmips_vec,
|
|
|
|
|
&bfd_elf32_tradlittlemips_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf32_us_cris_vec,
|
|
|
|
|
&bfd_elf32_v850_vec,
|
2002-05-30 10:14:13 +08:00
|
|
|
|
&bfd_elf32_vax_vec,
|
2006-02-17 22:36:28 +08:00
|
|
|
|
&bfd_elf32_xc16x_vec,
|
2001-12-08 11:46:03 +08:00
|
|
|
|
&bfd_elf32_xstormy16_vec,
|
2003-04-01 23:50:31 +08:00
|
|
|
|
&bfd_elf32_xtensa_be_vec,
|
|
|
|
|
&bfd_elf32_xtensa_le_vec,
|
2001-04-08 13:11:49 +08:00
|
|
|
|
#ifdef BFD64
|
2002-09-17 10:24:40 +08:00
|
|
|
|
&bfd_elf64_alpha_freebsd_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf64_alpha_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf64_big_generic_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf64_bigmips_vec,
|
|
|
|
|
&bfd_elf64_hppa_linux_vec,
|
|
|
|
|
&bfd_elf64_hppa_vec,
|
|
|
|
|
&bfd_elf64_ia64_big_vec,
|
2002-01-23 20:21:07 +08:00
|
|
|
|
&bfd_elf64_ia64_hpux_big_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf64_ia64_little_vec,
|
* include/elf/ia64.h (SHT_IA_64_VMS_DISPLAY_NAME_INFO,
EF_IA_64_ARCHVER_1): New macros. Minor reformatting.
* bfd/Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
(BFD32_BACKENDS_CFILES): Add new file vmsutil.c
(vmsutil.lo): Add dependency rule
* bfd/Makefile.in: Regenerate
* bfd/config.bfd (ia64*-*-*vms*): Add case.
* bfd/configure.in (bfd_elf64_ia64_vms_vec): Add case.
* bfd/configure: Regenerate
* bfd/vmsutil.[ch]: New files
* bfd/elf-bfd.h (struct bfd_elf_special_section): Change type of
attr to bfd_vma.
* bfd/elfxx-ia64.c (elfNN_vms_post_process_headers,
elfNN_vms_section_processing, elfNN_vms_final_write_processing,
elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
elfNN_vms_object_p): New functions
* bfd/targets.c (bfd_elf64_ia64_vms_vec): New target.
* gas/configure.tgt(ia64-*-*vms*): New target.
* gas/dwarf2dbg.h (dwarf2_loc_mark_labels): Make extern.
* gas/tc.h (md_number_to_chars): Declare iff undefined.
* gas/config/obj-elf.c (obj_elf_change_section): Change type of
arg attr to bfd_vma.
(obj_elf_parse_section_letters): Return a bfd_vma. Change type of
variables attr, md_attr to bfd_vma.
(obj_elf_section_word): Likewise.
(obj_elf_section): Change type of variable attr to bfd_vma
* gas/config/obj-elf.h (obj_elf_change_section): Change type of
arg attr to bfd_vma
* gas/config/tc-ia64.c (bfdver.h,time.h): Include.
(ia64_elf_section_letter): Now returns a bfd_vma.
Handle VMS specific attributes.
(ia64_elf_section_flags): Arg attr now a bfd_vma.
(ia64_init): Don't turn on dependency checking for VMS.
(ia64_target_format): Check for VMS flag bit.
(do_alias): Hande decc$ functions.
(get_vms_time): New function.
(ia64_vms_note): New function.
* gas/config/tc-ia64.h (ia64_elf_section_letter): Now returns a bfd_vma.
(ia64_elf_section_flags): Arg attr now a bfd_vma.
(tc_init_after_args): Define for VMS.
* gas/config/tc-alpha.c (alpha_elf_section_letter): Return a bfd_vma.
(alpha_elf_section_flags): Change type of arg attr to bfd_vma.
* gas/config/tc-alpha.h: Likewise.
* gas/config/tc-i386.c (x86_64_section_letter): Return a bfd_vma.
(x86_64_section_word): Return a bfd_vma.
* gas/config/tc-i386.h: Likewise.
* gas/config/tc-ip2k.c (ip2k_elf_section_flags): Change type of arg
attr to bfd_vma.
* gas/config/tc-ip2k.h: Likewise.
* gas/config/tc-mep.c (mep_elf_section_letter): Return a bfd_vma.
(mep_elf_section_flags): Change type of arg attr to bfd_vma.
* gas/config/tc-mep.h: Likewise.
* gas/config/tc-ppc.c (ppc_section_letter): Return a bfd_vma.
(ppc_section_word): Return a bfd_vma.
(ppc_section_flags): Change type of arg attr to bfd_vma.
* gas/config/tc-ppc.h: Likewise.
* gas/config/te-vms.h (DWARF2_DIR_SHOULD_END_WITH_SEPARATOR,
DWAR2_FILE_TIME_NAME, DWARF2_FILE_SIZE_NAME, DWARF2_FILEN_NAME):
New file with new macros
* gas/dwarf2dbg.c (get_filenum, out_file_list): Default and call new
macros.
2009-01-15 20:42:52 +08:00
|
|
|
|
&bfd_elf64_ia64_vms_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf64_little_generic_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf64_littlemips_vec,
|
2001-10-30 23:20:14 +08:00
|
|
|
|
&bfd_elf64_mmix_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf64_powerpc_vec,
|
|
|
|
|
&bfd_elf64_powerpcle_vec,
|
|
|
|
|
&bfd_elf64_s390_vec,
|
2002-06-17 10:27:38 +08:00
|
|
|
|
&bfd_elf64_sh64_vec,
|
|
|
|
|
&bfd_elf64_sh64l_vec,
|
|
|
|
|
&bfd_elf64_sh64lnbsd_vec,
|
|
|
|
|
&bfd_elf64_sh64nbsd_vec,
|
2002-11-05 09:18:56 +08:00
|
|
|
|
&bfd_elf64_sh64lin_vec,
|
|
|
|
|
&bfd_elf64_sh64blin_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&bfd_elf64_sparc_vec,
|
2006-10-19 07:58:52 +08:00
|
|
|
|
&bfd_elf64_sparc_freebsd_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf64_tradbigmips_vec,
|
|
|
|
|
&bfd_elf64_tradlittlemips_vec,
|
2006-08-03 00:25:14 +08:00
|
|
|
|
&bfd_elf64_x86_64_freebsd_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&bfd_elf64_x86_64_vec,
|
2006-02-17 22:36:28 +08:00
|
|
|
|
&bfd_mmo_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#endif
|
|
|
|
|
&bfd_powerpc_pe_vec,
|
|
|
|
|
&bfd_powerpc_pei_vec,
|
|
|
|
|
&bfd_powerpcle_pe_vec,
|
|
|
|
|
&bfd_powerpcle_pei_vec,
|
|
|
|
|
&cris_aout_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#ifdef BFD64
|
2003-02-14 19:16:09 +08:00
|
|
|
|
&demo_64_vec, /* Only compiled if host has long-long support. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#endif
|
|
|
|
|
&ecoff_big_vec,
|
|
|
|
|
&ecoff_biglittle_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&ecoff_little_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#ifdef BFD64
|
|
|
|
|
&ecoffalpha_little_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&go32coff_vec,
|
|
|
|
|
&go32stubbedcoff_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&h8300coff_vec,
|
|
|
|
|
&h8500coff_vec,
|
|
|
|
|
#if 0
|
|
|
|
|
/* Since a.out files lack decent magic numbers, no way to recognize
|
|
|
|
|
which kind of a.out file it is. */
|
|
|
|
|
&host_aout_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
/* Clashes with sunos_big_vec magic no. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&hp300bsd_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&hp300hpux_vec,
|
|
|
|
|
&i386aout_vec,
|
|
|
|
|
&i386bsd_vec,
|
|
|
|
|
&i386coff_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#if 0
|
|
|
|
|
&i386dynix_vec,
|
|
|
|
|
#endif
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&i386freebsd_vec,
|
|
|
|
|
#if 0
|
|
|
|
|
/* Since a.out files lack decent magic numbers, no way to recognize
|
|
|
|
|
which kind of a.out file it is. */
|
|
|
|
|
&i386linux_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&i386lynx_aout_vec,
|
|
|
|
|
&i386lynx_coff_vec,
|
|
|
|
|
#if 0
|
|
|
|
|
/* No distinguishing features for Mach 3 executables. */
|
|
|
|
|
&i386mach3_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&i386msdos_vec,
|
|
|
|
|
&i386netbsd_vec,
|
|
|
|
|
&i386os9k_vec,
|
|
|
|
|
&i386pe_vec,
|
|
|
|
|
&i386pei_vec,
|
2006-09-20 19:35:11 +08:00
|
|
|
|
#ifdef BFD64
|
|
|
|
|
&x86_64coff_vec,
|
|
|
|
|
&x86_64pe_vec,
|
|
|
|
|
&x86_64pei_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&i860coff_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&icoff_big_vec,
|
|
|
|
|
&icoff_little_vec,
|
|
|
|
|
&ieee_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#if 0
|
|
|
|
|
&m68k4knetbsd_vec,
|
|
|
|
|
&m68kaux_coff_vec,
|
|
|
|
|
#endif
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&m68kcoff_vec,
|
|
|
|
|
&m68kcoffun_vec,
|
|
|
|
|
#if 0
|
|
|
|
|
/* Since a.out files lack decent magic numbers, no way to recognize
|
|
|
|
|
which kind of a.out file it is. */
|
|
|
|
|
&m68klinux_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&m68knetbsd_vec,
|
|
|
|
|
&m68ksysvcoff_vec,
|
|
|
|
|
&m88kbcs_vec,
|
|
|
|
|
&m88kmach3_vec,
|
2004-05-24 22:48:18 +08:00
|
|
|
|
&m88kopenbsd_vec,
|
2002-11-06 21:26:29 +08:00
|
|
|
|
&mach_o_be_vec,
|
|
|
|
|
&mach_o_le_vec,
|
|
|
|
|
&mach_o_fat_vec,
|
2004-11-08 21:17:43 +08:00
|
|
|
|
&maxqcoff_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&mcore_pe_big_vec,
|
|
|
|
|
&mcore_pe_little_vec,
|
|
|
|
|
&mcore_pei_big_vec,
|
|
|
|
|
&mcore_pei_little_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&mipslpe_vec,
|
|
|
|
|
&mipslpei_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&newsos3_vec,
|
|
|
|
|
#ifdef BFD64
|
|
|
|
|
&nlm32_alpha_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&nlm32_i386_vec,
|
|
|
|
|
&nlm32_powerpc_vec,
|
|
|
|
|
&nlm32_sparc_vec,
|
1999-05-03 15:29:11 +08: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,
|
|
|
|
|
#endif
|
2002-02-01 01:33:08 +08:00
|
|
|
|
/* Entry for the OpenRISC family. */
|
|
|
|
|
&or32coff_big_vec,
|
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&pc532machaout_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&pc532netbsd_vec,
|
2001-02-19 07:33:11 +08:00
|
|
|
|
&pdp11_aout_vec,
|
2002-11-06 21:26:29 +08:00
|
|
|
|
&pef_vec,
|
|
|
|
|
&pef_xlib_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#if 0
|
2000-12-21 03:53:11 +08:00
|
|
|
|
/* This has the same magic number as RS/6000. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&pmac_xcoff_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&ppcboot_vec,
|
|
|
|
|
#if 0
|
2003-02-14 19:16:09 +08:00
|
|
|
|
/* We have no way of distinguishing these from other a.out variants. */
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&riscix_vec,
|
|
|
|
|
#endif
|
2000-05-12 14:07:04 +08:00
|
|
|
|
#ifdef BFD64
|
Add XCOFF64 support.
bfd:
* Makefile.am (coff64-rs6000.lo): New rule.
* Makefile.in: Regenerate.
* coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
xcoff_is_local_label_name, xcoff_rtype2howto,
xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
(NO_COFF_SYMBOLS): Define.
(xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
internally.
(MINUS_ONE): New macro.
(xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
relocation.
(coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
coff_SWAP_aux_out): Map to the new functions.
* coff64-rs6000.c: New file.
* libcoff.h (bfd_coff_backend_data): Add new fields
_bfd_coff_force_symnames_in_strings and
_bfd_coff_debug_string_prefix_length.
(bfd_coff_force_symnames_in_strings,
bfd_coff_debug_string_prefix_length): New macros for above fields.
* coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
of using coff_swap_sym_in directly.
(FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
(coff_set_flags) Set magic for XCOFF64.
(coff_compute_section_file_positions): Add symbol name length to
string section length if bfd_coff_debug_string_prefix_length is
true.
(coff_write_object_contents): Don't do reloc overflow for XCOFF64.
(coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
using coff_swap_lineno_in directly.
(bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
and _bfd_coff_debug_string_prefix_length fields.
* coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
symbol names into strings table when
bfd_coff_force_symnames_in_strings is true.
* coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
SET_RELOC_VADDR): New macros.
(coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
(coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
code.
(coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
changes within RS6000COFF_C specific code.
(coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
* reloc.c (bfd_perform_relocation, bfd_install_relocation):
Extend existing hack on target name.
* xcofflink.c (XCOFF_XVECP): Extend existing hack on
target name.
* coff-tic54x.c (ticof): Keep up to date with new fields
in bfd_coff_backend_data.
* config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
targ_selvecs to include rs6000coff64_vec for rs6000.
* configure.in: Add rs6000coff64_vec case.
* cpu-powerpc.c: New bfd_arch_info_type.
gas:
* as.c (parse_args): Allow md_parse_option to override -a listing
option.
* config/obj-coff.c (add_lineno): Change type of offset parameter
from "int" to "bfd_vma."
* config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine."
(ppc_mach, ppc_subseg_align, ppc_target_format): New.
(ppc_change_csect): Align correctly for XCOFF64.
(ppc_machine): New function, which discards "ppc_machine" line.
(ppc_tc): Cons for 8 when code is 64 bit.
(md_apply_fix3): Don't check operand->insert. Handle 64 bit
relocations.
(md_parse_option): Handle -a64 and -a32.
(ppc_xcoff64): New.
* config/tc-ppc.h (TARGET_MACH): Define.
(TARGET_FORMAT): Move to function.
(SUB_SEGMENT_ALIGN): Use ppc_subseg_align.
include:
* include/coff/rs6k64.h: New file.
opcodes:
* configure.in: Add bfd_powerpc_64_arch.
* disassemble.c (disassembler): Use print_insn_big_powerpc for
64 bit code.
2000-04-26 23:09:44 +08:00
|
|
|
|
&rs6000coff64_vec,
|
2000-05-12 14:07:04 +08:00
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&rs6000coff_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&shcoff_small_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&shcoff_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&shlcoff_small_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&shlcoff_vec,
|
|
|
|
|
&shlpe_vec,
|
|
|
|
|
&shlpei_vec,
|
|
|
|
|
#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF)
|
|
|
|
|
&som_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&sparccoff_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&sparcle_aout_vec,
|
|
|
|
|
&sparclinux_vec,
|
|
|
|
|
&sparclynx_aout_vec,
|
|
|
|
|
&sparclynx_coff_vec,
|
|
|
|
|
&sparcnetbsd_vec,
|
|
|
|
|
&sunos_big_vec,
|
2002-11-06 21:26:29 +08:00
|
|
|
|
&sym_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&tic30_aout_vec,
|
|
|
|
|
&tic30_coff_vec,
|
2000-04-08 01:06:58 +08:00
|
|
|
|
&tic54x_coff0_beh_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&tic54x_coff0_vec,
|
2000-04-08 01:06:58 +08:00
|
|
|
|
&tic54x_coff1_beh_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&tic54x_coff1_vec,
|
2000-04-08 01:06:58 +08:00
|
|
|
|
&tic54x_coff2_beh_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&tic54x_coff2_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&tic80coff_vec,
|
2002-07-01 16:31:53 +08:00
|
|
|
|
&vaxbsd_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&vaxnetbsd_vec,
|
2002-06-09 07:23:08 +08:00
|
|
|
|
&vax1knetbsd_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&versados_vec,
|
|
|
|
|
#ifdef BFD64
|
|
|
|
|
&vms_alpha_vec,
|
|
|
|
|
#endif
|
|
|
|
|
&vms_vax_vec,
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
&w65_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&we32kcoff_vec,
|
2005-10-26 01:40:19 +08:00
|
|
|
|
&z80coff_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&z8kcoff_vec,
|
2003-07-10 12:44:37 +08:00
|
|
|
|
&bfd_elf32_am33lin_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#endif /* not SELECT_VECS */
|
|
|
|
|
|
|
|
|
|
/* Always support S-records, for convenience. */
|
|
|
|
|
&srec_vec,
|
|
|
|
|
&symbolsrec_vec,
|
|
|
|
|
/* And tekhex */
|
|
|
|
|
&tekhex_vec,
|
|
|
|
|
/* Likewise for binary output. */
|
|
|
|
|
&binary_vec,
|
|
|
|
|
/* Likewise for ihex. */
|
|
|
|
|
&ihex_vec,
|
|
|
|
|
|
|
|
|
|
/* Add any required traditional-core-file-handler. */
|
|
|
|
|
|
|
|
|
|
#ifdef AIX386_CORE
|
|
|
|
|
&aix386_core_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#if 0
|
|
|
|
|
/* 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. */
|
|
|
|
|
&cisco_core_big_vec,
|
|
|
|
|
&cisco_core_little_vec,
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#endif
|
|
|
|
|
#ifdef HPPABSD_CORE
|
|
|
|
|
&hppabsd_core_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#ifdef HPUX_CORE
|
|
|
|
|
&hpux_core_vec,
|
|
|
|
|
#endif
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#ifdef IRIX_CORE
|
|
|
|
|
&irix_core_vec,
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef NETBSD_CORE
|
|
|
|
|
&netbsd_core_vec,
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef OSF_CORE
|
|
|
|
|
&osf_core_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#ifdef PTRACE_CORE
|
|
|
|
|
&ptrace_core_vec,
|
|
|
|
|
#endif
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#ifdef SCO5_CORE
|
|
|
|
|
&sco5_core_vec,
|
|
|
|
|
#endif
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
#ifdef TRAD_CORE
|
1999-05-03 15:29:11 +08:00
|
|
|
|
&trad_core_vec,
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
NULL /* end of list marker */
|
|
|
|
|
};
|
2001-02-08 07:16:22 +08:00
|
|
|
|
const bfd_target * const *bfd_target_vector = _bfd_target_vector;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
/* bfd_default_vector[0] contains either the address of the default vector,
|
|
|
|
|
if there is one, or zero if there isn't. */
|
|
|
|
|
|
|
|
|
|
const bfd_target *bfd_default_vector[] = {
|
|
|
|
|
#ifdef DEFAULT_VECTOR
|
|
|
|
|
&DEFAULT_VECTOR,
|
|
|
|
|
#endif
|
|
|
|
|
NULL
|
|
|
|
|
};
|
|
|
|
|
|
2002-11-05 09:18:56 +08:00
|
|
|
|
/* bfd_associated_vector[] contains the associated target vectors used
|
|
|
|
|
to reduce the ambiguity in bfd_check_format_matches. */
|
|
|
|
|
|
|
|
|
|
static const bfd_target *_bfd_associated_vector[] = {
|
|
|
|
|
#ifdef ASSOCIATED_VECS
|
|
|
|
|
ASSOCIATED_VECS,
|
|
|
|
|
#endif
|
|
|
|
|
NULL
|
|
|
|
|
};
|
|
|
|
|
const bfd_target * const *bfd_associated_vector = _bfd_associated_vector;
|
|
|
|
|
|
1999-05-03 15:29:11 +08: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. */
|
2001-05-04 01:49:49 +08:00
|
|
|
|
const size_t _bfd_target_vector_entries = sizeof (_bfd_target_vector)/sizeof (*_bfd_target_vector);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
/* This array maps configuration triplets onto BFD vectors. */
|
|
|
|
|
|
|
|
|
|
struct targmatch
|
|
|
|
|
{
|
|
|
|
|
/* The configuration triplet. */
|
|
|
|
|
const char *triplet;
|
|
|
|
|
/* The BFD vector. If this is NULL, then the vector is found by
|
|
|
|
|
searching forward for the next structure with a non NULL vector
|
|
|
|
|
field. */
|
|
|
|
|
const bfd_target *vector;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* targmatch.h is built by Makefile out of config.bfd. */
|
|
|
|
|
static const struct targmatch bfd_target_match[] = {
|
|
|
|
|
#include "targmatch.h"
|
|
|
|
|
{ NULL, NULL }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* Find a target vector, given a name or configuration triplet. */
|
|
|
|
|
|
|
|
|
|
static const bfd_target *
|
2003-06-29 18:06:40 +08:00
|
|
|
|
find_target (const char *name)
|
1999-05-03 15:29:11 +08:00
|
|
|
|
{
|
|
|
|
|
const bfd_target * const *target;
|
|
|
|
|
const struct targmatch *match;
|
|
|
|
|
|
|
|
|
|
for (target = &bfd_target_vector[0]; *target != NULL; target++)
|
|
|
|
|
if (strcmp (name, (*target)->name) == 0)
|
|
|
|
|
return *target;
|
|
|
|
|
|
|
|
|
|
/* If we couldn't match on the exact name, try matching on the
|
|
|
|
|
configuration triplet. FIXME: We should run the triplet through
|
|
|
|
|
config.sub first, but that is hard. */
|
|
|
|
|
for (match = &bfd_target_match[0]; match->triplet != NULL; match++)
|
|
|
|
|
{
|
|
|
|
|
if (fnmatch (match->triplet, name, 0) == 0)
|
|
|
|
|
{
|
|
|
|
|
while (match->vector == NULL)
|
|
|
|
|
++match;
|
|
|
|
|
return match->vector;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bfd_set_error (bfd_error_invalid_target);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
FUNCTION
|
|
|
|
|
bfd_set_default_target
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
2002-11-30 16:39:46 +08:00
|
|
|
|
bfd_boolean bfd_set_default_target (const char *name);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
Set the default target vector to use when recognizing a BFD.
|
|
|
|
|
This takes the name of the target, which may be a BFD target
|
|
|
|
|
name or a configuration triplet.
|
|
|
|
|
*/
|
|
|
|
|
|
2002-11-30 16:39:46 +08:00
|
|
|
|
bfd_boolean
|
2003-06-29 18:06:40 +08:00
|
|
|
|
bfd_set_default_target (const char *name)
|
1999-05-03 15:29:11 +08:00
|
|
|
|
{
|
|
|
|
|
const bfd_target *target;
|
|
|
|
|
|
|
|
|
|
if (bfd_default_vector[0] != NULL
|
|
|
|
|
&& strcmp (name, bfd_default_vector[0]->name) == 0)
|
2002-11-30 16:39:46 +08:00
|
|
|
|
return TRUE;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
target = find_target (name);
|
|
|
|
|
if (target == NULL)
|
2002-11-30 16:39:46 +08:00
|
|
|
|
return FALSE;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
bfd_default_vector[0] = target;
|
2002-11-30 16:39:46 +08:00
|
|
|
|
return TRUE;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
FUNCTION
|
|
|
|
|
bfd_find_target
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
2003-02-14 19:16:09 +08:00
|
|
|
|
const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
Return a pointer to the transfer vector for the object target
|
2006-05-31 00:45:32 +08: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 defined, then choose the first entry in the
|
|
|
|
|
target list. 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 if @var{abfd} isn't <<NULL>>. This causes
|
|
|
|
|
<<bfd_check_format>> to loop over all the targets to find the
|
|
|
|
|
one that matches the file being read.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const bfd_target *
|
2003-06-29 18:06:40 +08:00
|
|
|
|
bfd_find_target (const char *target_name, bfd *abfd)
|
1999-05-03 15:29:11 +08:00
|
|
|
|
{
|
|
|
|
|
const char *targname;
|
|
|
|
|
const bfd_target *target;
|
|
|
|
|
|
|
|
|
|
if (target_name != NULL)
|
|
|
|
|
targname = target_name;
|
|
|
|
|
else
|
|
|
|
|
targname = getenv ("GNUTARGET");
|
|
|
|
|
|
2002-12-23 18:45:03 +08:00
|
|
|
|
/* This is safe; the vector cannot be null. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
if (targname == NULL || strcmp (targname, "default") == 0)
|
|
|
|
|
{
|
|
|
|
|
if (bfd_default_vector[0] != NULL)
|
2006-05-31 00:45:32 +08:00
|
|
|
|
target = bfd_default_vector[0];
|
1999-05-03 15:29:11 +08:00
|
|
|
|
else
|
2006-05-31 00:45:32 +08:00
|
|
|
|
target = bfd_target_vector[0];
|
|
|
|
|
if (abfd)
|
|
|
|
|
{
|
|
|
|
|
abfd->xvec = target;
|
|
|
|
|
abfd->target_defaulted = TRUE;
|
|
|
|
|
}
|
|
|
|
|
return target;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2006-05-31 00:45:32 +08:00
|
|
|
|
if (abfd)
|
|
|
|
|
abfd->target_defaulted = FALSE;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
target = find_target (targname);
|
|
|
|
|
if (target == NULL)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
2006-05-31 00:45:32 +08:00
|
|
|
|
if (abfd)
|
|
|
|
|
abfd->xvec = target;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
return target;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
FUNCTION
|
|
|
|
|
bfd_target_list
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
2003-02-14 19:16:09 +08:00
|
|
|
|
const char ** bfd_target_list (void);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
Return a freshly malloced NULL-terminated
|
|
|
|
|
vector of the names of all the valid BFD targets. Do not
|
|
|
|
|
modify the names.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const char **
|
2003-06-29 18:06:40 +08:00
|
|
|
|
bfd_target_list (void)
|
1999-05-03 15:29:11 +08:00
|
|
|
|
{
|
2003-06-29 18:06:40 +08:00
|
|
|
|
int vec_length = 0;
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
bfd_size_type amt;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
#if defined (HOST_HPPAHPUX) && ! defined (__STDC__)
|
|
|
|
|
/* 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
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
const bfd_target * const *target;
|
|
|
|
|
const char **name_list, **name_ptr;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
for (target = &bfd_target_vector[0]; *target != NULL; target++)
|
|
|
|
|
vec_length++;
|
|
|
|
|
|
Touches most files in bfd/, so likely will be blamed for everything..
o bfd_read and bfd_write lose an unnecessary param and become
bfd_bread and bfd_bwrite.
o bfd_*alloc now all take a bfd_size_type arg, and will error if
size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files
or bugs in linker scripts etc.
o file_ptr becomes a bfd_signed_vma. Besides matching sizes with
various other types involved in handling sections, this should make
it easier for bfd to support a 64 bit off_t on 32 bit hosts that
provide it.
o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
generally available. They now cast their args to bfd_vma and
bfd_byte * as appropriate, which removes a swag of casts from the
source.
o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
aout-encap.c.
o Zillions of formatting and -Wconversion fixes.
2001-09-18 17:57:26 +08:00
|
|
|
|
amt = (vec_length + 1) * sizeof (char **);
|
2003-06-29 18:06:40 +08:00
|
|
|
|
name_ptr = name_list = bfd_malloc (amt);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
|
|
if (name_list == NULL)
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
|
|
for (target = &bfd_target_vector[0]; *target != NULL; target++)
|
2002-10-21 18:58:42 +08:00
|
|
|
|
if (target == &bfd_target_vector[0]
|
|
|
|
|
|| *target != bfd_target_vector[0])
|
|
|
|
|
*name_ptr++ = (*target)->name;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
2002-10-21 18:58:42 +08:00
|
|
|
|
*name_ptr = NULL;
|
1999-05-03 15:29:11 +08:00
|
|
|
|
return name_list;
|
|
|
|
|
}
|
1999-07-19 22:55:16 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
FUNCTION
|
|
|
|
|
bfd_seach_for_target
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
2003-06-29 18:06:40 +08:00
|
|
|
|
const bfd_target *bfd_search_for_target
|
|
|
|
|
(int (*search_func) (const bfd_target *, void *),
|
|
|
|
|
void *);
|
1999-07-19 22:55:16 +08:00
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
Return a pointer to the first transfer vector in the list of
|
|
|
|
|
transfer vectors maintained by BFD that produces a non-zero
|
|
|
|
|
result when passed to the function @var{search_func}. The
|
|
|
|
|
parameter @var{data} is passed, unexamined, to the search
|
|
|
|
|
function.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const bfd_target *
|
2003-06-29 18:06:40 +08:00
|
|
|
|
bfd_search_for_target (int (*search_func) (const bfd_target *, void *),
|
|
|
|
|
void *data)
|
1999-07-19 22:55:16 +08:00
|
|
|
|
{
|
2003-06-29 18:06:40 +08:00
|
|
|
|
const bfd_target * const *target;
|
1999-07-19 22:55:16 +08:00
|
|
|
|
|
2003-06-29 18:06:40 +08:00
|
|
|
|
for (target = bfd_target_vector; *target != NULL; target ++)
|
|
|
|
|
if (search_func (*target, data))
|
|
|
|
|
return *target;
|
1999-07-19 22:55:16 +08:00
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|