From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44802 invoked by alias); 14 Dec 2017 10:06:44 -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 44791 invoked by uid 89); 14 Dec 2017 10:06:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy= X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Dec 2017 10:06:37 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id A7EE632B90EB; Thu, 14 Dec 2017 11:06:35 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 84440401E920; Thu, 14 Dec 2017 11:06:35 +0100 (CET) Message-ID: <1513245995.15696.78.camel@klomp.org> Subject: Re: What integer type should ELF note header have? From: Mark Wielaard To: "H.J. Lu" Cc: Generic System V Application Binary Interface , Suprateeka R Hegde , Cary Coutant , Mark Mentovai , gnu-gabi@sourceware.org Date: Sun, 01 Jan 2017 00:00:00 -0000 In-Reply-To: References: <99c8440b-54d8-41bc-6e4d-cd1894536bb7@Oracle.COM> <993f8818-65a6-b83a-9d55-1fbbd88db8c8@gmail.com> <1512985389.15696.45.camel@klomp.org> <1513173445.15696.62.camel@klomp.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 X-Spam-Flag: NO X-SW-Source: 2017-q4/txt/msg00021.txt.bz2 On Wed, 2017-12-13 at 10:09 -0800, H.J. Lu wrote: > On Wed, Dec 13, 2017 at 5:57 AM, Mark Wielaard > wrote: > > On Mon, 2017-12-11 at 04:11 -0800, H.J. Lu wrote: > > > Note segments/sections with 8 byte alignment should use Elf64_Nhdr64. > > > If we want to do it, we should do it now before > > > NT_GNU_PROPERTY_TYPE_0 > > > notes with the existing Elf64_Nhdr are generated by GCC 8 with > > > -fcf-protection -mcet. > >=20 > > Yes, I think having a new note type is the way to go, if we want to > > change the alignment requirements. > >=20 > > BTW. What is the reason you need 8 byte aligned notes? >=20 > NT_GNU_PROPERTY_TYPE_0 can have 64-bit integer properties > in 64-bit objects.=C2=A0=C2=A0They should be aligned to 8 bytes. Not necessarily. You can have not naturally aligned data in files. ELF files are cross architectures, so you have to account for different alignments and endian issues anyway. Is there a specific property of these 64-bit integers that require them to be 8 byte aligned in the note descriptor data? Thanks, Mark