From owner-freebsd-arch@freebsd.org Tue Sep 12 15:12:16 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CCA3E0DF7B for ; Tue, 12 Sep 2017 15:12:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 682A17592B for ; Tue, 12 Sep 2017 15:12:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 6770AE0DF7A; Tue, 12 Sep 2017 15:12:16 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 670D4E0DF79 for ; Tue, 12 Sep 2017 15:12:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4484E75929 for ; Tue, 12 Sep 2017 15:12:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 2C9C110A82E; Tue, 12 Sep 2017 11:12:13 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar Cc: arch@freebsd.org Subject: Re: ELF auxiliary vector tags Date: Mon, 11 Sep 2017 15:45:08 -0700 Message-ID: <5184520.CTdkFHEYDQ@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <26458208-EC4B-4647-8271-DF480EDD57DF@xcllnt.net> References: <26458208-EC4B-4647-8271-DF480EDD57DF@xcllnt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 12 Sep 2017 11:12:13 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2017 15:12:16 -0000 On Monday, September 11, 2017 12:05:02 PM Marcel Moolenaar wrote: > > > On Sep 8, 2017, at 10:36 AM, John Baldwin wrote: > > > > I know Justin changed time_t to 64-bit on 32-bit powerpc which effectively broke 32-bit powerpc earlier, but this change would break both 32-bit and 64-bit powerpc and is probably more disruptive (in theory some binaries might have worked with a wrong time_t, but renumber AT_STACKPROT, etc. will probably break every binary). > > That probably depends on the byte order. I would think widening > time_t on a big-endian machine is a lot more disruptive than > doing it on a little-endian machine. > > That said and along the lines of what @imp said: > Maybe add a a MD macro (e.g. NO_MI_AUX_VECTORS) whose existence > suppresses the MI definitions of AT_* so that MD headers can > define their own? Going forward I would like to standardize on common values for new vectors added. The current implementation of 'info auxv' for GDB assumes they are the same on all architectures (and judging by the binutils / gdb bits for Linux, Linux uses the same AT_* values on all platforms). Are you running powerpc binaries yourself? The only person who I know is who has replied (Justin) is fine with just pulling the tier-2 card on powerpc to bring it inline with all the other platforms (which are already identical). One suggestion was to set a value in AT_FLAGS (currently always set to zero) that binaries could then use to detect the new layout on ppc. -- John Baldwin