Re: _bfd_free_cached_info
authorAlan Modra <amodra@gmail.com>
Thu, 8 Jun 2023 00:48:01 +0000 (10:18 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 8 Jun 2023 01:01:45 +0000 (10:31 +0930)
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
bfd/elfnn-aarch64.c

index 9c0762a15efe5e0da10ac608a521f5a4bba1630c..0e9a7ff96c32b481cea52f93f4ac9b03c68ea9b8 100644 (file)
@@ -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"
index a75cd365a02f3dad2a27a6a52f3a4113972614ae..4592bd6da2773d4001c64b389c5d70153bfb77f4 100644 (file)
@@ -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