diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2006-09-26 19:11:03 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2006-09-26 19:11:03 +0000 |
commit | 41f8ce693c4a04811bf47a8df83c1a376a9f34f4 (patch) | |
tree | 8f3b6410e9d2d58b4a36348a563a593ce8e272ce /bfd/elf.c | |
parent | 030cbcedf282f87e90e2248b61a0941b86df3b66 (diff) | |
download | gdb-41f8ce693c4a04811bf47a8df83c1a376a9f34f4.zip gdb-41f8ce693c4a04811bf47a8df83c1a376a9f34f4.tar.gz gdb-41f8ce693c4a04811bf47a8df83c1a376a9f34f4.tar.bz2 |
2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |