From: Maciej W. Rozycki Date: Tue, 5 Aug 2014 15:17:15 +0000 (+0100) Subject: MIPS: Fix a .pdr section linker buffer overrun X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e034b2cc9d2125f80dabb698271a346cbcff8d76;p=binutils-gdb.git MIPS: Fix a .pdr section linker buffer overrun * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's rawsize if changing size. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6085db85dba..679edd4138c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-08-05 Maciej W. Rozycki + + * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's + rawsize if changing size. + 2014-08-05 Alan Modra PR ld/17226 diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index a72ccc38b25..ee0204d8d6c 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -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; }