Fix problems with finishing a dummy function call on simulators.
[deliverable/binutils-gdb.git] / ld / plugin.c
index b48ce86a6f1ecc4d1561171d212a8526d91270c2..81bf14348c3de139602063fe8baa36b85751053e 100644 (file)
@@ -772,10 +772,14 @@ get_symbols_v2 (const void *handle, int nsyms, struct ld_plugin_symbol *syms)
 static enum ld_plugin_status
 add_input_file (const char *pathname)
 {
+  lang_input_statement_type *is;
+
   ASSERT (called_plugin);
-  if (!lang_add_input_file (xstrdup (pathname), lang_input_file_is_file_enum,
-                           NULL))
+  is = lang_add_input_file (xstrdup (pathname), lang_input_file_is_file_enum,
+                           NULL);
+  if (!is)
     return LDPS_ERR;
+  is->flags.lto_output = 1;
   return LDPS_OK;
 }
 
@@ -783,10 +787,14 @@ add_input_file (const char *pathname)
 static enum ld_plugin_status
 add_input_library (const char *pathname)
 {
+  lang_input_statement_type *is;
+
   ASSERT (called_plugin);
-  if (!lang_add_input_file (xstrdup (pathname), lang_input_file_is_l_enum,
-                           NULL))
+  is = lang_add_input_file (xstrdup (pathname), lang_input_file_is_l_enum,
+                           NULL);
+  if (!is)
     return LDPS_ERR;
+  is->flags.lto_output = 1;
   return LDPS_OK;
 }
 
@@ -814,15 +822,19 @@ message (int level, const char *format, ...)
       putchar ('\n');
       break;
     case LDPL_WARNING:
-      vfinfo (stdout, format, args, TRUE);
-      putchar ('\n');
+      {
+       char *newfmt = ACONCAT (("%P: warning: ", format, "\n",
+                                (const char *) NULL));
+       vfinfo (stdout, newfmt, args, TRUE);
+      }
       break;
     case LDPL_FATAL:
     case LDPL_ERROR:
     default:
       {
-       char *newfmt = ACONCAT ((level == LDPL_FATAL ? "%P%F: " : "%P%X: ",
-                                format, "\n", (const char *) NULL));
+       char *newfmt = ACONCAT ((level == LDPL_FATAL ? "%P%F" : "%P%X",
+                                ": error: ", format, "\n",
+                                (const char *) NULL));
        fflush (stdout);
        vfinfo (stderr, newfmt, args, TRUE);
        fflush (stderr);
@@ -991,7 +1003,7 @@ plugin_load_plugins (void)
   register_ld_plugin_object_p (plugin_object_p);
 
 #if HAVE_MMAP && HAVE_GETPAGESIZE
-  plugin_pagesize = getpagesize ();;
+  plugin_pagesize = getpagesize ();
 #endif
 }
 
This page took 0.024589 seconds and 4 git commands to generate.