]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/emultempl/elf32.em
SHF_GNU_MBIND requires ELFOSABI_GNU
[thirdparty/binutils-gdb.git] / ld / emultempl / elf32.em
index f3c6e3adeee5d78b6c0a8b764eed299be1424fc4..5cdd1bd667b07598fb4f5fd2489f716dc5c97d24 100644 (file)
@@ -2131,6 +2131,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s,
       && elfinput
       && elfoutput
       && (s->flags & SEC_ALLOC) != 0
+      && (elf_tdata (s->owner)->has_gnu_osabi & elf_gnu_osabi_mbind) != 0
       && (elf_section_flags (s) & SHF_GNU_MBIND) != 0)
     {
       /* Find the output mbind section with the same type, attributes
@@ -2168,6 +2169,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s,
        secname = ".mbind.rodata";
       else
        secname = ".mbind.text";
+      elf_tdata (link_info.output_bfd)->has_gnu_osabi |= elf_gnu_osabi_mbind;
     }
 
   /* Look through the script to see where to place this section.  The