X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Fplugin.c;h=81bf14348c3de139602063fe8baa36b85751053e;hb=00e52e5376c7ec604a739e6242e6be36221162d7;hp=b48ce86a6f1ecc4d1561171d212a8526d91270c2;hpb=5ae0078cd2b6b69e6119864e20987c8724916b29;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/plugin.c b/ld/plugin.c index b48ce86a6f..81bf14348c 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -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 }