diff options
Diffstat (limited to 'binutils/nm.c')
-rw-r--r-- | binutils/nm.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/binutils/nm.c b/binutils/nm.c index 7ef5d61..a7f0e9d 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -36,9 +36,10 @@ #include "libcoff.h" #include "bucomm.h" #include "demanguse.h" -#include "plugin-api.h" -#include "plugin.h" #include "safe-ctype.h" +#if BFD_SUPPORTS_PLUGINS +#include "plugin.h" +#endif #ifndef streq #define streq(a,b) (strcmp ((a),(b)) == 0) @@ -801,10 +802,10 @@ filter_symbols (bfd *abfd, bool is_dynamic, void *minisyms, if (sym == NULL) continue; - if (sym->name != NULL - && sym->name[0] == '_' - && sym->name[1] == '_' - && strcmp (sym->name + (sym->name[2] == '_'), "__gnu_lto_slim") == 0 + if (bfd_lto_slim_symbol_p (abfd, sym->name) +#if BFD_SUPPORTS_PLUGINS + && !bfd_plugin_target_p (abfd->xvec) +#endif && report_plugin_err) { report_plugin_err = false; @@ -1487,7 +1488,11 @@ display_rel_file (bfd *abfd, bfd *archive_bfd) /* lto_type is set to lto_non_ir_object when a bfd is loaded with a compiler LTO plugin. */ - if (bfd_get_lto_type (abfd) == lto_slim_ir_object) + if (bfd_get_lto_type (abfd) == lto_slim_ir_object +#if BFD_SUPPORTS_PLUGINS + && !bfd_plugin_target_p (abfd->xvec) +#endif + ) { report_plugin_err = false; non_fatal (_("%s: plugin needed to handle lto object"), |