MIPS: Fix a .pdr section linker buffer overrun
authorMaciej W. Rozycki <macro@codesourcery.com>
Tue, 5 Aug 2014 15:17:15 +0000 (16:17 +0100)
committerMaciej W. Rozycki <macro@codesourcery.com>
Tue, 5 Aug 2014 15:19:09 +0000 (16:19 +0100)
* elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
rawsize if changing size.

bfd/ChangeLog
bfd/elfxx-mips.c

index 6085db85dba720d24a1ee2611a3871c4d11b27ab..679edd4138cd3459e1c13641a3e269d6f1811759 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-05  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
+       rawsize if changing size.
+
 2014-08-05  Alan Modra  <amodra@gmail.com>
 
        PR ld/17226
index a72ccc38b2552f8b95115ce1120448f3b2c5b4f2..ee0204d8d6c8e4e547569e079b39e40ee8ccad77 100644 (file)
@@ -12380,6 +12380,8 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
   if (skip != 0)
     {
       mips_elf_section_data (o)->u.tdata = tdata;
+      if (o->rawsize == 0)
+       o->rawsize = o->size;
       o->size -= skip * PDR_SIZE;
       ret = TRUE;
     }
This page took 0.038224 seconds and 4 git commands to generate.