https://sourceware.org/bugzilla/show_bug.cgi?id=31608
--- Comment #4 from Alan Modra <amodra at gmail dot com> --- Like this. I don't see this problem myself, so kind of untested. You probably need a libstdc++.so that has been built with -ffunction-sections and thus a large enough .shstrtab to be mmaped. diff --git a/bfd/opncls.c b/bfd/opncls.c index 5efec37175e..dda3f1ef300 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -172,7 +172,13 @@ _bfd_delete_bfd (bfd *abfd) munmap (elf_section_data (sec)->contents_addr, elf_section_data (sec)->contents_size); } +#endif + + /* Give the target _bfd_free_cached_info a chance to free memory. */ + if (abfd->memory && abfd->xvec) + bfd_free_cached_info (abfd); +#ifdef USE_MMAP struct bfd_mmapped *mmapped, *next; for (mmapped = abfd->mmapped; mmapped != NULL; mmapped = next) { @@ -184,10 +190,6 @@ _bfd_delete_bfd (bfd *abfd) } #endif - /* Give the target _bfd_free_cached_info a chance to free memory. */ - if (abfd->memory && abfd->xvec) - bfd_free_cached_info (abfd); - /* The target _bfd_free_cached_info may not have done anything.. */ if (abfd->memory) { -- You are receiving this mail because: You are on the CC list for the bug.