From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40611 invoked by alias); 20 Apr 2017 15:38:48 -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 40583 invoked by uid 89); 20 Apr 2017 15:38:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=arrangement X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Apr 2017 15:38:45 +0000 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 79AC821530B4C; Thu, 20 Apr 2017 16:38:41 +0100 (IST) Received: from [10.20.78.130] (10.20.78.130) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server id 14.3.294.0; Thu, 20 Apr 2017 16:38:43 +0100 Date: Thu, 20 Apr 2017 15:38:00 -0000 From: "Maciej W. Rozycki" To: Alan Modra CC: Subject: Re: [PATCH, RFC] ELF/LD: Always consider STB_LOCAL symbols local In-Reply-To: <20170413140917.GT24006@bubble.grove.modra.org> Message-ID: References: <20170413140917.GT24006@bubble.grove.modra.org> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2017-04/txt/msg00177.txt.bz2 On Thu, 13 Apr 2017, Alan Modra wrote: > > Do not require forced local (STB_LOCAL) symbols to have a definition in > > a regular file to be considered to resolve local to the current module, > > matching `elf_link_renumber_local_hash_table_dynsyms'. In the absence > > of a regular definition any reference to a STB_LOCAL symbol will have to > > be garbage collected along with the undefined symbol itself, or the link > > will eventually fail. Either way the symbol concerned is not going to > > be external. > > > > bfd/ > > * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE > > if forced local. > > OK. I can't remember why I put the forced_local test after the > def_regular test in the original code. Some of the old scattered checks folded into SYMBOL_REFERENCES_LOCAL and SYMBOL_CALLS_LOCAL with commit 586119b38f88 had an outer logical AND with ELF_LINK_HASH_DEF_REGULAR being set, possibly because the case concerned here didn't matter for them. This might have been the origin of the resulting code arrangement. Applied then, thanks for your review. Maciej