From 09d757a5c2f8824ef687b9c6d7ad834f89a3cc17 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 8 Jun 2023 10:18:01 +0930 Subject: [PATCH] Re: _bfd_free_cached_info ELF targets with target-specific free_cache_info functions need to call _bfd_elf_free_cached_info, not _bfd_generic_bfd_free_cached_info. * elf64-ppc.c (ppc64_elf_free_cached_info): Call _bfd_elf_free_cached_info. * elfnn-aarch64.c (elfNN_aarch64_bfd_free_cached_info): Likewise. --- bfd/elf64-ppc.c | 2 +- bfd/elfnn-aarch64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 9c0762a15ef..0e9a7ff96c3 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -18406,7 +18406,7 @@ ppc64_elf_free_cached_info (bfd *abfd) if (opd->reloc_count == 0) free (ppc64_elf_section_data (opd)->u.opd.u.contents); - return _bfd_generic_bfd_free_cached_info (abfd); + return _bfd_elf_free_cached_info (abfd); } #include "elf64-target.h" diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index a75cd365a02..4592bd6da27 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -8742,7 +8742,7 @@ elfNN_aarch64_bfd_free_cached_info (bfd *abfd) bfd_map_over_sections (abfd, unrecord_section_via_map_over_sections, NULL); - return _bfd_generic_bfd_free_cached_info (abfd); + return _bfd_elf_free_cached_info (abfd); } /* Create dynamic sections. This is different from the ARM backend in that -- 2.30.2