From b0f4fbf81a1cf67d49558b2e8890e5c8628f8403 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 22 May 2019 18:29:20 +0930 Subject: [PATCH] ARM STM32L4XX erratum test failure with MALLOC_PERTURB_ * elf32-arm.c (arm_allocate_glue_section_space): Clear section contents. --- bfd/ChangeLog | 5 +++++ bfd/elf32-arm.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4f523fa3ae..f2b2ec5bc0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2019-05-22 Alan Modra + + * elf32-arm.c (arm_allocate_glue_section_space): Clear section + contents. + 2019-05-22 Alan Modra * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 7f085269c4..d35d609c65 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -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; -- 2.34.1