2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 7 May 2005 13:22:57 +0000 (13:22 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 7 May 2005 13:22:57 +0000 (13:22 +0000)
* elf-bfd.h (elf_backend_data): Update special_sections to
array of pointer to bfd_elf_special_section.
* elf.c (special_sections): Likewise.
* elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
* elf32-m32r.c (m32r_elf_special_sections): Likewise.
* elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
* elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
* elf32-mcore.c (mcore_elf_special_sections): Likewise.
* elf32-ppc.c (ppc_elf_special_sections): Likewise.
* elf32-sh64.c (sh64_elf_special_sections): Likewise.
* elf32-v850.c (v850_elf_special_sections): Likewise.
* elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
* elf64-alpha.c (elf64_alpha_special_sections): Likewise.
* elf64-hppa.c (elf64_hppa_special_sections): Likewise.
* elf64-ppc.c (ppc64_elf_special_sections): Likewise.
* elf64-sh64.c (sh64_elf64_special_sections): Likewise.
* elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
* elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
* elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.

* elf.c (get_special_section): Updated.

19 files changed:
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf.c
bfd/elf32-arm.c
bfd/elf32-m32r.c
bfd/elf32-m68hc11.c
bfd/elf32-m68hc12.c
bfd/elf32-mcore.c
bfd/elf32-ppc.c
bfd/elf32-sh64.c
bfd/elf32-v850.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ppc.c
bfd/elf64-sh64.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h

index 8286fcff1472a7e24edb39d842791b5788028948..03b19ab63ed4fd96cab19e960b46559e21263a9d 100644 (file)
@@ -1,3 +1,27 @@
+2005-05-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (elf_backend_data): Update special_sections to
+       array of pointer to bfd_elf_special_section.
+       * elf.c (special_sections): Likewise.
+       * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
+       * elf32-m32r.c (m32r_elf_special_sections): Likewise.
+       * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
+       * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
+       * elf32-mcore.c (mcore_elf_special_sections): Likewise.
+       * elf32-ppc.c (ppc_elf_special_sections): Likewise.
+       * elf32-sh64.c (sh64_elf_special_sections): Likewise.
+       * elf32-v850.c (v850_elf_special_sections): Likewise.
+       * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
+       * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
+       * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
+       * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
+       * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
+       * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
+       * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
+
+       * elf.c (get_special_section): Updated.
+
 2005-05-07  Alan Modra  <amodra@bigpond.net.au>
 
        * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
index 1318b40ce68a81f1f3c72a3a07c0df938fb7708d..c48d21de9ed0b67a0bcbdd6955e8a3868e230b86 100644 (file)
@@ -974,8 +974,9 @@ struct elf_backend_data
 
   const struct elf_size_info *s;
 
-  /* An array of target specific special section map.  */
-  const struct bfd_elf_special_section *special_sections;
+  /* An array of 27 target specific special section map arrays,
+     covering 'a' to 'z', plus other.  */
+  const struct bfd_elf_special_section **special_sections;
 
   /* The size in bytes of the header for the GOT.  This includes the
      so-called reserved entries on some systems.  */
index 7f402c3cb32cec9a058192c1ee2451ceab7d417c..5eac34fe88fa8689ba665d96deedcd474e46080e 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2117,25 +2117,23 @@ bfd_section_from_elf_index (bfd *abfd, unsigned int index)
   return elf_elfsections (abfd)[index]->bfd_section;
 }
 
-static struct bfd_elf_special_section const special_sections[] =
+static struct bfd_elf_special_section const special_sections_b[] =
 {
   { ".bss",            4, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
-  { ".gnu.linkonce.b",15, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_c[] =
+{
   { ".comment",        8,  0, SHT_PROGBITS, 0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_d[] =
+{
   { ".data",           5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".data1",          6,  0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".debug",          6,  0, SHT_PROGBITS, 0 },
-  { ".fini",           5,  0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
-  { ".init",           5,  0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
-  { ".line",           5,  0, SHT_PROGBITS, 0 },
-  { ".rodata",         7, -2, SHT_PROGBITS, SHF_ALLOC },
-  { ".rodata1",        8,  0, SHT_PROGBITS, SHF_ALLOC },
-  { ".tbss",           5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE + SHF_TLS },
-  { ".tdata",          6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
-  { ".text",           5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
-  { ".init_array",    11,  0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
-  { ".fini_array",    11,  0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
-  { ".preinit_array", 14,  0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
   { ".debug_line",    11,  0, SHT_PROGBITS, 0 },
   { ".debug_info",    11,  0, SHT_PROGBITS, 0 },
   { ".debug_abbrev",  13,  0, SHT_PROGBITS, 0 },
@@ -2143,33 +2141,143 @@ static struct bfd_elf_special_section const special_sections[] =
   { ".dynamic",        8,  0, SHT_DYNAMIC,  SHF_ALLOC },
   { ".dynstr",         7,  0, SHT_STRTAB,   SHF_ALLOC },
   { ".dynsym",         7,  0, SHT_DYNSYM,   SHF_ALLOC },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_f[] =
+{
+  { ".fini",           5,  0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+  { ".fini_array",    11,  0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_g[] =
+{
+  { ".gnu.linkonce.b",15, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
   { ".got",            4,  0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
-  { ".hash",           5,  0, SHT_HASH,     SHF_ALLOC },
-  { ".interp",         7,  0, SHT_PROGBITS, 0 },
-  { ".plt",            4,  0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
-  { ".shstrtab",       9,  0, SHT_STRTAB,   0 },
-  { ".strtab",         7,  0, SHT_STRTAB,   0 },
-  { ".symtab",         7,  0, SHT_SYMTAB,   0 },
   { ".gnu.version",   12,  0, SHT_GNU_versym, 0 },
   { ".gnu.version_d", 14,  0, SHT_GNU_verdef, 0 },
   { ".gnu.version_r", 14,  0, SHT_GNU_verneed, 0 },
+  { ".gnu.liblist",   12,  0, SHT_GNU_LIBLIST, SHF_ALLOC },
+  { ".gnu.conflict",  13,  0, SHT_RELA,     SHF_ALLOC },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_h[] =
+{
+  { ".hash",           5,  0, SHT_HASH,     SHF_ALLOC },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_i[] =
+{
+  { ".init",           5,  0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+  { ".init_array",    11,  0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+  { ".interp",         7,  0, SHT_PROGBITS, 0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_l[] =
+{
+  { ".line",           5,  0, SHT_PROGBITS, 0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_n[] =
+{
   { ".note.GNU-stack",15,  0, SHT_PROGBITS, 0 },
   { ".note",           5, -1, SHT_NOTE,     0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_p[] =
+{
+  { ".preinit_array", 14,  0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+  { ".plt",            4,  0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_r[] =
+{
+  { ".rodata",         7, -2, SHT_PROGBITS, SHF_ALLOC },
+  { ".rodata1",        8,  0, SHT_PROGBITS, SHF_ALLOC },
   { ".rela",           5, -1, SHT_RELA,     0 },
   { ".rel",            4, -1, SHT_REL,      0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const special_sections_s[] =
+{
+  { ".shstrtab",       9,  0, SHT_STRTAB,   0 },
+  { ".strtab",         7,  0, SHT_STRTAB,   0 },
+  { ".symtab",         7,  0, SHT_SYMTAB,   0 },
   { ".stabstr",        5,  3, SHT_STRTAB,   0 },
-  { ".gnu.liblist",   12,  0, SHT_GNU_LIBLIST, SHF_ALLOC },
-  { ".gnu.conflict",  13,  0, SHT_RELA,     SHF_ALLOC },
   { NULL,              0,  0, 0,            0 }
 };
 
+static struct bfd_elf_special_section const special_sections_t[] =
+{
+  { ".text",           5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+  { ".tbss",           5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE + SHF_TLS },
+  { ".tdata",          6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *special_sections [27] =
+{
+  NULL,                                /* 'a' */
+  special_sections_b,          /* 'b' */
+  special_sections_c,          /* 'b' */
+  special_sections_d,          /* 'd' */
+  NULL,                                /* 'e' */
+  special_sections_f,          /* 'f' */
+  special_sections_g,          /* 'g' */
+  special_sections_h,          /* 'h' */
+  special_sections_i,          /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  special_sections_l,          /* 'l' */
+  NULL,                                /* 'm' */
+  special_sections_n,          /* 'n' */
+  NULL,                                /* 'o' */
+  special_sections_p,          /* 'p' */
+  NULL,                                /* 'q' */
+  special_sections_r,          /* 'r' */
+  special_sections_s,          /* 's' */
+  special_sections_t,          /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
+
 static const struct bfd_elf_special_section *
 get_special_section (const char *name,
-                    const struct bfd_elf_special_section *special_sections,
+                    const struct bfd_elf_special_section **special_sections_p,
                     unsigned int rela)
 {
   int i;
-  int len = strlen (name);
+  int len;
+  const struct bfd_elf_special_section *special_sections;
+
+  if (name [0] == '.')
+    {
+      i = name [1] - 'a';
+      if (i < 0 || i > 25)
+       i = 26;
+    }
+  else
+    i = 26;
+
+  special_sections = special_sections_p [i];
+
+  if (!special_sections)
+    return special_sections;
+
+  len= strlen (name);
 
   for (i = 0; special_sections[i].prefix != NULL; i++)
     {
index 7fdcfb05752d24861281e4f302d37a80f88886f5..2e5ca4c612a14ca7ac60e2aeac51c676af5005cb 100644 (file)
@@ -6538,8 +6538,8 @@ elf32_arm_symbian_link_hash_table_create (bfd *abfd)
   return ret;
 }     
 
-static struct bfd_elf_special_section const 
-  elf32_arm_symbian_special_sections[]=
+static struct bfd_elf_special_section const
+  symbian_special_sections_d[]=
 {
   /* In a BPABI executable, the dynamic linking sections do not go in
      the loadable read-only segment.  The post-linker may wish to
@@ -6548,17 +6548,93 @@ static struct bfd_elf_special_section const
   { ".dynamic",        8,  0, SHT_DYNAMIC,  0 },
   { ".dynstr",         7,  0, SHT_STRTAB,   0 },
   { ".dynsym",         7,  0, SHT_DYNSYM,   0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  symbian_special_sections_g[]=
+{
+  /* In a BPABI executable, the dynamic linking sections do not go in
+     the loadable read-only segment.  The post-linker may wish to
+     refer to these sections, but they are not part of the final
+     program image.  */
   { ".got",            4,  0, SHT_PROGBITS, 0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  symbian_special_sections_h[]=
+{
+  /* In a BPABI executable, the dynamic linking sections do not go in
+     the loadable read-only segment.  The post-linker may wish to
+     refer to these sections, but they are not part of the final
+     program image.  */
   { ".hash",           5,  0, SHT_HASH,     0 },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  symbian_special_sections_i[]=
+{
   /* These sections do not need to be writable as the SymbianOS
      postlinker will arrange things so that no dynamic relocation is
      required.  */
   { ".init_array",    11,  0, SHT_INIT_ARRAY, SHF_ALLOC },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  symbian_special_sections_f[]=
+{
+  /* These sections do not need to be writable as the SymbianOS
+     postlinker will arrange things so that no dynamic relocation is
+     required.  */
   { ".fini_array",    11,  0, SHT_FINI_ARRAY, SHF_ALLOC },
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  symbian_special_sections_p[]=
+{
+  /* These sections do not need to be writable as the SymbianOS
+     postlinker will arrange things so that no dynamic relocation is
+     required.  */
   { ".preinit_array", 14,  0, SHT_PREINIT_ARRAY, SHF_ALLOC },
   { NULL,              0,  0, 0,            0 }
 };
 
+static struct bfd_elf_special_section const *
+  elf32_arm_symbian_special_sections[27]=
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  symbian_special_sections_d,  /* 'd' */
+  NULL,                                /* 'e' */
+  symbian_special_sections_f,  /* 'f' */
+  symbian_special_sections_g,  /* 'g' */
+  symbian_special_sections_h,  /* 'h' */
+  symbian_special_sections_i,  /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  symbian_special_sections_p,  /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  NULL,                                /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
+
 static void
 elf32_arm_symbian_begin_write_processing (bfd *abfd, 
                                          struct bfd_link_info *link_info
index 55c36f2fc8f1363c1fb441ee6fb7f9d779f2b720..d74b9f96d74e0ab210706d8a496e58dc705cbd9d 100644 (file)
@@ -4183,11 +4183,44 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
   return TRUE;
 }
 
-static struct bfd_elf_special_section const m32r_elf_special_sections[]=
+static struct bfd_elf_special_section const
+  m32r_elf_special_sections_s[] =
 {
   { ".sdata",   6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".sbss",    5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
-  { NULL,       0,  0, 0,            0 }
+  { NULL,              0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *
+  m32r_elf_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  m32r_elf_special_sections_s, /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
 };
 
 static bfd_boolean
index 8b5a38c2ac15458538c9336105d6288e946ceff9..aff4be6a2b7a804e161827904fa2644130cdd4ec 100644 (file)
@@ -1257,14 +1257,65 @@ m68hc11_elf_relax_delete_bytes (bfd *abfd, asection *sec,
      are located in .page0.
    - The .vectors is the section that represents the interrupt
      vectors.  */
-static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
+static struct bfd_elf_special_section const
+  m68hc11_special_sections_e[] =
 {
   { ".eeprom",   7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  m68hc11_special_sections_s[]=
+{
   { ".softregs", 9, 0, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  m68hc11_special_sections_p[]=
+{
   { ".page0",    6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  m68hc11_special_sections_v[]=
+{
   { ".vectors",  8, 0, SHT_PROGBITS, SHF_ALLOC },
   { NULL,        0, 0, 0,            0 }
 };
+
+static struct bfd_elf_special_section const *
+  elf32_m68hc11_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  m68hc11_special_sections_e,  /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  m68hc11_special_sections_p,  /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  m68hc11_special_sections_s,  /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  m68hc11_special_sections_v,  /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
 \f
 #define ELF_ARCH               bfd_arch_m68hc11
 #define ELF_MACHINE_CODE       EM_68HC11
index ecf2fd0641ea9eddfc4f0d221491f7b4d63caaf7..213ead23b76a2e760b38dd20d69042df7fa42535 100644 (file)
@@ -535,14 +535,65 @@ m68hc12_elf_set_mach_from_flags (bfd *abfd)
      Page0 accesses are faster on the M68HC12.
    - The .vectors is the section that represents the interrupt
      vectors.  */
-static struct bfd_elf_special_section const elf32_m68hc12_special_sections[]=
+static struct bfd_elf_special_section const
+  m68hc12_special_sections_e[] =
 {
   { ".eeprom",   7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  m68hc12_special_sections_s[]=
+{
   { ".softregs", 9, 0, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  m68hc12_special_sections_p[]=
+{
   { ".page0",    6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  m68hc12_special_sections_v[]=
+{
   { ".vectors",  8, 0, SHT_PROGBITS, SHF_ALLOC },
   { NULL,        0, 0, 0,            0 }
 };
+
+static struct bfd_elf_special_section const *
+  elf32_m68hc12_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  m68hc12_special_sections_e,  /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  m68hc12_special_sections_p,  /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  m68hc12_special_sections_s,  /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  m68hc12_special_sections_v,  /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
 \f
 #define ELF_ARCH               bfd_arch_m68hc12
 #define ELF_MACHINE_CODE       EM_68HC12
index f8f2b227c56c535718c2afc306c34ac7dc07c45c..d1787485390839dd80ef110b2479ed73c3e165e4 100644 (file)
@@ -662,13 +662,52 @@ mcore_elf_check_relocs (abfd, info, sec, relocs)
   return TRUE;
 }
 
-static struct bfd_elf_special_section const mcore_elf_special_sections[]=
+static struct bfd_elf_special_section const
+  mcore_special_sections_c [] =
 {
   { ".ctors",   6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  mcore_special_sections_d[]=
+{
   { ".dtors",   6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { NULL,       0,  0, 0,            0 }
 };
 
+static struct bfd_elf_special_section const *
+  mcore_elf_special_sections[27]=
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  mcore_special_sections_c,    /* 'c' */
+  mcore_special_sections_d,    /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  NULL,                                /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
+
 #define TARGET_BIG_SYM         bfd_elf32_mcore_big_vec
 #define TARGET_BIG_NAME                "elf32-mcore-big"
 #define TARGET_LITTLE_SYM       bfd_elf32_mcore_little_vec
index d88d66c80e1fd224ab4334291eeecf87e6ebf2f1..ecee78ac067fdf2cf571f1ea7c1f94bc24ae630d 100644 (file)
@@ -1736,18 +1736,69 @@ ppc_elf_additional_program_headers (bfd *abfd)
    that the linker doesn't crater when trying to make more than
    2 sections.  */
 
-static struct bfd_elf_special_section const ppc_elf_special_sections[]=
+static struct bfd_elf_special_section const
+  ppc_special_sections_p[] =
+{
+  { ".plt",              4,  0, SHT_NOBITS,   SHF_ALLOC + SHF_EXECINSTR },
+  { NULL,                0,  0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  ppc_special_sections_s[] =
 {
-  { ".tags",             5,  0, SHT_ORDERED,  SHF_ALLOC },
   { ".sdata",            6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".sbss",             5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
   { ".sdata2",           7, -2, SHT_PROGBITS, SHF_ALLOC },
   { ".sbss2",            6, -2, SHT_PROGBITS, SHF_ALLOC },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  ppc_special_sections_t[] =
+{
+  { ".tags",             5,  0, SHT_ORDERED,  SHF_ALLOC },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  ppc_special_sections_other[]=
+{
   { ".PPC.EMB.apuinfo", 16,  0, SHT_NOTE,     0 },
   { ".PPC.EMB.sdata0",  15,  0, SHT_PROGBITS, SHF_ALLOC },
   { ".PPC.EMB.sbss0",   14,  0, SHT_PROGBITS, SHF_ALLOC },
-  { ".plt",              4,  0, SHT_NOBITS,   SHF_ALLOC + SHF_EXECINSTR },
-  { NULL,                0,  0, 0,            0 }
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *
+  ppc_elf_special_sections[27]=
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  ppc_special_sections_p,      /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  ppc_special_sections_s,      /* 's' */
+  ppc_special_sections_t,      /* 's' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  ppc_special_sections_other,  /* other */
 };
 \f
 /* Very simple linked list structure for recording apuinfo values.  */
index fe85c52f24b89d871942d2931f34350fd3e93fe8..dac8bb4d4481d940625fb5339e64a6aae895c0f6 100644 (file)
@@ -754,10 +754,43 @@ sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
   return;
 }
 
-static struct bfd_elf_special_section const sh64_elf_special_sections[]=
+static struct bfd_elf_special_section const
+  sh64_special_sections_c[] =
 {
   { ".cranges", 8, 0, SHT_PROGBITS, 0 },
-  { NULL,       0, 0, 0,            0 }
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *
+  sh64_elf_special_sections[27]=
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  sh64_special_sections_c,     /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  NULL,                                /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
 };
 
 #undef TARGET_BIG_SYM
index 4fb41ed97773451cee2cb1c7916bf46acbbea1e7..00affbb0d8b39b08d58380de9da66033ea264abc 100644 (file)
@@ -3121,35 +3121,92 @@ v850_elf_relax_section (abfd, sec, link_info, again)
   goto finish;
 }
 
-static struct bfd_elf_special_section const v850_elf_special_sections[]=
+static struct bfd_elf_special_section const
+  v850_special_sections_c[]=
+{
+  { ".call_table_data", 16,  0, SHT_PROGBITS,     (SHF_ALLOC
+                                                   + SHF_WRITE) },
+  { ".call_table_text", 16,  0, SHT_PROGBITS,     (SHF_ALLOC + SHF_WRITE
+                                                   + SHF_EXECINSTR) },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  v850_special_sections_r[]=
 {
-  { ".sdata",            6, -2, SHT_PROGBITS,     (SHF_ALLOC + SHF_WRITE
-                                                   + SHF_V850_GPREL) },
   { ".rosdata",          8, -2, SHT_PROGBITS,     (SHF_ALLOC
                                                    + SHF_V850_GPREL) },
+  { ".rozdata",          8, -2, SHT_PROGBITS,     (SHF_ALLOC
+                                                   + SHF_V850_R0REL) },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  v850_special_sections_s[]=
+{
+  { ".sdata",            6, -2, SHT_PROGBITS,     (SHF_ALLOC + SHF_WRITE
+                                                   + SHF_V850_GPREL) },
   { ".sbss",             5, -2, SHT_NOBITS,       (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_GPREL) },
   { ".scommon",          8, -2, SHT_V850_SCOMMON, (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_GPREL) },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  v850_special_sections_t[]=
+{
   { ".tdata",            6, -2, SHT_PROGBITS,     (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_EPREL) },
   { ".tbss",             5, -2, SHT_NOBITS,       (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_EPREL) },
   { ".tcommon",          8, -2, SHT_V850_TCOMMON, (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_R0REL) },
+  { NULL,               0,   0, 0,                0 }
+};
+
+static struct bfd_elf_special_section const
+  v850_special_sections_z[]=
+{
   { ".zdata",            6, -2, SHT_PROGBITS,     (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_R0REL) },
-  { ".rozdata",          8, -2, SHT_PROGBITS,     (SHF_ALLOC
-                                                   + SHF_V850_R0REL) },
   { ".zbss",             5, -2, SHT_NOBITS,       (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_R0REL) },
   { ".zcommon",          8, -2, SHT_V850_ZCOMMON, (SHF_ALLOC + SHF_WRITE
                                                    + SHF_V850_R0REL) },
-  { ".call_table_data", 16,  0, SHT_PROGBITS,     (SHF_ALLOC
-                                                   + SHF_WRITE) },
-  { ".call_table_text", 16,  0, SHT_PROGBITS,     (SHF_ALLOC + SHF_WRITE
-                                                   + SHF_EXECINSTR) },
-  { NULL,               0,   0, 0,                0 }
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *
+  v850_elf_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  v850_special_sections_c,     /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  v850_special_sections_r,     /* 'r' */
+  v850_special_sections_s,     /* 's' */
+  v850_special_sections_t,     /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  v850_special_sections_z,     /* 'z' */
+  NULL                         /* other */
 };
 \f
 #define TARGET_LITTLE_SYM                      bfd_elf32_v850_vec
index b6b2959c39f24033fc19b7ec0756493f4f47b5cd..ebfaf64841caab0cf4db9459ba6e1bcc1c9c5979 100644 (file)
@@ -9479,14 +9479,58 @@ xtensa_callback_required_dependence (bfd *abfd,
 /* The default literal sections should always be marked as "code" (i.e.,
    SHF_EXECINSTR).  This is particularly important for the Linux kernel
    module loader so that the literals are not placed after the text.  */
-static struct bfd_elf_special_section const elf_xtensa_special_sections[]=
+static struct bfd_elf_special_section const
+  xtensa_special_sections_f[]=
 {
-  { ".literal",       8, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
-  { ".init.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
   { ".fini.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
   { NULL,             0, 0, 0,            0 }
 };
 
+static struct bfd_elf_special_section const
+  xtensa_special_sections_i[]=
+{
+  { ".init.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+  { NULL,             0, 0, 0,            0 }
+};
+static struct bfd_elf_special_section const
+  xtensa_special_sections_l[]=
+{
+  { ".literal",       8, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+  { NULL,             0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *
+  elf_xtensa_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  xtensa_special_sections_f,   /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  xtensa_special_sections_i,   /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  xtensa_special_sections_l,   /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  NULL,                                /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
+
 \f
 #ifndef ELF_ARCH
 #define TARGET_LITTLE_SYM              bfd_elf32_xtensa_le_vec
index 6b247348d99c70882e78a80e7bc9cb7333910e79..252af59c4cd5e0fe062522b183563729aa474556 100644 (file)
@@ -5370,13 +5370,46 @@ elf64_alpha_reloc_type_class (rela)
     }
 }
 \f
-static struct bfd_elf_special_section const elf64_alpha_special_sections[]=
+static struct bfd_elf_special_section const
+  alpha_special_sections_s[]=
 {
   { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
   { ".sbss",  5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
   { NULL,     0,  0, 0,            0 }
 };
 
+static struct bfd_elf_special_section const *
+  elf64_alpha_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  alpha_special_sections_s,    /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
+
 /* ECOFF swapping routines.  These are used when dealing with the
    .mdebug section, which is in the ECOFF debugging format.  Copied
    from elf32-mips.c.  */
index 1ca533b4e0d7836d667b15fc9e3c0117b30a93e6..9084f1fbb22cd4a41c597c397d83ed63b1ba9c93 100644 (file)
@@ -2671,13 +2671,52 @@ elf64_hppa_elf_get_symbol_type (elf_sym, type)
     return type;
 }
 
-static struct bfd_elf_special_section const elf64_hppa_special_sections[]=
+static struct bfd_elf_special_section const
+  hppa_special_sections_f[]=
 {
   { ".fini",    5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  hppa_special_sections_i[]=
+{
   { ".init",    5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { NULL,       0, 0, 0,            0 }
 };
 
+static struct bfd_elf_special_section const *
+  elf64_hppa_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  hppa_special_sections_f,     /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  hppa_special_sections_i,     /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  NULL,                                /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
+
 /* The hash bucket size is the standard one, namely 4.  */
 
 const struct elf_size_info hppa64_elf_size_info =
index 7ef6d1cdad10d1b087e678ae33ce3a52dd6ece4c..fa6b095a1f912a4e27d044801179daef19ebebb2 100644 (file)
@@ -2503,17 +2503,62 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
 
 /* Add extra PPC sections.  */
 
-static struct bfd_elf_special_section const ppc64_elf_special_sections[]=
+static struct bfd_elf_special_section const
+  ppc64_special_sections_p[]=
+{
+  { ".plt",     4,  0, SHT_NOBITS,   0 },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  ppc64_special_sections_s[]=
 {
   { ".sdata",   6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".sbss",    5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
-  { ".plt",     4,  0, SHT_NOBITS,   0 },
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const
+  ppc64_special_sections_t[]=
+{
   { ".toc",     4,  0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".toc1",    5,  0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
   { ".tocbss",  7,  0, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
   { NULL,       0,  0, 0,            0 }
 };
 
+static struct bfd_elf_special_section const *
+  ppc64_elf_special_sections[27]=
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  ppc64_special_sections_p,    /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  ppc64_special_sections_s,    /* 's' */
+  ppc64_special_sections_t,    /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
+
 struct _ppc64_elf_section_data
 {
   struct bfd_elf_section_data elf;
index 2b1278bba0410ec9f9cf658ded0732942ee94c69..c2679e3d1b9166b0ae92911927700e850b44e30a 100644 (file)
@@ -4063,10 +4063,43 @@ sh64_elf64_merge_symbol_attribute (struct elf_link_hash_entry *h,
   return;
 }
 
-static struct bfd_elf_special_section const sh64_elf64_special_sections[]=
+static struct bfd_elf_special_section const
+  sh64_special_sections_c[] =
 {
   { ".cranges", 8, 0, SHT_PROGBITS, 0 },
-  { NULL,       0, 0, 0,            0 }
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *
+  sh64_elf64_special_sections[27]=
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  sh64_special_sections_c,     /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  NULL,                                /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
 };
 
 #define TARGET_BIG_SYM         bfd_elf64_sh64_vec
index ca6e54d84ede2be50020baf65e8721c839881a7f..e64b1d398c46bd7369ba1bc6e7a8b2e74ff824c7 100644 (file)
@@ -4908,11 +4908,44 @@ elfNN_ia64_reloc_type_class (rela)
     }
 }
 
-static struct bfd_elf_special_section const elfNN_ia64_special_sections[]=
+static struct bfd_elf_special_section const
+  ia64_special_sections_s[]=
 {
   { ".sbss",  5, -1, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
   { ".sdata", 6, -1, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
-  { NULL,     0,  0, 0,            0 }
+  { NULL,        0, 0, 0,            0 }
+};
+
+static struct bfd_elf_special_section const *
+  elfNN_ia64_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  NULL,                                /* 'l' */
+  NULL,                                /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  ia64_special_sections_s,     /* 's' */
+  NULL,                                /* 't' */
+  NULL,                                /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
 };
 
 static bfd_boolean
index 2868ba9a06615de71b919e687d2bddf491ac6157..6e5d968a275a9b41779068fa449e327601a51812 100644 (file)
@@ -9892,13 +9892,63 @@ _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr)
   return TRUE;
 }
 
-struct bfd_elf_special_section const _bfd_mips_elf_special_sections[]=
+static struct bfd_elf_special_section const
+  mips_special_sections_l[]=
 {
-  { ".sdata",  6, -2, SHT_PROGBITS,   SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
-  { ".sbss",   5, -2, SHT_NOBITS,     SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
   { ".lit4",   5,  0, SHT_PROGBITS,   SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
   { ".lit8",   5,  0, SHT_PROGBITS,   SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
-  { ".ucode",  6,  0, SHT_MIPS_UCODE, 0 },
+  { NULL,      0,  0, 0,              0 }
+};
+
+static struct bfd_elf_special_section const
+  mips_special_sections_m[]=
+{
   { ".mdebug", 7,  0, SHT_MIPS_DEBUG, 0 },
   { NULL,      0,  0, 0,              0 }
 };
+
+static struct bfd_elf_special_section const
+  mips_special_sections_s[]=
+{
+  { ".sdata",  6, -2, SHT_PROGBITS,   SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+  { ".sbss",   5, -2, SHT_NOBITS,     SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+};
+
+static struct bfd_elf_special_section const
+  mips_special_sections_u[]=
+{
+  { ".ucode",  6,  0, SHT_MIPS_UCODE, 0 },
+  { NULL,      0,  0, 0,              0 }
+};
+
+struct bfd_elf_special_section const *
+  _bfd_mips_elf_special_sections[27] =
+{
+  NULL,                                /* 'a' */
+  NULL,                                /* 'b' */
+  NULL,                                /* 'c' */
+  NULL,                                /* 'd' */
+  NULL,                                /* 'e' */
+  NULL,                                /* 'f' */
+  NULL,                                /* 'g' */
+  NULL,                                /* 'h' */
+  NULL,                                /* 'i' */
+  NULL,                                /* 'j' */
+  NULL,                                /* 'k' */
+  mips_special_sections_l,     /* 'l' */
+  mips_special_sections_m,     /* 'm' */
+  NULL,                                /* 'n' */
+  NULL,                                /* 'o' */
+  NULL,                                /* 'p' */
+  NULL,                                /* 'q' */
+  NULL,                                /* 'r' */
+  mips_special_sections_s,     /* 'm' */
+  NULL,                                /* 't' */
+  mips_special_sections_u,     /* 'u' */
+  NULL,                                /* 'v' */
+  NULL,                                /* 'w' */
+  NULL,                                /* 'x' */
+  NULL,                                /* 'y' */
+  NULL,                                /* 'z' */
+  NULL                         /* other */
+};
index 042f74b9b51ee9f742213e13a5d21c8e45e4d272..6d9b34879007683faa80c87a04c809ab81ccd475 100644 (file)
@@ -126,7 +126,7 @@ extern bfd_boolean _bfd_mips_relax_section
 extern bfd_vma _bfd_mips_elf_sign_extend
   (bfd_vma, int);
 
-extern struct bfd_elf_special_section const _bfd_mips_elf_special_sections[];
+extern struct bfd_elf_special_section const *_bfd_mips_elf_special_sections[];
 #define elf_backend_name_local_section_symbols \
   _bfd_mips_elf_name_local_section_symbols
 #define elf_backend_special_sections _bfd_mips_elf_special_sections