ARM STM32L4XX erratum test failure with MALLOC_PERTURB_
authorAlan Modra <amodra@gmail.com>
Wed, 22 May 2019 08:59:20 +0000 (18:29 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 22 May 2019 09:03:39 +0000 (18:33 +0930)
* elf32-arm.c (arm_allocate_glue_section_space): Clear section
contents.

bfd/ChangeLog
bfd/elf32-arm.c

index 4f523fa3ae1a9217499a19cbe2b5ea11a33434fa..f2b2ec5bc07cc08cd155a6ddfe8cb29dd4ac9745 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-22  Alan Modra  <amodra@gmail.com>
+
+       * elf32-arm.c (arm_allocate_glue_section_space): Clear section
+       contents.
+
 2019-05-22  Alan Modra  <amodra@gmail.com>
 
        * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
index 7f085269c45d31bf797384806e82b8a614490289..d35d609c65218f185ca267d79533644378834ca6 100644 (file)
@@ -7222,7 +7222,7 @@ arm_allocate_glue_section_space (bfd * abfd, bfd_size_type size, const char * na
   s = bfd_get_linker_section (abfd, name);
   BFD_ASSERT (s != NULL);
 
-  contents = (bfd_byte *) bfd_alloc (abfd, size);
+  contents = (bfd_byte *) bfd_zalloc (abfd, size);
 
   BFD_ASSERT (s->size == size);
   s->contents = contents;