* bfd/elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize

dynamic section.
	* bfd/elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
This commit is contained in:
Alan Modra 2002-08-23 04:23:37 +00:00
parent dd039bc424
commit 957dcaa8ef
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
* bfd/elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
dynamic section.
* bfd/elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple

View File

@ -3895,7 +3895,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
return false;
}

View File

@ -3717,7 +3717,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info)
}
/* Allocate memory for the section contents. */
s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size);
if (s->contents == NULL && s->_raw_size != 0)
return false;
}