Module Name: src
Committed By: bouyer
Date: Tue May 5 18:23:10 UTC 2009
Modified Files:
src/gnu/dist/binutils/bfd [netbsd-5]: elf32-vax.c
Log Message:
Pull up following revision(s) (requested by mhitch in ticket #738):
gnu/dist/binutils/bfd/elf32-vax.c: revision 1.9
Allocate relocation section using bfd_zalloc() to ensure no garbage
relocations when not all the entries are used. Fixes PR port-vax/39182.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.18.1 src/gnu/dist/binutils/bfd/elf32-vax.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/gnu/dist/binutils/bfd/elf32-vax.c
diff -u src/gnu/dist/binutils/bfd/elf32-vax.c:1.7 src/gnu/dist/binutils/bfd/elf32-vax.c:1.7.18.1
--- src/gnu/dist/binutils/bfd/elf32-vax.c:1.7 Thu Apr 19 19:50:59 2007
+++ src/gnu/dist/binutils/bfd/elf32-vax.c Tue May 5 18:23:09 2009
@@ -1310,7 +1310,12 @@
}
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
+ /* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
+ Unused entries should be reclaimed before the section's contents
+ are written out, but at the moment this does not happen. Thus in
+ order to prevent writing out garbage, we initialise the section's
+ contents to zero. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL && s->size != 0)
return FALSE;
}