From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14992 invoked by alias); 28 Jul 2014 13:09:32 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 14982 invoked by uid 89); 28 Jul 2014 13:09:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 28 Jul 2014 13:09:30 +0000 Received: by mail-pa0-f54.google.com with SMTP id fa1so10315715pad.41 for ; Mon, 28 Jul 2014 06:09:28 -0700 (PDT) X-Received: by 10.70.100.106 with SMTP id ex10mr38460613pdb.73.1406552968404; Mon, 28 Jul 2014 06:09:28 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id gd2sm17631275pbb.95.2014.07.28.06.09.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 06:09:27 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 4C19DEA361E; Mon, 28 Jul 2014 22:39:23 +0930 (CST) Date: Mon, 28 Jul 2014 13:09:00 -0000 From: Alan Modra To: binutils@sourceware.org Subject: Warn for ar/nm/ranlib/ld on lto objects without plugin Message-ID: <20140728130923.GC30089@bubble.grove.modra.org> Mail-Followup-To: binutils@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00217.txt.bz2 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