aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2014-08-05 16:17:15 +0100
committerMaciej W. Rozycki <macro@codesourcery.com>2014-08-05 16:19:09 +0100
commite034b2cc9d2125f80dabb698271a346cbcff8d76 (patch)
tree60279db20de2c318cbe8f124894bc24a63f797dd /bfd/elfxx-mips.c
parent7bfe824172e6bd8759f30b4f6b6fe2036845ec5b (diff)
downloadgdb-e034b2cc9d2125f80dabb698271a346cbcff8d76.zip
gdb-e034b2cc9d2125f80dabb698271a346cbcff8d76.tar.gz
gdb-e034b2cc9d2125f80dabb698271a346cbcff8d76.tar.bz2
MIPS: Fix a .pdr section linker buffer overrun
* elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's rawsize if changing size.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index a72ccc3..ee0204d 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;
}