This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOLD] Warn on lto objects without plugin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]