* ldmain.c (main): Don't set EXEC_P if link_info.shared is set.
authorIan Lance Taylor <ian@airs.com>
Fri, 10 Mar 1995 20:26:49 +0000 (20:26 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 10 Mar 1995 20:26:49 +0000 (20:26 +0000)
ld/ChangeLog
ld/ldmain.c

index 1935b27288b969d7cd2c9ae84d3217ae9abac572..8d11623c0286f5eff05d02a29320803095a48436 100644 (file)
@@ -1,5 +1,7 @@
 Fri Mar 10 14:43:48 1995  Ian Lance Taylor  <ian@cygnus.com>
 
+       * ldmain.c (main): Don't set EXEC_P if link_info.shared is set.
+
        * ldlex.l: Return -lFILENAME as the token LNAME.
        * ldgram.y: Add token LNAME.
        (input_list): Treat LNAME like NAME, but pass it to
index 091f776f42281b4df2a166b3122d8192c92c66a7..5c534a43a38679aee1f1ccb4557fc51752f157c3 100644 (file)
@@ -228,7 +228,16 @@ main (argc, argv)
       if (isfile)
        ldfile_open_command_file (s);
       else
-       lex_redirect (s);
+       {
+         if (trace_file_tries)
+           {
+             info_msg ("using internal linker script:\n");
+             info_msg ("==================================================\n");
+             info_msg (s);
+             info_msg ("\n==================================================\n");
+           }
+         lex_redirect (s);
+       }
       parser_input = input_script;
       yyparse ();
     }
@@ -285,7 +294,7 @@ main (argc, argv)
        }
     }
 
-  if (link_info.relocateable)
+  if (link_info.relocateable || link_info.shared)
     output_bfd->flags &= ~EXEC_P;
   else
     output_bfd->flags |= EXEC_P;