Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/bfd/elfxx-target.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* Target definitions for NN-bit ELF
    2    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    3    Free Software Foundation, Inc.
    4 
    5 This file is part of BFD, the Binary File Descriptor library.
    6 
    7 This program is free software; you can redistribute it and/or modify
    8 it under the terms of the GNU General Public License as published by
    9 the Free Software Foundation; either version 2 of the License, or
    10 (at your option) any later version.
    11 
    12 This program is distributed in the hope that it will be useful,
    13 but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15 GNU General Public License for more details.
    16 
    17 You should have received a copy of the GNU General Public License
    18 along with this program; if not, write to the Free Software
    19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
     2   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     3   2003 Free Software Foundation, Inc.
     4
     5   This file is part of BFD, the Binary File Descriptor library.
     6
     7   This program is free software; you can redistribute it and/or modify
     8   it under the terms of the GNU General Public License as published by
     9   the Free Software Foundation; either version 2 of the License, or
     10   (at your option) any later version.
     11
     12   This program is distributed in the hope that it will be useful,
     13   but WITHOUT ANY WARRANTY; without even the implied warranty of
     14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15   GNU General Public License for more details.
     16
     17   You should have received a copy of the GNU General Public License
     18   along with this program; if not, write to the Free Software
     19   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    2020
    2121/* This structure contains everything that BFD knows about a target.
     
    3434
    3535#define bfd_elfNN_canonicalize_dynamic_symtab _bfd_elf_canonicalize_dynamic_symtab
     36#ifndef bfd_elfNN_canonicalize_reloc
    3637#define bfd_elfNN_canonicalize_reloc    _bfd_elf_canonicalize_reloc
     38#endif
    3739#ifndef bfd_elfNN_find_nearest_line
    3840#define bfd_elfNN_find_nearest_line     _bfd_elf_find_nearest_line
     
    4547#define bfd_elfNN_get_reloc_upper_bound _bfd_elf_get_reloc_upper_bound
    4648#endif
     49#ifndef bfd_elfNN_get_symbol_info
    4750#define bfd_elfNN_get_symbol_info       _bfd_elf_get_symbol_info
     51#endif
    4852#define bfd_elfNN_get_symtab            _bfd_elf_get_symtab
    4953#define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
     
    5256#endif
    5357#define bfd_elfNN_make_empty_symbol     _bfd_elf_make_empty_symbol
     58#ifndef bfd_elfNN_new_section_hook
    5459#define bfd_elfNN_new_section_hook      _bfd_elf_new_section_hook
     60#endif
    5561#define bfd_elfNN_set_arch_mach         _bfd_elf_set_arch_mach
    5662#ifndef bfd_elfNN_set_section_contents
     
    6773#define elf_backend_got_symbol_offset (bfd_vma) 0
    6874#endif
     75#ifndef elf_backend_can_refcount
     76#define elf_backend_can_refcount 0
     77#endif
    6978#ifndef elf_backend_want_got_plt
    7079#define elf_backend_want_got_plt 0
     
    8594#define elf_backend_want_dynbss 1
    8695#endif
     96#ifndef elf_backend_want_p_paddr_set_to_zero
     97#define elf_backend_want_p_paddr_set_to_zero 0
     98#endif
    8799
    88100#define bfd_elfNN_bfd_debug_info_start  bfd_void
    89101#define bfd_elfNN_bfd_debug_info_end    bfd_void
    90 #define bfd_elfNN_bfd_debug_info_accumulate     (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
     102#define bfd_elfNN_bfd_debug_info_accumulate \
     103  (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
    91104
    92105#ifndef bfd_elfNN_bfd_get_relocated_section_contents
     
    102115#define elf_backend_can_gc_sections 0
    103116#endif
     117#ifndef elf_backend_can_refcount
     118#define elf_backend_can_refcount 0
     119#endif
     120#ifndef elf_backend_want_got_sym
     121#define elf_backend_want_got_sym 1
     122#endif
    104123#ifndef elf_backend_gc_mark_hook
    105124#define elf_backend_gc_mark_hook        NULL
     
    110129#ifndef bfd_elfNN_bfd_gc_sections
    111130#define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections
     131#endif
     132
     133#ifndef bfd_elfNN_bfd_merge_sections
     134#define bfd_elfNN_bfd_merge_sections \
     135  _bfd_elf_merge_sections
     136#endif
     137
     138#ifndef bfd_elfNN_bfd_discard_group
     139#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group
    112140#endif
    113141
     
    128156#ifndef bfd_elfNN_bfd_copy_private_bfd_data
    129157#define bfd_elfNN_bfd_copy_private_bfd_data \
    130   ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
     158  _bfd_elf_copy_private_bfd_data
    131159#endif
    132160#ifndef bfd_elfNN_bfd_print_private_bfd_data
     
    136164#ifndef bfd_elfNN_bfd_merge_private_bfd_data
    137165#define bfd_elfNN_bfd_merge_private_bfd_data \
    138   ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
     166  ((bfd_boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
    139167#endif
    140168#ifndef bfd_elfNN_bfd_set_private_flags
    141169#define bfd_elfNN_bfd_set_private_flags \
    142   ((boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
     170  ((bfd_boolean (*) PARAMS ((bfd *, flagword))) bfd_true)
    143171#endif
    144172#ifndef bfd_elfNN_bfd_is_local_label_name
     
    155183#endif
    156184
     185#ifndef bfd_elfNN_bfd_link_hash_table_free
     186#define bfd_elfNN_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
     187#endif
     188
    157189#ifdef elf_backend_relocate_section
    158190#ifndef bfd_elfNN_bfd_link_hash_table_create
     
    160192#endif
    161193#else /* ! defined (elf_backend_relocate_section) */
    162 /* If no backend relocate_section routine, use the generic linker.  */
     194/* If no backend relocate_section routine, use the generic linker.
     195   Note - this will prevent the port from being able to use some of
     196   the other features of the ELF linker, because the generic hash structure
     197   does not have the fields needed by the ELF linker.  In particular it
     198   means that linking directly to S-records will not work.  */
    163199#ifndef bfd_elfNN_bfd_link_hash_table_create
    164200#define bfd_elfNN_bfd_link_hash_table_create \
     
    172208#endif
    173209#endif /* ! defined (elf_backend_relocate_section) */
     210
     211#ifndef bfd_elfNN_bfd_link_just_syms
     212#define bfd_elfNN_bfd_link_just_syms    _bfd_elf_link_just_syms
     213#endif
     214
    174215#ifndef bfd_elfNN_bfd_link_split_section
    175216#define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
     
    214255
    215256#ifndef elf_backend_collect
    216 #define elf_backend_collect false
     257#define elf_backend_collect FALSE
    217258#endif
    218259#ifndef elf_backend_type_change_ok
    219 #define elf_backend_type_change_ok false
     260#define elf_backend_type_change_ok FALSE
    220261#endif
    221262
     
    318359#ifndef elf_backend_hide_symbol
    319360#define elf_backend_hide_symbol         _bfd_elf_link_hash_hide_symbol
     361#endif
     362#ifndef elf_backend_emit_relocs
     363#define elf_backend_emit_relocs                 NULL
     364#endif
     365#ifndef elf_backend_count_relocs
     366#define elf_backend_count_relocs                NULL
     367#endif
     368#ifndef elf_backend_grok_prstatus
     369#define elf_backend_grok_prstatus               NULL
     370#endif
     371#ifndef elf_backend_grok_psinfo
     372#define elf_backend_grok_psinfo                 NULL
     373#endif
     374#ifndef elf_backend_sprintf_vma
     375#define elf_backend_sprintf_vma                 _bfd_elf_sprintf_vma
     376#endif
     377#ifndef elf_backend_fprintf_vma
     378#define elf_backend_fprintf_vma                 _bfd_elf_fprintf_vma
     379#endif
     380#ifndef elf_backend_reloc_type_class
     381#define elf_backend_reloc_type_class            _bfd_elf_reloc_type_class
     382#endif
     383#ifndef elf_backend_discard_info
     384#define elf_backend_discard_info                NULL
     385#endif
     386#ifndef elf_backend_ignore_discarded_relocs
     387#define elf_backend_ignore_discarded_relocs     NULL
     388#endif
     389#ifndef elf_backend_write_section
     390#define elf_backend_write_section               NULL
     391#endif
     392#ifndef elf_backend_mips_irix_compat
     393#define elf_backend_mips_irix_compat            NULL
     394#endif
     395#ifndef elf_backend_mips_rtype_to_howto
     396#define elf_backend_mips_rtype_to_howto         NULL
    320397#endif
    321398
     
    326403#ifndef USE_REL
    327404#define USE_REL 0
    328 #else
    329 #undef USE_REL
    330 #define USE_REL 1
    331405#endif
    332406
     
    342416#endif
    343417
     418#ifndef elf_backend_rela_normal
     419#define elf_backend_rela_normal 0
     420#endif
     421
    344422#ifndef ELF_MACHINE_ALT1
    345423#define ELF_MACHINE_ALT1 0
     
    361439
    362440#ifndef INCLUDED_TARGET_FILE
    363 static CONST struct elf_backend_data elfNN_bed =
     441static const struct elf_backend_data elfNN_bed =
    364442{
    365443  ELF_ARCH,                     /* arch */
     
    400478  elf_backend_copy_indirect_symbol,
    401479  elf_backend_hide_symbol,
     480  elf_backend_emit_relocs,
     481  elf_backend_count_relocs,
     482  elf_backend_grok_prstatus,
     483  elf_backend_grok_psinfo,
     484  elf_backend_sprintf_vma,
     485  elf_backend_fprintf_vma,
     486  elf_backend_reloc_type_class,
     487  elf_backend_discard_info,
     488  elf_backend_ignore_discarded_relocs,
     489  elf_backend_write_section,
     490  elf_backend_mips_irix_compat,
     491  elf_backend_mips_rtype_to_howto,
    402492  elf_backend_ecoff_debug_swap,
    403493  ELF_MACHINE_ALT1,
     
    412502  elf_backend_may_use_rela_p,
    413503  elf_backend_default_use_rela_p,
     504  elf_backend_rela_normal,
    414505  elf_backend_sign_extend_vma,
    415506  elf_backend_want_got_plt,
     
    419510  elf_backend_plt_alignment,
    420511  elf_backend_can_gc_sections,
    421   elf_backend_want_dynbss
     512  elf_backend_can_refcount,
     513  elf_backend_want_got_sym,
     514  elf_backend_want_dynbss,
     515  elf_backend_want_p_paddr_set_to_zero
    422516};
    423517#endif
     
    444538
    445539  /* object_flags: mask of all file flags */
    446   (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
    447    DYNAMIC | WP_TEXT | D_PAGED),
     540  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
     541   | DYNAMIC | WP_TEXT | D_PAGED),
    448542
    449543  /* section_flags: mask of all section flags */
    450   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
    451    SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES),
     544  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
     545   | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
     546   | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
    452547
    453548   /* leading_symbol_char: is the first char of a user symbol
     
    462557  /* ar_max_namelen: maximum number of characters in an archive header
    463558     FIXME:  this really has nothing to do with ELF, this is a characteristic
    464      of the archiver and should be independently tunable.  This value is
    465      a WAG (wild a** guess) */
    466   14,
     559     of the archiver and should be independently tunable.  The System V ABI,
     560     Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
     561  15,
    467562
    468563  /* Routines to byte-swap various sized integers from the data sections */
     
    539634
    540635  /* object_flags: mask of all file flags */
    541   (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
    542    DYNAMIC | WP_TEXT | D_PAGED),
     636  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
     637   | DYNAMIC | WP_TEXT | D_PAGED),
    543638
    544639  /* section_flags: mask of all section flags */
    545   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
    546    SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES),
     640  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
     641   | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
     642   | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
    547643
    548644   /* leading_symbol_char: is the first char of a user symbol
     
    557653  /* ar_max_namelen: maximum number of characters in an archive header
    558654     FIXME:  this really has nothing to do with ELF, this is a characteristic
    559      of the archiver and should be independently tunable.  This value is
    560      a WAG (wild a** guess) */
    561   14,
     655     of the archiver and should be independently tunable.  The System V ABI,
     656     Chapter 7 (Formats & Protocols), Archive section sets this as 15. */
     657  15,
    562658
    563659  /* Routines to byte-swap various sized integers from the data sections */
Note: See TracChangeset for help on using the changeset viewer.