This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix uninitialised VAX .got and .got.plt section
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 16 Jun 2014 13:10:44 +0930
- Subject: Fix uninitialised VAX .got and .got.plt section
- Authentication-results: sourceware.org; auth=none
- References: <20140614004846 dot GI7683 at bubble dot grove dot modra dot org>
Cures these failures with MALLOC_PERTURB_=1
FAIL: GOT test (executable)
FAIL: GOT test (shared library)
FAIL: VAX export class call relocation test
FAIL: VAX export class data relocation test
* elf32-vax.c (elf_vax_size_dynamic_sections): Clear linker
created sections.
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index c28caca..1f41867 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1221,7 +1221,7 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
continue;
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
--
Alan Modra
Australia Development Lab, IBM