public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [GOLD] Warn on lto objects without plugin
@ 2014-08-05  2:42 Alan Modra
  2014-08-05 17:02 ` Cary Coutant
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2014-08-05  2:42 UTC (permalink / raw)
  To: binutils; +Cc: Cary Coutant

A similar hack for gold to those I've added for BFD ld, ar, nm and
ranlib.  The idea being to give users a clue, and cut down on the
number of invalid bugzillas.  You'll get something like

hello.a(hello.o): plugin needed to handle lto object
.../crt1.o(.text+0x20): error: undefined reference to 'main'

rather than just

.../crt1.o(.text+0x20): error: undefined reference to 'main'

OK to apply?

	PR 13227
	* symtab.cc (Symbol_table::add_from_relobj): Warn on __gnu_lto_slim.

diff --git a/gold/symtab.cc b/gold/symtab.cc
index b329bb6..210ab25 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1133,6 +1133,10 @@ Symbol_table::add_from_relobj(
 
       const char* name = sym_names + st_name;
 
+      if (strcmp (name, "__gnu_lto_slim") == 0)
+        gold_info(_("%s: plugin needed to handle lto object"),
+		  relobj->name().c_str());
+
       bool is_ordinary;
       unsigned int st_shndx = relobj->adjust_sym_shndx(i + symndx_offset,
 						       sym.get_st_shndx(),

-- 
Alan Modra
Australia Development Lab, IBM

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

* Re: [GOLD] Warn on lto objects without plugin
  2014-08-05  2:42 [GOLD] Warn on lto objects without plugin Alan Modra
@ 2014-08-05 17:02 ` Cary Coutant
  0 siblings, 0 replies; 2+ messages in thread
From: Cary Coutant @ 2014-08-05 17:02 UTC (permalink / raw)
  To: Binutils, Cary Coutant

>         PR 13227
>         * symtab.cc (Symbol_table::add_from_relobj): Warn on __gnu_lto_slim.

This is OK, thanks!

-cary

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

end of thread, other threads:[~2014-08-05 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05  2:42 [GOLD] Warn on lto objects without plugin Alan Modra
2014-08-05 17:02 ` Cary Coutant

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).