PR30984, assertion fail elf.c:8485
authorAlan Modra <amodra@gmail.com>
Thu, 19 Oct 2023 22:21:20 +0000 (08:51 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 19 Oct 2023 22:27:34 +0000 (08:57 +1030)
PR 30984
* ldelf.c (ldelf_place_orphan): Don't allow bfd_abs_section as
a potential output section.

ld/ldelf.c

index d74354a96222b050d49445fdd03e7d7f82b9e682..6c2ad3f354fc4347473b3da453b5e2722a4c50a9 100644 (file)
@@ -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