From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61475 invoked by alias); 19 Apr 2016 19:11:12 -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 61419 invoked by uid 89); 19 Apr 2016 19:11:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1339, water, surprise X-HELO: mail-qg0-f54.google.com Received: from mail-qg0-f54.google.com (HELO mail-qg0-f54.google.com) (209.85.192.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 19 Apr 2016 19:11:00 +0000 Received: by mail-qg0-f54.google.com with SMTP id c6so15240099qga.1 for ; Tue, 19 Apr 2016 12:10:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=XveaeYzFqVZ6eEpmkv5AfoQkyTAhL8/qEKH51Svde34=; b=NtOndIq0Nxjt3ouaMmDO/4Bgkw5SDqMFXQLBIeiZI3g1zUMXCPWLBzK9XDsB6w9ma8 ry3dNHpXlVm/rBQOfXOYeN8JQ/t9smaRGpE+MFONFcaV69v5FSGB6+nNRTA7C+b7IC4p 85NrjWUnbejH7eiAu2t10JsMY5pW9ea0P8cmhoQO1ZK+q6L7pH0NvAVIrnce4Jpu34AL T5j2g3dt1+DecoZp3zWpu4wN0FFknCsLgrRzZK6liz+lIBf0hnHQrBkxwLugp7mjKnEh sR4Bjslo7fXI2YLSBk6JKh99DWY8NPJf7KddNlAuJTqLRck1+wbf3Wy6TOAXsegMegO2 HKgQ== X-Gm-Message-State: AOPr4FU5m71pXvEiQ0eEZyQPxk6tpRD17DqAU9FeuejvFzo6ViVcKldWIt7rDy6FvzTtHTuqjM2RMBVS648EGQ== MIME-Version: 1.0 X-Received: by 10.140.23.139 with SMTP id 11mr5714296qgp.62.1461093058197; Tue, 19 Apr 2016 12:10:58 -0700 (PDT) Received: by 10.55.217.134 with HTTP; Tue, 19 Apr 2016 12:10:58 -0700 (PDT) In-Reply-To: References: <6AAD87D2-90F9-4AD7-A195-AC91B76EA6AE@apple.com> <56FB5061.9010303@redhat.com> <20160330143421.GM15812@bubble.grove.modra.org> <571161D0.10601@redhat.com> <20160418144911.GG15088@bubble.grove.modra.org> <20160419050805.GI15088@bubble.grove.modra.org> Date: Tue, 19 Apr 2016 19:11:00 -0000 Message-ID: Subject: Re: Preventing preemption of 'protected' symbols in GNU ld 2.26 [aka should we revert the fix for 65248] From: "H.J. Lu" To: Michael Matz Cc: Richard Biener , Alan Modra , Jeff Law , Cary Coutant , Joe Groff , Binutils , GCC Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00313.txt.bz2 On Tue, Apr 19, 2016 at 7:06 AM, Michael Matz wrote: > Hi, > > On Tue, 19 Apr 2016, Richard Biener wrote: > >> So with all this it sounds that current protected visibility is just >> broken and we should forgo with it, making it equal to default >> visibility? > > Like how? You mean in GCC regarding protected as default visibility? No, > that's just throwing out the baby with the water. We should make > protected do what it was intended to do and accept that not all invariants > that are true for default visible symbols are also true for protected > symbols, possibly by ... > >> At least I couldn't decipher a solution that solves all of the issues >> with protected visibility apart from trying to error at link-time (or >> runtime?) for the cases that are tricky (impossible?) to solve. > Protected visibility is a useful feature. But as it stands today, it is pretty much useless on x86 as seen in ld and ld.so. We have known this defect for a long time, almost from day 1. To make it truly useful, we need to clearly spell out how and when it can be used. We should enforce its limitation in compiler, ld and ld.so so that there is no surprise, either for correctness or performance, at run-time. -- H.J.