1993-02-27 15:05:09 +08:00
|
|
|
/* Target definitions for 32-bit ELF
|
|
|
|
Copyright 1993 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
|
|
|
|
|
|
/* This structure contains everything that BFD knows about a target.
|
|
|
|
It includes things like its byte order, name, what routines to call
|
|
|
|
to do various operations, etc. Every BFD points to a target structure
|
|
|
|
with its "xvec" member.
|
|
|
|
|
|
|
|
There are two such structures here: one for big-endian machines and
|
|
|
|
one for little-endian machines. */
|
|
|
|
|
|
|
|
/* Archives are generic or unimplemented. */
|
1993-05-26 04:11:26 +08:00
|
|
|
#ifndef bfd_elf32_slurp_armap
|
|
|
|
#define bfd_elf32_slurp_armap bfd_slurp_coff_armap
|
1993-04-29 06:49:48 +08:00
|
|
|
#endif
|
1993-05-26 04:11:26 +08:00
|
|
|
#define bfd_elf32_slurp_extended_name_table _bfd_slurp_extended_name_table
|
|
|
|
#define bfd_elf32_truncate_arname bfd_dont_truncate_arname
|
|
|
|
#define bfd_elf32_openr_next_archived_file bfd_generic_openr_next_archived_file
|
|
|
|
#define bfd_elf32_generic_stat_arch_elt bfd_generic_stat_arch_elt
|
|
|
|
#ifndef bfd_elf32_write_armap
|
|
|
|
#define bfd_elf32_write_armap coff_write_armap
|
1993-04-29 06:49:48 +08:00
|
|
|
#endif
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* Ordinary section reading and writing */
|
1993-05-26 04:11:26 +08:00
|
|
|
#define bfd_elf32_get_section_contents bfd_generic_get_section_contents
|
|
|
|
#define bfd_elf32_close_and_cleanup bfd_generic_close_and_cleanup
|
|
|
|
|
|
|
|
#define bfd_elf32_bfd_debug_info_start bfd_void
|
|
|
|
#define bfd_elf32_bfd_debug_info_end bfd_void
|
|
|
|
#define bfd_elf32_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
|
|
|
|
#define bfd_elf32_bfd_get_relocated_section_contents \
|
1993-02-27 15:05:09 +08:00
|
|
|
bfd_generic_get_relocated_section_contents
|
1993-05-26 04:11:26 +08:00
|
|
|
#define bfd_elf32_bfd_relax_section bfd_generic_relax_section
|
|
|
|
#define bfd_elf32_bfd_make_debug_symbol \
|
1993-02-27 15:05:09 +08:00
|
|
|
((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
|
Extensive changes to move the bulk of the linker into BFD so that
more efficient backend code can be written for specific object
files. Only existing efficient backend is a.out.
* seclet.c, seclet.h: Removed.
* hash.c, linker.c, genlink.h: New files.
* bfd-in.h: Removed bfd_error_vector. Declared hash table
structures and functions.
(JUMP_TABLE): Removed bfd_seclet_link, added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* All backends: Changed accordingly.
* bfd-in2.h: Rebuilt.
* bfd.c (struct _bfd): Added link_next and archive_pass fields.
Removed ld_symbols field.
(bfd_nonrepresentable_section, bfd_undefined_symbol,
bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
bfd_error_vector): Removed.
(bfd_default_error_trap, bfd_error_trap,
bfd_error_nonrepresentabltrap): Removed.
(bfd_get_relocated_section_contents): Pass link_info. Pass
link_order instead of seclet. Pass symbols.
(bfd_relax_section): Pass link_info.
(bfd_seclet_link): Removed.
(bfd_link_hash_table_create, bfd_link_add_symbols,
bfd_final_link): New macros.
* libbfd-in.h: If __GNUC__ is defined and alloca is not, define
alloca as __builtin_alloca. Declare internal linking functions.
* libbfd.h: Rebuilt.
* libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
for months.
* reloc.c (reloc_howto_type): Added error_message argument to
special_function field. Changed all callers and all definitions.
(bfd_get_reloc_size): Make argument a const pointer.
(bfd_perform_relocation): Add error_message argument to hold
string set if return value if bfd_reloc_dangerous. Changed all
callers.
(_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
* section.c (asection): Renamed seclets_head and seclets_tail to
link_order_head and link_order_tail.
* targets.c (bfd_target): Replaced seclet argument with link_info
and link_order and symbols arguments in
bfd_get_relocated_section_contents. Added symbols argument to
bfd_relax_section. Removed bfd_seclet_link. Added
bfd_link_hash_table_create, bfd_link_add_symbols and
bfd_final_link.
* libaout.h (struct aoutdata): Added external_syms,
external_sym_count, external_strings, sym_hashes fields.
(obj_aout_external_syms, obj_aout_external_sym_count,
obj_aout_external_strings, obj_aout_sym_hashes): New accessor
macros.
(WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
* aoutx.h: Wrote new back end linker routines.
(translate_to_native_sym_flags): Return boolean value. Don't use
bfd_error_vector.
(NAME(aout,write_syms)): Return boolean value. Check return value
of translate_to_native_sym_flags and bfd_write.
* aout-target.h (final_link_callback): New function.
(MY_bfd_final_link): New function.
* aout-adobe.c (aout_adobe_write_object_contents): Check return
value of aout_32_write_syms.
* hp300hpux.c (MY(write_object_contents)): Likewise.
* i386lynx.c (WRITE_HEADERS): Likewise.
* libaout.h (WRITE_HEADERS): Likewise.
* bout.c: Changed functions to use link_info->callbacks rather
than bfd_error_vector, and link_orders rather than seclets.
* coff-alpha.c: Likewise.
* coff-h8300.c: Likewise.
* coff-h8500.c: Likewise.
* coff-sh.c: Likewise.
* coff-z8k.c: Likewise.
* elf32-hppa.c: Likewise.
* reloc16.c: Likewise.
* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
up _gp in the hash table rather than in outsymbols.
* coff-a29k.c (a29k_reloc): Pass errors back in new error_message
argument rather than printing them.
* coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
link_order arguments rather than seclet. Changed all uses and
definitions.
(bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
all uses and definitions.
* libcoff.h: Rebuilt.
* ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
not by ECOFF, make it scAbs.
(ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
rewritten.
* elf32-mips.c (mips_elf_final_link): Renamed from
mips_elf_seclet_link and rewritten.
* elf32-hppa.c (elf32_hppa_stub_description): Added link_info
field.
(new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
Added link_info arguments. Changed all callers.
* elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
not NULL.
* oasys.c (oasys_write_sections): Return boolean value rather than
using bfd_error_vector.
(oasys_write_object_contents): Check return value of
oasys_write_sections.
* hosts/std-host.h: Don't declare qsort or strtol.
* Makefile.in: Rebuild dependencies.
(BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
(CFILES): Removed seclet.c. Added hash.c and linker.c.
(HFILES): Removed seclet.h. Added genlink.h.
1993-12-31 03:56:50 +08:00
|
|
|
#ifndef bfd_elf32_bfd_link_hash_table_create
|
|
|
|
#define bfd_elf32_bfd_link_hash_table_create \
|
|
|
|
_bfd_generic_link_hash_table_create
|
|
|
|
#endif
|
|
|
|
#ifndef bfd_elf32_bfd_link_add_symbols
|
|
|
|
#define bfd_elf32_bfd_link_add_symbols _bfd_generic_link_add_symbols
|
|
|
|
#endif
|
|
|
|
#ifndef bfd_elf32_bfd_final_link
|
|
|
|
#define bfd_elf32_bfd_final_link _bfd_generic_final_link
|
|
|
|
#endif
|
1993-02-27 15:05:09 +08:00
|
|
|
|
1993-07-27 02:46:37 +08:00
|
|
|
#ifndef elf_info_to_howto_rel
|
|
|
|
#define elf_info_to_howto_rel 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ELF_MAXPAGESIZE
|
|
|
|
#define ELF_MAXPAGESIZE 1
|
|
|
|
#endif
|
|
|
|
|
1993-11-19 01:10:42 +08:00
|
|
|
#ifndef elf_backend_sym_is_global
|
|
|
|
#define elf_backend_sym_is_global 0
|
|
|
|
#endif
|
* elfcode.h (elf_object_p): Rather than looking through an array
of architectures, get the ELF EM_xxx code from the backend
information. Let the generic ELF target match any EM_xxx code not
matched by another ELF target. Call elf_backend_object_p to let
the backend do more checks and set global information.
* libelf.h (struct elf_backend_data): Added elf_machine_code and
elf_backend_object_p fields.
(struct bfd_elf_arch_map): Removed.
(bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
* elf32-target.h, elf64-target.h: Initialize elf_machine_code
field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
field with elf_backend_object_p (if it is defined).
* elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
elf64-gen.c (ELF_MACHINE_CODE): Defined.
* elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
routines.
(mips_elf_object_p): Set the right machine number.
(mips_elf_ecoff_debug_swap): Defined.
(elf_backend_object_p): Defined to be mips_elf_object_p.
(elf_backend_ecoff_debug_swap): Defined to be
mips_elf_ecoff_debug_swap.
* elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
* elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
for R_MIPS_26. Correct overflow detection requires matching the
upper four bits of the destination against the PC. From Ted Lemon
<mellon@pepper.ncd.com>.
* elf32-hppa.c (elf_hppa_reloc_type_lookup): Return type
should point to const data.
1993-11-10 05:08:58 +08:00
|
|
|
#ifndef elf_backend_object_p
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_object_p 0
|
* elfcode.h (elf_object_p): Rather than looking through an array
of architectures, get the ELF EM_xxx code from the backend
information. Let the generic ELF target match any EM_xxx code not
matched by another ELF target. Call elf_backend_object_p to let
the backend do more checks and set global information.
* libelf.h (struct elf_backend_data): Added elf_machine_code and
elf_backend_object_p fields.
(struct bfd_elf_arch_map): Removed.
(bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
* elf32-target.h, elf64-target.h: Initialize elf_machine_code
field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
field with elf_backend_object_p (if it is defined).
* elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
elf64-gen.c (ELF_MACHINE_CODE): Defined.
* elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
routines.
(mips_elf_object_p): Set the right machine number.
(mips_elf_ecoff_debug_swap): Defined.
(elf_backend_object_p): Defined to be mips_elf_object_p.
(elf_backend_ecoff_debug_swap): Defined to be
mips_elf_ecoff_debug_swap.
* elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
* elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
for R_MIPS_26. Correct overflow detection requires matching the
upper four bits of the destination against the PC. From Ted Lemon
<mellon@pepper.ncd.com>.
* elf32-hppa.c (elf_hppa_reloc_type_lookup): Return type
should point to const data.
1993-11-10 05:08:58 +08:00
|
|
|
#endif
|
1993-08-25 09:15:07 +08:00
|
|
|
#ifndef elf_backend_symbol_processing
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_symbol_processing 0
|
1993-08-25 09:15:07 +08:00
|
|
|
#endif
|
|
|
|
#ifndef elf_backend_symbol_table_processing
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_symbol_table_processing 0
|
1993-08-25 09:15:07 +08:00
|
|
|
#endif
|
|
|
|
#ifndef elf_backend_section_processing
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_section_processing 0
|
1993-08-25 09:15:07 +08:00
|
|
|
#endif
|
|
|
|
#ifndef elf_backend_section_from_shdr
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_section_from_shdr 0
|
1993-08-25 09:15:07 +08:00
|
|
|
#endif
|
|
|
|
#ifndef elf_backend_fake_sections
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_fake_sections 0
|
1993-08-25 09:15:07 +08:00
|
|
|
#endif
|
|
|
|
#ifndef elf_backend_section_from_bfd_section
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_section_from_bfd_section 0
|
|
|
|
#endif
|
|
|
|
#ifndef elf_backend_final_write_processing
|
|
|
|
#define elf_backend_final_write_processing 0
|
1993-08-25 09:15:07 +08:00
|
|
|
#endif
|
1993-11-10 00:33:28 +08:00
|
|
|
#ifndef elf_backend_ecoff_debug_swap
|
1993-11-19 01:10:42 +08:00
|
|
|
#define elf_backend_ecoff_debug_swap 0
|
1993-11-10 00:33:28 +08:00
|
|
|
#endif
|
1993-08-25 09:15:07 +08:00
|
|
|
|
1993-06-22 11:06:29 +08:00
|
|
|
static CONST struct elf_backend_data elf32_bed =
|
1993-02-27 15:05:09 +08:00
|
|
|
{
|
1993-06-03 05:24:35 +08:00
|
|
|
#ifdef USE_REL
|
|
|
|
0, /* use_rela_p */
|
|
|
|
#else
|
|
|
|
1, /* use_rela_p */
|
|
|
|
#endif
|
|
|
|
0, /* elf_64_p */
|
|
|
|
ELF_ARCH, /* arch */
|
* elfcode.h (elf_object_p): Rather than looking through an array
of architectures, get the ELF EM_xxx code from the backend
information. Let the generic ELF target match any EM_xxx code not
matched by another ELF target. Call elf_backend_object_p to let
the backend do more checks and set global information.
* libelf.h (struct elf_backend_data): Added elf_machine_code and
elf_backend_object_p fields.
(struct bfd_elf_arch_map): Removed.
(bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
* elf32-target.h, elf64-target.h: Initialize elf_machine_code
field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
field with elf_backend_object_p (if it is defined).
* elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
elf64-gen.c (ELF_MACHINE_CODE): Defined.
* elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
routines.
(mips_elf_object_p): Set the right machine number.
(mips_elf_ecoff_debug_swap): Defined.
(elf_backend_object_p): Defined to be mips_elf_object_p.
(elf_backend_ecoff_debug_swap): Defined to be
mips_elf_ecoff_debug_swap.
* elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
* elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
for R_MIPS_26. Correct overflow detection requires matching the
upper four bits of the destination against the PC. From Ted Lemon
<mellon@pepper.ncd.com>.
* elf32-hppa.c (elf_hppa_reloc_type_lookup): Return type
should point to const data.
1993-11-10 05:08:58 +08:00
|
|
|
ELF_MACHINE_CODE, /* elf_machine_code */
|
1993-11-10 00:33:28 +08:00
|
|
|
ELF_MAXPAGESIZE, /* maxpagesize */
|
1993-11-19 01:10:42 +08:00
|
|
|
elf_info_to_howto,
|
|
|
|
elf_info_to_howto_rel,
|
|
|
|
elf_backend_sym_is_global,
|
|
|
|
elf_backend_object_p,
|
|
|
|
elf_backend_symbol_processing,
|
|
|
|
elf_backend_symbol_table_processing,
|
|
|
|
elf_backend_section_processing,
|
|
|
|
elf_backend_section_from_shdr,
|
|
|
|
elf_backend_fake_sections,
|
|
|
|
elf_backend_section_from_bfd_section,
|
|
|
|
elf_backend_final_write_processing,
|
|
|
|
elf_backend_ecoff_debug_swap
|
1993-02-27 15:05:09 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef TARGET_BIG_SYM
|
|
|
|
bfd_target TARGET_BIG_SYM =
|
|
|
|
{
|
|
|
|
/* name: identify kind of target */
|
|
|
|
TARGET_BIG_NAME,
|
|
|
|
|
|
|
|
/* flavour: general indication about file */
|
|
|
|
bfd_target_elf_flavour,
|
|
|
|
|
|
|
|
/* byteorder_big_p: data is big endian */
|
|
|
|
true,
|
|
|
|
|
|
|
|
/* header_byteorder_big_p: header is also big endian */
|
|
|
|
true,
|
|
|
|
|
|
|
|
/* object_flags: mask of all file flags */
|
|
|
|
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
|
|
|
|
DYNAMIC | WP_TEXT),
|
|
|
|
|
|
|
|
/* section_flags: mask of all section flags */
|
|
|
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
|
1993-09-23 23:14:12 +08:00
|
|
|
SEC_CODE | SEC_DATA | SEC_DEBUGGING),
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* leading_symbol_char: is the first char of a user symbol
|
|
|
|
predictable, and if so what is it */
|
|
|
|
0,
|
|
|
|
|
|
|
|
/* ar_pad_char: pad character for filenames within an archive header
|
|
|
|
FIXME: this really has nothing to do with ELF, this is a characteristic
|
|
|
|
of the archiver and/or os and should be independently tunable */
|
|
|
|
'/',
|
|
|
|
|
|
|
|
/* ar_max_namelen: maximum number of characters in an archive header
|
|
|
|
FIXME: this really has nothing to do with ELF, this is a characteristic
|
|
|
|
of the archiver and should be independently tunable. This value is
|
|
|
|
a WAG (wild a** guess) */
|
|
|
|
15,
|
|
|
|
|
|
|
|
/* align_power_min: minimum alignment restriction for any section
|
|
|
|
FIXME: this value may be target machine dependent */
|
|
|
|
3,
|
|
|
|
|
|
|
|
/* Routines to byte-swap various sized integers from the data sections */
|
1993-09-08 02:32:33 +08:00
|
|
|
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
|
|
|
|
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
|
|
|
|
bfd_getb16, bfd_getb_signed_16, bfd_putb16,
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* Routines to byte-swap various sized integers from the file headers */
|
1993-09-08 02:32:33 +08:00
|
|
|
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
|
|
|
|
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
|
|
|
|
bfd_getb16, bfd_getb_signed_16, bfd_putb16,
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* bfd_check_format: check the format of a file being read */
|
|
|
|
{ _bfd_dummy_target, /* unknown format */
|
1993-05-26 04:11:26 +08:00
|
|
|
bfd_elf32_object_p, /* assembler/linker output (object file) */
|
1993-02-27 15:05:09 +08:00
|
|
|
bfd_generic_archive_p, /* an archive */
|
1993-05-26 04:11:26 +08:00
|
|
|
bfd_elf32_core_file_p /* a core file */
|
1993-02-27 15:05:09 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
/* bfd_set_format: set the format of a file being written */
|
|
|
|
{ bfd_false,
|
1993-06-25 05:30:26 +08:00
|
|
|
bfd_elf_mkobject,
|
1993-02-27 15:05:09 +08:00
|
|
|
_bfd_generic_mkarchive,
|
|
|
|
bfd_false
|
|
|
|
},
|
|
|
|
|
|
|
|
/* bfd_write_contents: write cached information into a file being written */
|
|
|
|
{ bfd_false,
|
1993-05-26 04:11:26 +08:00
|
|
|
bfd_elf32_write_object_contents,
|
1993-02-27 15:05:09 +08:00
|
|
|
_bfd_write_archive_contents,
|
|
|
|
bfd_false
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Initialize a jump table with the standard macro. All names start with
|
|
|
|
"elf" */
|
1993-05-26 04:11:26 +08:00
|
|
|
JUMP_TABLE(bfd_elf32),
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* backend_data: */
|
1993-05-26 04:11:26 +08:00
|
|
|
(PTR) &elf32_bed,
|
1993-02-27 15:05:09 +08:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef TARGET_LITTLE_SYM
|
|
|
|
bfd_target TARGET_LITTLE_SYM =
|
|
|
|
{
|
|
|
|
/* name: identify kind of target */
|
|
|
|
TARGET_LITTLE_NAME,
|
|
|
|
|
|
|
|
/* flavour: general indication about file */
|
|
|
|
bfd_target_elf_flavour,
|
|
|
|
|
|
|
|
/* byteorder_big_p: data is big endian */
|
|
|
|
false, /* Nope -- this one's little endian */
|
|
|
|
|
|
|
|
/* header_byteorder_big_p: header is also big endian */
|
|
|
|
false, /* Nope -- this one's little endian */
|
|
|
|
|
|
|
|
/* object_flags: mask of all file flags */
|
|
|
|
(HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
|
|
|
|
DYNAMIC | WP_TEXT),
|
|
|
|
|
|
|
|
/* section_flags: mask of all section flags */
|
|
|
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
|
1993-09-23 23:14:12 +08:00
|
|
|
SEC_CODE | SEC_DATA | SEC_DEBUGGING),
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* leading_symbol_char: is the first char of a user symbol
|
|
|
|
predictable, and if so what is it */
|
|
|
|
0,
|
|
|
|
|
|
|
|
/* ar_pad_char: pad character for filenames within an archive header
|
|
|
|
FIXME: this really has nothing to do with ELF, this is a characteristic
|
|
|
|
of the archiver and/or os and should be independently tunable */
|
|
|
|
'/',
|
|
|
|
|
|
|
|
/* ar_max_namelen: maximum number of characters in an archive header
|
|
|
|
FIXME: this really has nothing to do with ELF, this is a characteristic
|
|
|
|
of the archiver and should be independently tunable. This value is
|
|
|
|
a WAG (wild a** guess) */
|
|
|
|
15,
|
|
|
|
|
|
|
|
/* align_power_min: minimum alignment restriction for any section
|
|
|
|
FIXME: this value may be target machine dependent */
|
|
|
|
3,
|
|
|
|
|
|
|
|
/* Routines to byte-swap various sized integers from the data sections */
|
1993-09-08 02:32:33 +08:00
|
|
|
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
|
|
|
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
|
|
|
|
bfd_getl16, bfd_getl_signed_16, bfd_putl16,
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* Routines to byte-swap various sized integers from the file headers */
|
1993-09-08 02:32:33 +08:00
|
|
|
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
|
|
|
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
|
|
|
|
bfd_getl16, bfd_getl_signed_16, bfd_putl16,
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* bfd_check_format: check the format of a file being read */
|
|
|
|
{ _bfd_dummy_target, /* unknown format */
|
1993-05-26 04:11:26 +08:00
|
|
|
bfd_elf32_object_p, /* assembler/linker output (object file) */
|
1993-02-27 15:05:09 +08:00
|
|
|
bfd_generic_archive_p, /* an archive */
|
1993-05-26 04:11:26 +08:00
|
|
|
bfd_elf32_core_file_p /* a core file */
|
1993-02-27 15:05:09 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
/* bfd_set_format: set the format of a file being written */
|
|
|
|
{ bfd_false,
|
1993-06-25 05:30:26 +08:00
|
|
|
bfd_elf_mkobject,
|
1993-02-27 15:05:09 +08:00
|
|
|
_bfd_generic_mkarchive,
|
|
|
|
bfd_false
|
|
|
|
},
|
|
|
|
|
|
|
|
/* bfd_write_contents: write cached information into a file being written */
|
|
|
|
{ bfd_false,
|
1993-05-26 04:11:26 +08:00
|
|
|
bfd_elf32_write_object_contents,
|
1993-02-27 15:05:09 +08:00
|
|
|
_bfd_write_archive_contents,
|
|
|
|
bfd_false
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Initialize a jump table with the standard macro. All names start with
|
|
|
|
"elf" */
|
1993-05-26 04:11:26 +08:00
|
|
|
JUMP_TABLE(bfd_elf32),
|
1993-02-27 15:05:09 +08:00
|
|
|
|
|
|
|
/* backend_data: */
|
1993-05-26 04:11:26 +08:00
|
|
|
(PTR) &elf32_bed,
|
1993-02-27 15:05:09 +08:00
|
|
|
};
|
|
|
|
#endif
|