From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60049.outbound.protection.outlook.com [40.107.6.49]) by sourceware.org (Postfix) with ESMTPS id B7FA43857007 for ; Wed, 1 Jul 2020 17:31:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B7FA43857007 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Szabolcs.Nagy@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCJy63tG/o5naGp45mnJpzS6gWRR1IjnRKydpGETEWs=; b=J+uw60NMytgvlzc+tNXGqOPw52VAXjCmqhQWpDKAJm6unXdhdl9Dmg++lU4+LSWDLHyNczUGUuYwvG+vXS5biNRl+S9U8oT0sPNhjW4zJKyHm0y0lozMr+E1QqBVNy4MP2bSDN+XjHfBiX7RUal1/x5+sBkZ3nE0kT3fsNaiDA8= Received: from AM6PR10CA0046.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::23) by AM0PR08MB3955.eurprd08.prod.outlook.com (2603:10a6:208:12d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.24; Wed, 1 Jul 2020 17:31:43 +0000 Received: from VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:80:cafe::5f) by AM6PR10CA0046.outlook.office365.com (2603:10a6:209:80::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Wed, 1 Jul 2020 17:31:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT047.mail.protection.outlook.com (10.152.19.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Wed, 1 Jul 2020 17:31:42 +0000 Received: ("Tessian outbound e44de778b77e:v62"); Wed, 01 Jul 2020 17:31:42 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7a027cf4aff59ef7 X-CR-MTA-TID: 64aa7808 Received: from 8f3c1beb586b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4FA3F054-AAE1-411F-9AA6-7661E9453B23.1; Wed, 01 Jul 2020 17:31:37 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8f3c1beb586b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 01 Jul 2020 17:31:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J+p8FMp4m2Bb0jYFp+XxQAgD9xJ31sBWJSek3wSrE9/SMrIroExpNQ8o2P+0P46qpRw16/yxVSgi05F3XVaQY83pAK1Cd+SoYZijxrTCj/Hia4A6lc4UaxW6kgVbSUjHl88GCFu7AvYB3Ne+lnFpxpS01YMS3Dy5pCFfB7zvatmAzexg5wOM4+ZqlViib4CNn5yJMQJrToBhRrCe/LVdcgQTIgDpBk1EscGLOxip+hnZ6dk4FfyD5RHEFLphHvgqmbvLIjSuDd1vFiOKblNn2vPLt9oohHZKLaOeBbpmiYAiTO17SzQ676IxEsOUvZ/4GH63UaNY4VnVm8mXDJtPOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCJy63tG/o5naGp45mnJpzS6gWRR1IjnRKydpGETEWs=; b=CcuPOntTY6LPxr8GSaPLnycu9snXhmBThmLRZRXWi+K6s1grVUQqxNIr2bZOSbfq/K8UNezopPtzU7tvnp/F3rJekwMbdHjNRLjMxjCV7MFf2H1BS8E0CJjB8OnBi2K4BZBQHOVDwLSwKGklRczL5ge/FU0lxvmCa0szl+LfcYBnFvtbvw7i8sTRGhKsaxUOL/37BpimZZUKd4p0K/Vv5VL2vaVQgvAUkDHh/0r578SrKPgJdpttBpftNtjrCVJaKpi6GjeFC5Gu3vWcZN9tnRt46uLgNrnTPPXKyYs1qXhMykfwCrzML0uXOkvFoBGPdglXA9C6BcD/+bb9yKdpiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FCJy63tG/o5naGp45mnJpzS6gWRR1IjnRKydpGETEWs=; b=J+uw60NMytgvlzc+tNXGqOPw52VAXjCmqhQWpDKAJm6unXdhdl9Dmg++lU4+LSWDLHyNczUGUuYwvG+vXS5biNRl+S9U8oT0sPNhjW4zJKyHm0y0lozMr+E1QqBVNy4MP2bSDN+XjHfBiX7RUal1/x5+sBkZ3nE0kT3fsNaiDA8= Authentication-Results-Original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0801MB1684.eurprd08.prod.outlook.com (2603:10a6:203:38::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Wed, 1 Jul 2020 17:31:35 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3131.033; Wed, 1 Jul 2020 17:31:35 +0000 Date: Wed, 1 Jul 2020 18:31:33 +0100 From: Szabolcs Nagy To: "H.J. Lu" Cc: GNU C Library Subject: Re: [PATCH v6 01/14] Rewrite abi-note.S in C. Message-ID: <20200701173133.GC22681@arm.com> References: <896f9afab21b31d0e168e61eb8781d477bf3a7dd.1593612309.git.szabolcs.nagy@arm.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0343.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:d::19) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.53) by LO2P265CA0343.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22 via Frontend Transport; Wed, 1 Jul 2020 17:31:35 +0000 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 760c9a27-b845-4f63-93f3-08d81de49eeb X-MS-TrafficTypeDiagnostic: AM5PR0801MB1684:|AM0PR08MB3955: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6108;OLM:6108; X-Forefront-PRVS: 04519BA941 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Yj/14MGc/oypxFbBeteQA0uAoy6iZHR+L6rQYtl/KVS3dJLKOudAnJaB//F9SVk3KhNogks2IBQk7tEqmFpkmLJSrKZwJ06vtBwmjNX86NlG/ybU0HfMEPBRlXRugw4ZN8pZ6U8O1JRiAo9GDbp/3jLvLevzJ7xe/Sg9po0iqtGVTw+IUwUVx6vmY7d86XUV5DubfQDDXEiu4EzJqEvCMWe0gu6ZYjlsAdg8nbjYrASi8Kn9gO5gg5y4iEKfJJ+VHT4nsqTlusYGv7JYXB2uPPAUkF3ycpelMrybWtIK09iU5dD3H8MRnEFSOU3bY6KYjWDkRLmjMmzRhTJ/chtSog== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB3047.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(346002)(366004)(376002)(39860400002)(396003)(52116002)(66476007)(66556008)(66946007)(55016002)(26005)(44832011)(86362001)(186003)(8886007)(2906002)(956004)(16526019)(53546011)(2616005)(83380400001)(1076003)(4326008)(33656002)(7696005)(36756003)(316002)(478600001)(8936002)(8676002)(6916009)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qkrVFN/R70Z0k2e6SwALUWY3yKWAbvAe9EdAnjSpdZB6fdqO088JLQH2+uiZEqTrDurkrKvBgoCd8c8Cpv1dLGdypASrxTfCXMbWpVf3S63ByRiocevcJGCAtyXuf3+sQsdR2/D192Nvz0j1w+2p41Y7bCLJqWwncY/Wu1RS0lfyBvuoBzCqXjod8Rg19u2XrNpM+/Dj4NC1a0VSg4Li4ZWgGFrLPvR4TFfbrm0r1kwqe2XWYcxbARIN75fUnp9lAPvp50ydwbcxU+IzjWTAaNx2R1KbjtCRV5ct5QZ7SedFU/ShEYKy7rQE21HJVehzCZotJwbgoK/iliNK67vKFqT3KJ2zeEpXIrDA5PEyD1KloXBEFyL8zc3X/VrRve67pPeGnRDwoeMdeht8sfjZ9mxxv24/1/0ekoPQifB682TvS+QHNwAAoczvSqMV2E2tpG1UQz8wHJdJLdcouo2Wpi1PaMe8HP17EJIEcsCagfIt1uf0Ukc9Dh9KwZlFf544 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1684 Original-Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(396003)(136003)(39860400002)(346002)(376002)(46966005)(70206006)(4326008)(81166007)(316002)(70586007)(356005)(36906005)(82310400002)(2906002)(7696005)(86362001)(6862004)(55016002)(33656002)(82740400003)(53546011)(83380400001)(478600001)(36756003)(8886007)(1076003)(44832011)(8676002)(186003)(16526019)(2616005)(956004)(336012)(47076004)(26005)(5660300002)(8936002); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 65300dd7-4334-4b12-dc86-08d81de49a5e X-Forefront-PRVS: 04519BA941 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x3uKW47rzR0pmwaJ39mU8KwWijbC9eKLdji6RflZFketEhpdcgPVqLw0yBwXGjx82vOufolaLiweInFDLizZBmiWX+G15OtI7yJrTghybhTZHjGDhmsOM0d5+A0Xw1omNEm5TITI52iRmQWcThdDayyVz9/1G+eBou3WiB34qfMH+UpWgvUlSNSeetYadRfWf0jtHUjfWOAE+NGKiwxjO6lq5ruNJWMJmTUtggWdQtPlJA84w6Nv156hjO23sSTMzXkyD9lyJDp5A3yZafrKXKIO+rh7hWVo9Ixx4MSV51eJK4p/6EPBxm3c0kwd/Nw6Rx+Zxbtha+xYbQNSYJNx9uwYrmutL2fRoi6i0got9duF7TGZvVh5Gop4s7d8WUJwJ+qA8ancZ0hL3pBRuK3zfg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2020 17:31:42.7783 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 760c9a27-b845-4f63-93f3-08d81de49eeb X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3955 X-Spam-Status: No, score=-16.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 17:31:47 -0000 The 07/01/2020 07:41, H.J. Lu wrote: > On Wed, Jul 1, 2020 at 7:38 AM Szabolcs Nagy wrote: > > Using C code allows the compiler to add target specific object file > > markings based on CFLAGS. > > > > The arm specific abi-note.S is removed and similar object file fix > > up will be avoided on AArch64 with standard branch-prtection. > > --- > > csu/{abi-note.S => abi-note.c} | 23 +++++++++++++---------- > > sysdeps/arm/abi-note.S | 8 -------- > > 2 files changed, 13 insertions(+), 18 deletions(-) > > rename csu/{abi-note.S => abi-note.c} (90%) > > delete mode 100644 sysdeps/arm/abi-note.S > > > > diff --git a/csu/abi-note.S b/csu/abi-note.c > > similarity index 90% > > rename from csu/abi-note.S > > rename to csu/abi-note.c > > index 2b4b5f8824..db195c7ab7 100644 > > --- a/csu/abi-note.S > > +++ b/csu/abi-note.c > > @@ -53,6 +53,8 @@ offset length contents > > identify the earliest release of that OS that supports this ABI. > > See abi-tags (top level) for details. */ > > > > +#include > > +#include > > #include > > #include /* OS-specific ABI tag value */ > > > > @@ -60,13 +62,14 @@ offset length contents > > name begins with `.note' and creates a PT_NOTE program header entry > > pointing at it. */ > > > > - .section ".note.ABI-tag", "a" > > - .p2align 2 > > - .long 1f - 0f /* name length */ > > - .long 3f - 2f /* data length */ > > - .long 1 /* note type */ > > -0: .asciz "GNU" /* vendor name */ > > -1: .p2align 2 > > -2: .long __ABI_TAG_OS /* note data: the ABI tag */ > > - .long __ABI_TAG_VERSION > > -3: .p2align 2 /* pad out section */ > > +__attribute__ ((used, aligned (4), section (".note.ABI-tag"))) > > +static const struct > > +{ > > + ElfW(Nhdr) nhdr; > > + char name[4]; > > + int32_t desc[4]; > > +} __abi_tag = { > > + { .n_namesz = 4, .n_descsz = 16, .n_type = 1 }, > > sizeof "GNU"? and sizeof desc? i can do { .n_namesz = sizeof __abi_tag.name, .n_descsz = sizeof __abi_tag.desc, .n_type = 1 }, is that better? (for me the int literal looks clear in the context and shorter. i don't like sizeof "GNU" i think that's less clear.) > > + "GNU", > > + { __ABI_TAG_OS, __ABI_TAG_VERSION } > > +}; > > diff --git a/sysdeps/arm/abi-note.S b/sysdeps/arm/abi-note.S > > deleted file mode 100644 > > index 07bd4c4619..0000000000 > > --- a/sysdeps/arm/abi-note.S > > +++ /dev/null > > @@ -1,8 +0,0 @@ > > -/* Tag_ABI_align8_preserved: This code preserves 8-byte > > - alignment in any callee. */ > > - .eabi_attribute 25, 1 > > -/* Tag_ABI_align8_needed: This code may require 8-byte alignment from > > - the caller. */ > > - .eabi_attribute 24, 1 > > - > > -#include > > -- > > 2.17.1 > > > > > -- > H.J.