diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 7 | ||||
-rw-r--r-- | binutils/nm.c | 23 |
2 files changed, 27 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 9195540..f3be264 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2019-07-29 Martin Liska <mliska@suse.cz> + + PR 24768 + * nm.c (filter_symbols): Set report_plugin_err if + error is reported. + (display_rel_file): Report error for a missing LTO plugin. + 2019-07-26 Alan Modra <amodra@gmail.com> PR 24798 diff --git a/binutils/nm.c b/binutils/nm.c index fd3f731..5d3d647 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -438,6 +438,10 @@ print_symdef_entry (bfd *abfd) } } + +/* True when we can report missing plugin error. */ +bfd_boolean report_plugin_err = TRUE; + /* Choose which symbol entries to print; compact them downward to get rid of the rest. Return the number of symbols to be printed. */ @@ -470,9 +474,13 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms, if (sym->name[0] == '_' && sym->name[1] == '_' - && strcmp (sym->name + (sym->name[2] == '_'), "__gnu_lto_slim") == 0) - non_fatal (_("%s: plugin needed to handle lto object"), - bfd_get_filename (abfd)); + && strcmp (sym->name + (sym->name[2] == '_'), "__gnu_lto_slim") == 0 + && report_plugin_err) + { + report_plugin_err = FALSE; + non_fatal (_("%s: plugin needed to handle lto object"), + bfd_get_filename (abfd)); + } if (undefined_only) keep = bfd_is_und_section (sym->section); @@ -1164,6 +1172,15 @@ display_rel_file (bfd *abfd, bfd *archive_bfd) } } + /* lto_slim_object is set to false when a bfd is loaded with a compiler + LTO plugin. */ + if (abfd->lto_slim_object) + { + report_plugin_err = FALSE; + non_fatal (_("%s: plugin needed to handle lto object"), + bfd_get_filename (abfd)); + } + /* Discard the symbols we don't want to print. It's OK to do this in place; we'll free the storage anyway (after printing). */ |