From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22173 invoked by alias); 17 Jun 2014 14:07:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22160 invoked by uid 89); 17 Jun 2014 14:07:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ve0-f181.google.com Received: from mail-ve0-f181.google.com (HELO mail-ve0-f181.google.com) (209.85.128.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 17 Jun 2014 14:06:37 +0000 Received: by mail-ve0-f181.google.com with SMTP id db11so7683479veb.12 for ; Tue, 17 Jun 2014 07:06:34 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.58.195.234 with SMTP id ih10mr1210810vec.41.1403013994910; Tue, 17 Jun 2014 07:06:34 -0700 (PDT) Received: by 10.220.11.5 with HTTP; Tue, 17 Jun 2014 07:06:34 -0700 (PDT) In-Reply-To: <20140617034447.GA28053@kam.mff.cuni.cz> References: <20140616043557.GA6530@kam.mff.cuni.cz> <20140616220638.GA12228@kam.mff.cuni.cz> <20140617034447.GA28053@kam.mff.cuni.cz> Date: Tue, 17 Jun 2014 14:07:00 -0000 Message-ID: Subject: Re: Another AIX Bootstrap failure From: David Edelsohn To: Jan Hubicka Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2014-06/txt/msg01359.txt.bz2 On Mon, Jun 16, 2014 at 11:44 PM, Jan Hubicka wrote: >> The linker is not seeing the local definition of >> ._ZN14__gnu_parallel9_SettingsC1Ev. libstdc++ is built with >> Linux-like semantics, so it allows symbols to be overridden. AIX calls >> everything through the PLT. But the real definition of the function is > > Even static functions? > >> not being seen. >> >> I'm not exactly sure why inlining changing this and what these extra >> levels of indirections are trying to accomplish. The visibility of the > > To avoid using PLT and GOT when the unit refers to the symbol and we know > that interposition does not matter. I am not certain if the linker is creating the PLT stub code because it wants to allow interpolation or because it cannot see a definition of the function and wants to allow for some other shared library to provide the definition at runtime. > Why branch to a non-global (static) symbol > b ._ZN14__gnu_parallel9_SettingsC1Ev.localalias.0 > leads to PLT stub here and why branching to such symbols seems to work otherwise? Branching to non-global (static) symbol, even an alias, is working here. The weak function seems to be the problem. > The failing branch is >> b ._ZN14__gnu_parallel9_SettingsC1Ev.localalias.0 > so the call to static construction seems to have happened correctly but we can > not get right the call from the constructor to static function (that is an alias > of a global symbol) The linker appears to not want to resolve the weak function. If I change ._ZN14__gnu_parallel9_SettingsC1Ev to lglobl, it works. If I change the static constructor to call the weak function directly, avoiding the alias, it shows the same failure mode. I don't know what code generation looked like before. Was GCC generating calls to weak functions within the same file? Thanks, David