From 41f8ce693c4a04811bf47a8df83c1a376a9f34f4 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 26 Sep 2006 19:11:03 +0000 Subject: [PATCH] 2006-09-26 H.J. Lu PR binutils/3262 * elf.c (rewrite_elf_program_header): Use bfd_zalloc instead of bfd_alloc to allocate segment map. (copy_elf_program_header): Likewise. --- bfd/ChangeLog | 7 +++++++ bfd/elf.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 96307dd252a..a2a6470eb1e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2006-09-26 H.J. Lu + + PR binutils/3262 + * elf.c (rewrite_elf_program_header): Use bfd_zalloc instead of + bfd_alloc to allocate segment map. + (copy_elf_program_header): Likewise. + 2006-09-26 Mark Shinwell Joseph Myers Ian Lance Taylor diff --git a/bfd/elf.c b/bfd/elf.c index 73a8713e218..87c3cc7cb17 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -5401,7 +5401,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) all of the sections we have selected. */ amt = sizeof (struct elf_segment_map); amt += ((bfd_size_type) section_count - 1) * sizeof (asection *); - map = bfd_alloc (obfd, amt); + map = bfd_zalloc (obfd, amt); if (map == NULL) return FALSE; @@ -5796,7 +5796,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) amt = sizeof (struct elf_segment_map); if (section_count != 0) amt += ((bfd_size_type) section_count - 1) * sizeof (asection *); - map = bfd_alloc (obfd, amt); + map = bfd_zalloc (obfd, amt); if (map == NULL) return FALSE; -- 2.30.2