public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Cc: Cary Coutant <ccoutant@google.com>
Subject: [GOLD] Warn on lto objects without plugin
Date: Tue, 05 Aug 2014 02:42:00 -0000	[thread overview]
Message-ID: <20140805024204.GJ8921@bubble.grove.modra.org> (raw)

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

             reply	other threads:[~2014-08-05  2:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05  2:42 Alan Modra [this message]
2014-08-05 17:02 ` Cary Coutant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140805024204.GJ8921@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=ccoutant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).