From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119173 invoked by alias); 2 Oct 2018 14:52:06 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 119154 invoked by uid 89); 2 Oct 2018 14:52:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=disagree X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Oct 2018 14:52:05 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A24F8AF6E; Tue, 2 Oct 2018 14:52:02 +0000 (UTC) Date: Mon, 01 Jan 2018 00:00:00 -0000 From: Michael Matz To: "H.J. Lu" cc: Rich Felker , Cary Coutant , Carlos O'Donell , Florian Weimer , Szabolcs Nagy , Jan Beulich , Binutils , gnu-gabi@sourceware.org Subject: Re: RFC: Add GNU_PROPERTY_NEED_PHDRS In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2018-q4/txt/msg00000.txt.bz2 Hi, On Fri, 28 Sep 2018, H.J. Lu wrote: > >> AT_PHDR to main, which points to the unmmaped address. We can ask > >> for kernel change or make kernel happy. > > > > Kernel change does not help because nobody is obligated to use a new > > kernel. Binutils would be producing binaries that don't work on > > existing kernels (if the note hack were reverted or if similar changes > > were added to other archs without a note hack; right now of course > > it's working again). > > True. > > >> My current .note.gnu.property patch only works for x86. We can add > >> > >> #define GNU_PROPERTY_PHDRS 3 > >> > >> so that it can be used for all targets. > > > > What would this do? > > These are what I have in mind. I don't see how the patches fix anything, in particular making sure that the phdrs are always mapped. If your intention is (it would be good if you can explain it with words) that they only would be made mapped if this new property is set, then I'd disagree. I think they should always be made mapped unconditionally. There are two ways for this: (a) add a new PT_LOAD that covers them, (b) move the phdrs into the ro data segment. I find all approaches that add properties or new section types or anything else that needs documentation and definition dubious. Ciao, Michael.