Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / targets.c
index 0732c5e4292aa04fcf1ed25de113d27c06a5d485..dcd42636df0432135a9501ced33d4ee22cca56f6 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic target-file-type support for the BFD library.
-   Copyright (C) 1990-2020 Free Software Foundation, Inc.
+   Copyright (C) 1990-2021 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -132,6 +132,11 @@ DESCRIPTION
 .   (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
 .   (bfd_assert (__FILE__,__LINE__), NULL))
 .#endif
+.
+.{* Defined to TRUE if unused section symbol should be kept.  *}
+.#ifndef TARGET_KEEP_UNUSED_SECTION_SYMBOLS
+.#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS TRUE
+.#endif
 .
        This is the structure which defines the type of BFD this is.  The
        <<xvec>> member of the struct <<bfd>> itself points here.  Each
@@ -215,6 +220,9 @@ DESCRIPTION
 .     possible targets when more than one target matches.  *}
 .  unsigned char match_priority;
 .
+. {* TRUE if unused section symbols should be kept.  *}
+.  bfd_boolean keep_unused_section_symbols;
+.
 .  {* Entries for byte swapping for data. These are different from the
 .     other entry points, since they don't take a BFD as the first argument.
 .     Certain other handlers could do the same.  *}
@@ -655,6 +663,12 @@ to find an alternative output format that is suitable.
 .  return sy->the_bfd->xvec->flavour;
 .}
 .
+.static inline bfd_boolean
+.bfd_keep_unused_section_symbols (const bfd *abfd)
+.{
+.  return abfd->xvec->keep_unused_section_symbols;
+.}
+.
 */
 
 /* All known xvecs (even those that don't compile on all systems).
@@ -683,8 +697,6 @@ extern const bfd_target arm_elf32_fdpic_be_vec;
 extern const bfd_target arm_elf32_fdpic_le_vec;
 extern const bfd_target arm_elf32_nacl_be_vec;
 extern const bfd_target arm_elf32_nacl_le_vec;
-extern const bfd_target arm_elf32_symbian_be_vec;
-extern const bfd_target arm_elf32_symbian_le_vec;
 extern const bfd_target arm_elf32_vxworks_be_vec;
 extern const bfd_target arm_elf32_vxworks_le_vec;
 extern const bfd_target arm_mach_o_vec;
@@ -838,14 +850,13 @@ extern const bfd_target powerpc_elf32_vxworks_vec;
 extern const bfd_target powerpc_elf64_vec;
 extern const bfd_target powerpc_elf64_le_vec;
 extern const bfd_target powerpc_elf64_fbsd_vec;
-extern const bfd_target powerpc_pe_vec;
-extern const bfd_target powerpc_pe_le_vec;
-extern const bfd_target powerpc_pei_vec;
-extern const bfd_target powerpc_pei_le_vec;
+extern const bfd_target powerpc_elf64_fbsd_le_vec;
 extern const bfd_target powerpc_xcoff_vec;
 extern const bfd_target pru_elf32_vec;
 extern const bfd_target riscv_elf32_vec;
 extern const bfd_target riscv_elf64_vec;
+extern const bfd_target riscv_elf32_be_vec;
+extern const bfd_target riscv_elf64_be_vec;
 extern const bfd_target rl78_elf32_vec;
 extern const bfd_target rs6000_xcoff64_vec;
 extern const bfd_target rs6000_xcoff64_aix_vec;
@@ -1008,8 +1019,6 @@ static const bfd_target * const _bfd_target_vector[] =
        &arm_elf32_le_vec,
        &arm_elf32_fdpic_be_vec,
        &arm_elf32_fdpic_le_vec,
-       &arm_elf32_symbian_be_vec,
-       &arm_elf32_symbian_le_vec,
        &arm_elf32_vxworks_be_vec,
        &arm_elf32_vxworks_le_vec,
        &arm_mach_o_vec,
@@ -1228,11 +1237,8 @@ static const bfd_target * const _bfd_target_vector[] =
        &powerpc_elf64_vec,
        &powerpc_elf64_le_vec,
        &powerpc_elf64_fbsd_vec,
+       &powerpc_elf64_fbsd_le_vec,
 #endif
-       &powerpc_pe_vec,
-       &powerpc_pe_le_vec,
-       &powerpc_pei_vec,
-       &powerpc_pei_le_vec,
 #if 0
        /* This has the same magic number as RS/6000.  */
        &powerpc_xcoff_vec,
@@ -1243,6 +1249,8 @@ static const bfd_target * const _bfd_target_vector[] =
 #ifdef BFD64
        &riscv_elf32_vec,
        &riscv_elf64_vec,
+       &riscv_elf32_be_vec,
+       &riscv_elf64_be_vec,
 #endif
        &rl78_elf32_vec,
 
@@ -1411,7 +1419,7 @@ static const bfd_target * const _bfd_target_vector[] =
 
        NULL /* end of list marker */
 };
-const bfd_target * const *bfd_target_vector = _bfd_target_vector;
+const bfd_target *const *const bfd_target_vector = _bfd_target_vector;
 
 /* bfd_default_vector[0] contains either the address of the default vector,
    if there is one, or zero if there isn't.  */
@@ -1426,13 +1434,13 @@ const bfd_target *bfd_default_vector[] = {
 /* 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[] = {
+static const bfd_target *const _bfd_associated_vector[] = {
 #ifdef ASSOCIATED_VECS
        ASSOCIATED_VECS,
 #endif
        NULL
 };
-const bfd_target * const *bfd_associated_vector = _bfd_associated_vector;
+const bfd_target *const *const bfd_associated_vector = _bfd_associated_vector;
 
 /* 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
This page took 0.027541 seconds and 4 git commands to generate.