* elf32-ppc.c (LIS_11. LIS_12): Define.
[deliverable/binutils-gdb.git] / bfd / elf32-xtensa.c
index 7b4a3f0761c1080da15ddd5576468157df8a47f5..e4e5cc831c15642acb0e12766ba4778db8f82c7b 100644 (file)
@@ -1105,23 +1105,21 @@ elf_xtensa_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
     return FALSE;
 
   /* Create ".rela.got".  */
-  s = bfd_make_section (dynobj, ".rela.got");
+  s = bfd_make_section_with_flags (dynobj, ".rela.got", flags);
   if (s == NULL
-      || ! bfd_set_section_flags (dynobj, s, flags)
       || ! bfd_set_section_alignment (dynobj, s, 2))
     return FALSE;
 
   /* Create ".got.loc" (literal tables for use by dynamic linker).  */
-  s = bfd_make_section (dynobj, ".got.loc");
+  s = bfd_make_section_with_flags (dynobj, ".got.loc", flags);
   if (s == NULL
-      || ! bfd_set_section_flags (dynobj, s, flags)
       || ! bfd_set_section_alignment (dynobj, s, 2))
     return FALSE;
 
   /* Create ".xt.lit.plt" (literal table for ".got.plt*").  */
-  s = bfd_make_section (dynobj, ".xt.lit.plt");
+  s = bfd_make_section_with_flags (dynobj, ".xt.lit.plt",
+                                  noalloc_flags);
   if (s == NULL
-      || ! bfd_set_section_flags (dynobj, s, noalloc_flags)
       || ! bfd_set_section_alignment (dynobj, s, 2))
     return FALSE;
 
@@ -1151,17 +1149,16 @@ add_extra_plt_sections (bfd *dynobj, int count)
 
       sname = (char *) bfd_malloc (10);
       sprintf (sname, ".plt.%u", chunk);
-      s = bfd_make_section (dynobj, sname);
+      s = bfd_make_section_with_flags (dynobj, sname,
+                                      flags | SEC_CODE);
       if (s == NULL
-         || ! bfd_set_section_flags (dynobj, s, flags | SEC_CODE)
          || ! bfd_set_section_alignment (dynobj, s, 2))
        return FALSE;
 
       sname = (char *) bfd_malloc (14);
       sprintf (sname, ".got.plt.%u", chunk);
-      s = bfd_make_section (dynobj, sname);
+      s = bfd_make_section_with_flags (dynobj, sname, flags);
       if (s == NULL
-         || ! bfd_set_section_flags (dynobj, s, flags)
          || ! bfd_set_section_alignment (dynobj, s, 2))
        return FALSE;
     }
@@ -9341,9 +9338,9 @@ xtensa_get_property_section_name (asection *sec, const char *base_name)
       char *linkonce_kind = 0;
 
       if (strcmp (base_name, XTENSA_INSN_SEC_NAME) == 0) 
-       linkonce_kind = "x";
+       linkonce_kind = "x.";
       else if (strcmp (base_name, XTENSA_LIT_SEC_NAME) == 0) 
-       linkonce_kind = "p";
+       linkonce_kind = "p.";
       else if (strcmp (base_name, XTENSA_PROP_SEC_NAME) == 0)
        linkonce_kind = "prop.";
       else
@@ -9482,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
This page took 0.024813 seconds and 4 git commands to generate.