From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109992 invoked by alias); 13 Dec 2017 18:09:26 -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 109979 invoked by uid 89); 13 Dec 2017 18:09:25 -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=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*mark X-Spam-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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-HELO: mail-ot0-f181.google.com Received: from mail-ot0-f181.google.com (HELO mail-ot0-f181.google.com) (74.125.82.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Dec 2017 18:09:24 +0000 Received: by mail-ot0-f181.google.com with SMTP id d27so2719677ote.11 for ; Wed, 13 Dec 2017 10:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RLRbMUTQeuBNMT/fix/rBSa1J+WP6e62bE9w23CL/qc=; b=Dv2s062J0CC2syY3sfGRrX4O9sQy4oCIEUinL+/b64L6cGKilbq8ydwDFz6boc4NL2 oP0V9VljK+PP7w7L6idLfW+fxoDwftTyyGfGMW3NXywn3fAxeniluDn5mGpjvXfVjtxu iU4tADts+mUPacIT6BSCoFJyVQ7R73CM+iQm4qSQO95/SXmuqHelx0GevQDYF70xh0ml W28pNHIcomd9nyFukZg82CM3SLwVGsUAObnV3eff2E6ONoL62ef6BJ1QL4aXY2czRhOb sTX0IkO89YCBEKMrdv3VE9iqACpY1uu/1LA+K04uEo4ZMpFRwR8on7omgiABLfQ5vX6m qMmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RLRbMUTQeuBNMT/fix/rBSa1J+WP6e62bE9w23CL/qc=; b=n5I9nOzqDpwF7+FiE6IeSrITH8X0hJhDcPG3VMVbv8kyq+SKicpn3z2u4x0NFoQLQh FCZfrl57MVF+ystcpPcxwRTBA8CRvIUKaW2BcDhQD6XAQAetLBaE/FgiAIh30Xx/wA5G CGRd6nFn4c0fvABMBTudu2IKCbL6+q0HmrwyP0+1mr1Cd6Vkyeg6zHTUVLaoK0mw6zpN Yvebt0PQCyRndTdSqgwWKtQcpPJwEOWan8NT/yZdiWVp0AG5a5g/COuzOZ0MnsiNge1Y 95Be4xVfOAQRLIn8bV9WDb0bP/Ak0TpBvbhQm3IxBY19RU9Dwwm0UfNKFbHuJSyU2qjx oNuA== X-Gm-Message-State: AKGB3mIZtLdyIIz2dFtOU4lp4s6Kje6GnQ8TW1MHD3xZPkXzggfh0mni hOGGOBX4v+gkZ2djWp35mYsBaxbZI5+Uss5rJeA= X-Google-Smtp-Source: ACJfBovUwypjN7nX97rS42R9FNvOx8OF9iOk32mfCM+LIS3La/9ars/bbmxrj1H9vja9+p/WIkWlTWxYLPw5luvot2E= X-Received: by 10.157.65.213 with SMTP id v21mr2732150oti.392.1513188562472; Wed, 13 Dec 2017 10:09:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.151.42 with HTTP; Wed, 13 Dec 2017 10:09:20 -0800 (PST) In-Reply-To: <1513173445.15696.62.camel@klomp.org> 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> From: "H.J. Lu" Date: Sun, 01 Jan 2017 00:00:00 -0000 Message-ID: Subject: Re: What integer type should ELF note header have? To: Mark Wielaard Cc: Generic System V Application Binary Interface , Suprateeka R Hegde , Cary Coutant , Mark Mentovai , gnu-gabi@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00019.txt.bz2 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: >> Changing ELF64_Nhdr is going to be hard, but not impossible. In >> theory, an 64-bit object may have a note entry which is bigger than 4 >> GB. We can add a new note header: >> >> typedef struct >> { >> Elf64_Xword n_namesz; /* Length of the note's name. */ >> Elf64_Xword n_descsz; /* Length of the note's descriptor. */ >> Elf64_Xword n_type; /* Type of the note. */ >> } Elf64_Nhdr64; >> >> 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. > > Yes, I think having a new note type is the way to go, if we want to > change the alignment requirements. > > BTW. What is the reason you need 8 byte aligned notes? > NT_GNU_PROPERTY_TYPE_0 can have 64-bit integer properties in 64-bit objects. They should be aligned to 8 bytes. This is independent of Elf64_Nhdr. -- H.J.