mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
Allocate elf_segment_map with bfd_zalloc
* elf.c (rewrite_elf_program_header): Allocate elf_segment_map with bfd_zalloc, instead of bfd_alloc.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2012-11-13 Joe Seymour <jseymour@codesourcery.com>
|
||||||
|
|
||||||
|
* elf.c (rewrite_elf_program_header): Allocate elf_segment_map
|
||||||
|
with bfd_zalloc, instead of bfd_alloc.
|
||||||
|
|
||||||
2012-11-09 Nick Clifton <nickc@redhat.com>
|
2012-11-09 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* Makefile.am (ALL_MACHINES): Add cpu-v850-rh850.lo.
|
* Makefile.am (ALL_MACHINES): Add cpu-v850-rh850.lo.
|
||||||
|
@ -6043,7 +6043,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
|
|||||||
and carry on looping. */
|
and carry on looping. */
|
||||||
amt = sizeof (struct elf_segment_map);
|
amt = sizeof (struct elf_segment_map);
|
||||||
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
|
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
|
||||||
map = (struct elf_segment_map *) bfd_alloc (obfd, amt);
|
map = (struct elf_segment_map *) bfd_zalloc (obfd, amt);
|
||||||
if (map == NULL)
|
if (map == NULL)
|
||||||
{
|
{
|
||||||
free (sections);
|
free (sections);
|
||||||
|
Reference in New Issue
Block a user