bfin: Don't create .interp section for info->nointerp
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 9 Oct 2017 19:45:57 +0000 (12:45 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 9 Oct 2017 19:45:57 +0000 (12:45 -0700)
Don't create the .interp section with "ld --no-dynamic-linker".  This
fixed:

FAIL: PR ld/20828 forcibly exported symbol version without section GC
FAIL: PR ld/20828 forcibly exported symbol version with section GC
FAIL: readelf version information

* elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
.interp section with "ld --no-dynamic-linker".

bfd/ChangeLog
bfd/elf32-bfin.c

index c334e53307bb256b696945fc1b0d38edf3daff18..c14a3bc491032f8725b00a8a9f3b2196d81a7f39 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
+       .interp section with "ld --no-dynamic-linker".
+
 2017-10-09  Alan Modra  <amodra@gmail.com>
 
        PR 22212
index 09e50ce6166ac9120c4620c96e3c6c6644a69668..94c7c2a900b80e75b9acc774231b606d78250684 100644 (file)
@@ -5336,7 +5336,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (bfd_link_executable (info))
+      if (bfd_link_executable (info) && !info->nointerp)
        {
          s = bfd_get_linker_section (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
This page took 0.037678 seconds and 4 git commands to generate.