bfd/
[deliverable/binutils-gdb.git] / ld / ldmain.c
index 91818e093d8b834fb2684810371b2fd5d3b99ac5..08a0ec4bc6b5a9ae25aab30da4a18e91c61ffb27 100644 (file)
@@ -291,6 +291,8 @@ main (argc, argv)
   link_info.emitrelocations = FALSE;
   link_info.task_link = FALSE;
   link_info.shared = FALSE;
+  link_info.pie = FALSE;
+  link_info.executable = FALSE;
   link_info.symbolic = FALSE;
   link_info.export_dynamic = FALSE;
   link_info.static_link = FALSE;
@@ -368,6 +370,9 @@ main (argc, argv)
        einfo (_("%P%F: -f may not be used without -shared\n"));
     }
 
+  if (! link_info.shared || link_info.pie)
+    link_info.executable = TRUE;
+
   /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols).  I
      don't see how else this can be handled, since in this case we
      must preserve all externally visible symbols.  */
This page took 0.024179 seconds and 4 git commands to generate.