aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2009-02-06 14:11:00 +0000
committerJoseph Myers <joseph@codesourcery.com>2009-02-06 14:11:00 +0000
commit2d0f9ad979091f0f49a4a5dc3d4536f3b5071707 (patch)
treea367969270a126e7584b2c72300398ab16e1c7b9 /bfd/elfxx-mips.c
parent8dc2430f5067b632a4dbc9a56ef03edb335ef4e5 (diff)
downloadgdb-2d0f9ad979091f0f49a4a5dc3d4536f3b5071707.zip
gdb-2d0f9ad979091f0f49a4a5dc3d4536f3b5071707.tar.gz
gdb-2d0f9ad979091f0f49a4a5dc3d4536f3b5071707.tar.bz2
* elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
.sbss handling.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 5a345f4..94d56be 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -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;