From: Alan Modra Date: Thu, 8 Jun 2023 00:48:01 +0000 (+0930) Subject: Re: _bfd_free_cached_info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09d757a5c2f8824ef687b9c6d7ad834f89a3cc17;p=binutils-gdb.git 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. --- 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