From 957dcaa8ef9a9eb3bbb347f666dcc64a24879371 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 23 Aug 2002 04:23:37 +0000 Subject: [PATCH] * bfd/elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize dynamic section. * bfd/elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-sh.c | 2 +- bfd/elf64-sh64.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9ada7fe814d..5b95fe938cb 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-08-23 Stephen Clarke + + * 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 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index ecde70f6206..b31a2a6d88e 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -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; } diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index b57cc0820bc..48e7e497b68 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -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; } -- 2.30.2