From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24165 invoked by alias); 19 Apr 2016 15:37:38 -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 24101 invoked by uid 89); 19 Apr 2016 15:37:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=unavailable version=3.3.2 spammy=Hx-languages-length:1328, water, his, baby 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 15:37:30 +0000 Received: by mail-qg0-f54.google.com with SMTP id v14so11246310qge.0 for ; Tue, 19 Apr 2016 08:37:29 -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=byeBuelNZf3jZvsZotmc3RDOxYVkeRpW3/CbZiwktsE=; b=h3PEN2d6L9MOSQrmdz56RNh02nEA940M66VIHkymCEfvrvSewRphho491OzDiImwcP D3TO0oDBhwjFWNVJWBQCwGtA61xdIGAt7CvhWSkJCLimv5TYQghhSHSUeD0rWLDMEt79 ZIssqCkKSwLdRk3yvS5EfiOReQHTwxrtAo2A5WpBlmy0ndV/zeErkRH9FBOvEeuJ4iOB A2LOLUa9ElkQx9oGIVOI8ADGu2GX4uANpWzSSr2NQj2Ys1qgj5fn7hcRVnGjihXmIyzE ZyDUFUsPlDGfO/seZvS/IMcVObbuDsS67AfN9jD4xY/ZPaS1qWRHsjduGvfRLORKmJ57 weGg== X-Gm-Message-State: AOPr4FUU1XKgHaC4SywONYuragyP6VDI/WwlseaMLaUvX6X2Z94M7g98+MGFOSVFxZk40mJRwwm3Nf8Cl8ROAQ== MIME-Version: 1.0 X-Received: by 10.140.43.74 with SMTP id d68mr4318509qga.55.1461080247799; Tue, 19 Apr 2016 08:37:27 -0700 (PDT) Received: by 10.55.60.3 with HTTP; Tue, 19 Apr 2016 08:37:27 -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 15:37: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: Cary Coutant To: Michael Matz Cc: Richard Biener , Alan Modra , "H.J. Lu" , Jeff Law , Joe Groff , Binutils , GCC Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00297.txt.bz2 >> 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. > > ... this. Right. Protected visibility worked fine without copy relocations for 15 years until HJ's patch. I don't know of anyone with a legitimate complaint about that until HJ filed a bug based on his artificial test case. Other compilers implement protected the way it was intended, so the linkers must still disallow copy relocations against protected symbols, or we get legitimate complaints like these: https://sourceware.org/bugzilla/show_bug.cgi?id=15228 https://sourceware.org/ml/binutils/2016-03/msg00312.html -cary