* bfd/elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
authorAlan Modra <amodra@gmail.com>
Fri, 23 Aug 2002 04:23:37 +0000 (04:23 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 23 Aug 2002 04:23:37 +0000 (04:23 +0000)
dynamic section.
* bfd/elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.

bfd/ChangeLog
bfd/elf32-sh.c
bfd/elf64-sh64.c

index 9ada7fe814df8f71800c2906186e722491fa0dd4..5b95fe938cbce015320141df7b7758498a895e6b 100644 (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
index ecde70f6206f9bcba71aa030dc00439d28ff1f51..b31a2a6d88e4353875b81ae17e262029b30144c2 100644 (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;
     }
index b57cc0820bc6d78144576339531969ec762086c3..48e7e497b6840019e179b544259bdf1e9dbd1681 100644 (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;
     }