* elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
authorJoseph Myers <joseph@codesourcery.com>
Fri, 6 Feb 2009 14:11:00 +0000 (14:11 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 6 Feb 2009 14:11:00 +0000 (14:11 +0000)
.sbss handling.

bfd/ChangeLog
bfd/elfxx-mips.c

index de0f5960905a2daec7c043f790935623f3757bc1..b118fa2921d34f1d75b1ee79b9b9a5d2a38cb9fe 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-06  Joseph Myers  <joseph@codesourcery.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
+       .sbss handling.
+
 2009-02-04  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
index 5a345f4482a5ab253dbf9fd582851c6dacdab5e9..94d56be9671fbbec110bc188a8d34db8ebc3048e 100644 (file)
@@ -6249,6 +6249,13 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
     {
       const char *name = bfd_get_section_name (abfd, hdr->bfd_section);
 
+      /* .sbss is not handled specially here because the GNU/Linux
+        prelinker can convert .sbss from NOBITS to PROGBITS and
+        changing it back to NOBITS breaks the binary.  The entry in
+        _bfd_mips_elf_special_sections will ensure the correct flags
+        are set on .sbss if BFD creates it without reading it from an
+        input file, and without special handling here the flags set
+        on it in an input file will be followed.  */
       if (strcmp (name, ".sdata") == 0
          || strcmp (name, ".lit8") == 0
          || strcmp (name, ".lit4") == 0)
@@ -6256,11 +6263,6 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr)
          hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
          hdr->sh_type = SHT_PROGBITS;
        }
-      else if (strcmp (name, ".sbss") == 0)
-       {
-         hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
-         hdr->sh_type = SHT_NOBITS;
-       }
       else if (strcmp (name, ".srdata") == 0)
        {
          hdr->sh_flags |= SHF_ALLOC | SHF_MIPS_GPREL;
This page took 0.030849 seconds and 4 git commands to generate.