[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segm
From: |
amodra at gmail dot com |
Subject: |
[Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault] |
Date: |
Fri, 05 Apr 2024 01:04:48 +0000 |
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.
- [Bug ld/31608] New: collect2: fatal error: ld terminated with signal 11 [Segmentation fault], hjl.tools at gmail dot com, 2024/04/04
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault], hjl.tools at gmail dot com, 2024/04/04
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault], amodra at gmail dot com, 2024/04/04
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault], hjl.tools at gmail dot com, 2024/04/04
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault], sam at gentoo dot org, 2024/04/04
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault],
amodra at gmail dot com <=
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault], sam at gentoo dot org, 2024/04/04
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault], cvs-commit at gcc dot gnu.org, 2024/04/04
- [Bug ld/31608] collect2: fatal error: ld terminated with signal 11 [Segmentation fault], hjl.tools at gmail dot com, 2024/04/05