+2009-08-31 Jan Beulich <jbeulich@novell.com>
+
+ * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
+ * elf.c (bfd_elf_get_default_section_type): New.
+ (elf_fake_sections): Use bfd_elf_get_default_section_type.
+
2009-08-30 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
extern bfd_boolean _bfd_elf_is_function_type (unsigned int);
+extern int bfd_elf_get_default_section_type (flagword);
+
extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section
(bfd * abfd, asection * section);
return TRUE;
}
+/* Return the default section type based on the passed in section flags. */
+
+int
+bfd_elf_get_default_section_type (flagword flags)
+{
+ if ((flags & SEC_ALLOC) != 0
+ && ((flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0
+ || (flags & SEC_NEVER_LOAD) != 0))
+ return SHT_NOBITS;
+ return SHT_PROGBITS;
+}
+
/* Set up an ELF internal section header for a section. */
static void
asect->flags. */
if ((asect->flags & SEC_GROUP) != 0)
sh_type = SHT_GROUP;
- else if ((asect->flags & SEC_ALLOC) != 0
- && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
- || (asect->flags & SEC_NEVER_LOAD) != 0))
- sh_type = SHT_NOBITS;
else
- sh_type = SHT_PROGBITS;
+ sh_type = bfd_elf_get_default_section_type (asect->flags);
if (this_hdr->sh_type == SHT_NULL)
this_hdr->sh_type = sh_type;
+2009-08-31 Jan Beulich <jbeulich@novell.com>
+
+ * config/obj-elf.c (obj_elf_change_section): Set default type
+ by calling bfd_elf_get_default_section_type.
+
2009-08-31 Jie Zhang <jie.zhang@analog.com>
* config/bfin-aux.h: Change format from DOS to UNIX.
{
symbolS *secsym;
+ if (type == SHT_NULL)
+ type = bfd_elf_get_default_section_type (flags);
elf_section_type (sec) = type;
elf_section_flags (sec) = attr;
+2009-08-31 Jan Beulich <jbeulich@novell.com>
+
+ * gas/elf/section5.l: Remove no longer issued warning pattern.
+
2009-08-29 Matt Fleming <matt@console-pimps.org>
* gas/sh/sign-extension.d: New file.
.*:7: Warning: .*
.*:7: Warning: .*
.*:10: Warning: .*
-.*:13: Warning: .*
.*:16: Warning: .*
.*:18: Warning: .*
.*:20: Warning: .*