+2003-09-23 Alan Modra <alan@modra.org>
+
+ * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
+ type of prefix_length and suffix_length to int. Rename "attributes"
+ to "attr". Comment.
+ (_bfd_elf_get_sec_type_attr): Update prototype.
+ * elf.c (get_special_section): Rewrite.
+ (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
+ attr and type pointers.
+ (_bfd_elf_new_section_hook): Adjust for above.
+ (special_sections): Merge suffix with prefix. Set
+ prefix_length for all entries. Set suffix_length appropriately.
+ * 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-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.
+ * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
+
2003-09-21 Daniel Jacobowitz <drow@mvista.com>
* elf64-alpha.c (elf64_alpha_create_got_section): Initialize
struct bfd_elf_special_section
{
const char *prefix;
- size_t prefix_length;
- const char *suffix;
- size_t suffix_length;
+ int prefix_length;
+ /* 0 means name must match PREFIX exactly.
+ -1 means name must start with PREFIX followed by an arbitrary string.
+ -2 means name must match PREFIX exactly or consist of PREFIX followed
+ by a dot then anything.
+ > 0 means name must start with the first PREFIX_LENGTH chars of
+ PREFIX and finish with the last SUFFIX_LENGTH chars of PREFIX. */
+ int suffix_length;
int type;
- int attributes;
+ int attr;
};
struct elf_backend_data
(bfd *, asection *);
extern bfd_boolean _bfd_elf_init_reloc_shdr
(bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean);
-extern bfd_boolean _bfd_elf_get_sec_type_attr
- (bfd *, const char *, int *, int *);
+extern const struct bfd_elf_special_section *_bfd_elf_get_sec_type_attr
+ (bfd *, const char *);
/* If the target doesn't have reloc handling written yet: */
extern void _bfd_elf_no_info_to_howto
static struct bfd_elf_special_section const special_sections[] =
{
- { ".bss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".comment", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".data", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".data1", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".debug", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".fini", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".line", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".rodata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".rodata1", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".tbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { ".tdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { ".text", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init_array", 0, NULL, 0,
- SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".fini_array", 0, NULL, 0,
- SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".preinit_array", 0, NULL, 0,
- SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".debug_line", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".debug_info", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".debug_abbrev", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".debug_aranges", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".dynamic", 0, NULL, 0,
- SHT_DYNAMIC, SHF_ALLOC },
- { ".dynstr", 0, NULL, 0,
- SHT_STRTAB, SHF_ALLOC },
- { ".dynsym", 0, NULL, 0,
- SHT_DYNSYM, SHF_ALLOC },
- { ".got", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".hash", 0, NULL, 0,
- SHT_HASH, SHF_ALLOC },
- { ".interp", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".plt", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".shstrtab", 0, NULL, 0,
- SHT_STRTAB, 0 },
- { ".strtab", 0, NULL, 0,
- SHT_STRTAB, 0 },
- { ".symtab", 0, NULL, 0,
- SHT_SYMTAB, 0 },
- { ".gnu.version", 0, NULL, 0,
- SHT_GNU_versym, 0 },
- { ".gnu.version_d", 0, NULL, 0,
- SHT_GNU_verdef, 0 },
- { ".gnu.version_r", 0, NULL, 0,
- SHT_GNU_verneed, 0 },
- { ".note", 5, NULL, 0,
- SHT_NOTE, 0 },
- { ".rela", 5, NULL, 0,
- SHT_RELA, 0 },
- { ".rel", 4, NULL, 0,
- SHT_REL, 0 },
- { ".stab", 5, "str", 3,
- SHT_STRTAB, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".bss", 4, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".comment", 8, 0, SHT_PROGBITS, 0 },
+ { ".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 },
+ { ".debug_aranges", 14, 0, SHT_PROGBITS, 0 },
+ { ".dynamic", 8, 0, SHT_DYNAMIC, SHF_ALLOC },
+ { ".dynstr", 7, 0, SHT_STRTAB, SHF_ALLOC },
+ { ".dynsym", 7, 0, SHT_DYNSYM, SHF_ALLOC },
+ { ".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 },
+ { ".note", 5, -1, SHT_NOTE, 0 },
+ { ".rela", 5, -1, SHT_RELA, 0 },
+ { ".rel", 4, -1, SHT_REL, 0 },
+ { ".stabstr", 5, 3, SHT_STRTAB, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section *
unsigned int rela)
{
int i;
+ int len = strlen (name);
for (i = 0; special_sections[i].prefix != NULL; i++)
- if (((special_sections[i].prefix_length
- && strncmp (name, special_sections[i].prefix,
- special_sections[i].prefix_length) == 0
- && (! special_sections[i].suffix_length
- || strcmp ((name + strlen (name)
- - special_sections[i].suffix_length),
- special_sections[i].suffix) == 0))
- || strcmp (name, special_sections[i].prefix) == 0)
- && (rela || special_sections[i].type != SHT_RELA))
+ {
+ int suffix_len;
+ int prefix_len = special_sections[i].prefix_length;
+
+ if (len < prefix_len)
+ continue;
+ if (memcmp (name, special_sections[i].prefix, prefix_len) != 0)
+ continue;
+
+ suffix_len = special_sections[i].suffix_length;
+ if (suffix_len <= 0)
+ {
+ if (name[prefix_len] != 0)
+ {
+ if (suffix_len == 0)
+ continue;
+ if (name[prefix_len] != '.'
+ && (suffix_len == -2
+ || (rela && special_sections[i].type == SHT_REL)))
+ continue;
+ }
+ }
+ else
+ {
+ if (len < prefix_len + suffix_len)
+ continue;
+ if (memcmp (name + len - suffix_len,
+ special_sections[i].prefix + prefix_len,
+ suffix_len) != 0)
+ continue;
+ }
return &special_sections[i];
+ }
return NULL;
}
-bfd_boolean
-_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name, int *type, int *attr)
+const struct bfd_elf_special_section *
+_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name)
{
- bfd_boolean found = FALSE;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct bfd_elf_special_section *ssect = NULL;
/* See if this is one of the special sections. */
if (name)
{
- const struct bfd_elf_special_section *ssect = NULL;
unsigned int rela = bed->default_use_rela_p;
if (bed->special_sections)
if (! ssect)
ssect = get_special_section (name, special_sections, rela);
-
- if (ssect)
- {
- *type = ssect->type;
- *attr = ssect->attributes;
- found = TRUE;
- }
}
- return found;
+ return ssect;
}
bfd_boolean
_bfd_elf_new_section_hook (bfd *abfd, asection *sec)
{
struct bfd_elf_section_data *sdata;
- int type, attr;
+ const struct bfd_elf_special_section *ssect;
sdata = (struct bfd_elf_section_data *) sec->used_by_bfd;
if (sdata == NULL)
}
elf_section_type (sec) = SHT_NULL;
- if (sec->name && _bfd_elf_get_sec_type_attr (abfd, sec->name,
- &type, &attr))
+ ssect = _bfd_elf_get_sec_type_attr (abfd, sec->name);
+ if (ssect != NULL)
{
- elf_section_type (sec) = type;
- elf_section_flags (sec) = attr;
+ elf_section_type (sec) = ssect->type;
+ elf_section_flags (sec) = ssect->attr;
}
/* Indicate whether or not this section should use RELA relocations. */
static struct bfd_elf_special_section const m32r_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
\f
#define ELF_ARCH bfd_arch_m32r
vectors. */
static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
{
- { ".eeprom", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".softregs", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".page0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".vectors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
\f
#define ELF_ARCH bfd_arch_m68hc11
vectors. */
static struct bfd_elf_special_section const elf32_m68hc12_special_sections[]=
{
- { ".eeprom", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".softregs", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".page0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".vectors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
\f
#define ELF_ARCH bfd_arch_m68hc12
static struct bfd_elf_special_section const mcore_elf_special_sections[]=
{
- { ".ctors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".dtors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".ctors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".dtors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_BIG_SYM bfd_elf32_mcore_big_vec
static struct bfd_elf_special_section const ppc_elf_special_sections[]=
{
- { ".tags", 0, NULL, 0,
- SHT_ORDERED, SHF_ALLOC },
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".sdata2", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".sbss2", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".PPC.EMB.apuinfo", 0, NULL, 0,
- SHT_NOTE, 0 },
- { ".PPC.EMB.sdata0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".PPC.EMB.sbss0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".plt", 0, NULL, 0,
- SHT_NOBITS, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".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 },
+ { ".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 }
};
\f
#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
static struct bfd_elf_special_section const sh64_elf_special_sections[]=
{
- { ".cranges", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".cranges", 8, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
#undef TARGET_BIG_SYM
static struct bfd_elf_special_section const v850_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
- { ".rosdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_V850_GPREL },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
- { ".scommon", 0, NULL, 0,
- SHT_V850_SCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
- { ".tdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
- { ".tbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
- { ".tcommon", 0, NULL, 0,
- SHT_V850_TCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".zdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".rozdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_V850_R0REL },
- { ".zbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".zcommon", 0, NULL, 0,
- SHT_V850_ZCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".call_table_data", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".call_table_text", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_GPREL) },
+ { ".rosdata", 8, -2, SHT_PROGBITS, (SHF_ALLOC
+ + 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) },
+ { ".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) },
+ { ".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 }
};
\f
#define TARGET_LITTLE_SYM bfd_elf32_v850_vec
module loader so that the literals are not placed after the text. */
static struct bfd_elf_special_section const elf_xtensa_special_sections[]=
{
- { ".literal", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init.literal", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".fini.literal", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".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 }
};
\f
\f
static struct bfd_elf_special_section const elf64_alpha_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".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 }
};
/* ECOFF swapping routines. These are used when dealing with the
static struct bfd_elf_special_section const elf64_hppa_special_sections[]=
{
- { ".fini", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".init", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
/* The hash bucket size is the standard one, namely 4. */
static struct bfd_elf_special_section const ppc64_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".plt", 0, NULL, 0,
- SHT_NOBITS, 0 },
- { ".toc", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".toc1", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".tocbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".plt", 4, 0, SHT_NOBITS, 0 },
+ { ".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 }
};
struct _ppc64_elf_section_data
static struct bfd_elf_special_section const sh64_elf64_special_sections[]=
{
- { ".cranges", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".cranges", 8, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_BIG_SYM bfd_elf64_sh64_vec
static struct bfd_elf_special_section const elfNN_ia64_special_sections[]=
{
- { ".sbss", 5, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { ".sdata", 6, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".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 }
};
static bfd_boolean
struct bfd_elf_special_section const _bfd_mips_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".lit4", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".lit8", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".ucode", 0, NULL, 0,
- SHT_MIPS_UCODE, 0 },
- { ".mdebug", 0, NULL, 0,
- SHT_MIPS_DEBUG, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".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 },
+ { ".mdebug", 7, 0, SHT_MIPS_DEBUG, 0 },
+ { NULL, 0, 0, 0, 0 }
};