[binutils-gdb] PR30984, assertion fail elf.c:8485

Alan Modra amodra@sourceware.org
Thu Oct 19 22:47:35 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1b1b9bc05f8f6cde3956fb4d08f734de438f02a7

commit 1b1b9bc05f8f6cde3956fb4d08f734de438f02a7
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Oct 20 08:51:20 2023 +1030

    PR30984, assertion fail elf.c:8485
    
            PR 30984
            * ldelf.c (ldelf_place_orphan): Don't allow bfd_abs_section as
            a potential output section.

Diff:
---
 ld/ldelf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ld/ldelf.c b/ld/ldelf.c
index d74354a9622..6c2ad3f354f 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -2244,6 +2244,7 @@ ldelf_place_orphan (asection *s, const char *secname, int constraint)
 	   set, then it has been created by the linker, possibly as a
 	   result of a --section-start command line switch.  */
 	if (os->bfd_section != NULL
+	    && !bfd_is_abs_section (os->bfd_section)
 	    && (os->bfd_section->flags == 0
 		|| (((s->flags ^ os->bfd_section->flags)
 		     & (SEC_LOAD | SEC_ALLOC)) == 0


More information about the Binutils-cvs mailing list