public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Warn for ar/nm/ranlib/ld on lto objects without plugin
@ 2014-07-28 13:09 Alan Modra
  2014-08-06  3:54 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2014-07-28 13:09 UTC (permalink / raw)
  To: binutils

	PR 13227
bfd/
	* archive.c (_bfd_compute_and_write_armap): Warn on adding
	__gnu_lto_slim to armap.
	* linker.c (_bfd_generic_link_add_one_symbol): Warn on adding
	__gnu_lto_slim to linker hash table.
binutils/
	* nm.c (filter_symbols): Warn on __gnu_lto_slim.

diff --git a/bfd/archive.c b/bfd/archive.c
index 1c3ad52..40a3395 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -2357,6 +2357,10 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
 			  map = new_map;
 			}
 
+		      if (strcmp (syms[src_count]->name, "__gnu_lto_slim") == 0)
+			(*_bfd_error_handler)
+			  (_("%s: plugin needed to handle lto object"),
+			   bfd_get_filename (current));
 		      namelen = strlen (syms[src_count]->name);
 		      amt = sizeof (char *);
 		      map[orl_count].name = (char **) bfd_alloc (arch, amt);
diff --git a/bfd/linker.c b/bfd/linker.c
index f6ae4e2..5ad7988 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1642,7 +1642,13 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
   else if ((flags & BSF_WEAK) != 0)
     row = DEFW_ROW;
   else if (bfd_is_com_section (section))
-    row = COMMON_ROW;
+    {
+      row = COMMON_ROW;
+      if (strcmp (name, "__gnu_lto_slim") == 0)
+	(*_bfd_error_handler)
+	  (_("%s: plugin needed to handle lto object"),
+	   bfd_get_filename (abfd));
+    }
   else
     row = DEF_ROW;
 
diff --git a/binutils/nm.c b/binutils/nm.c
index 2a44a84..ecd147e 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -434,6 +434,10 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms,
       if (sym == NULL)
 	bfd_fatal (bfd_get_filename (abfd));
 
+      if (strcmp (sym->name, "__gnu_lto_slim") == 0)
+	non_fatal (_("%s: plugin needed to handle lto object"),
+		   bfd_get_filename (abfd));
+
       if (undefined_only)
 	keep = bfd_is_und_section (sym->section);
       else if (external_only)

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-06  3:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-28 13:09 Warn for ar/nm/ranlib/ld on lto objects without plugin Alan Modra
2014-08-06  3:54 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).