From patchwork Tue May 12 10:14:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 38956 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EF8A43948817; Tue, 12 May 2020 10:15:09 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from FRA01-PR2-obe.outbound.protection.outlook.com (mail-eopbgr120041.outbound.protection.outlook.com [40.107.12.41]) by sourceware.org (Postfix) with ESMTPS id C7722393C887 for ; Tue, 12 May 2020 10:15:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C7722393C887 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=CG53rVHwL+ctx7M8HbkgG4gtY2fbxU7d7vLu1lWvgEY=; b=GJc01Imd4rfHE5okSl2PpMUX/Rz+OAF4HKqiwiP8i1pQ4dY3K11xtBDxmyw6H0LiDLIxmkNjsThIXC0yYlcW/vQxiAZAqvMrTlbOHr+pgpM7eak5ZE+QOJRKm3riXxilajpDj/HMFb5Qpu4/2+Er4mz/SZNq3JE4tFuQDxnuezk= Received: from AM6PR10CA0009.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:89::22) by PR2PR08MB5228.eurprd08.prod.outlook.com (2603:10a6:101:21::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Tue, 12 May 2020 10:15:04 +0000 Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:89:cafe::53) by AM6PR10CA0009.outlook.office365.com (2603:10a6:209:89::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Tue, 12 May 2020 10:15:04 +0000 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 AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Tue, 12 May 2020 10:15:04 +0000 Received: ("Tessian outbound 11763d234d54:v54"); Tue, 12 May 2020 10:15:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 092b6d57b1a433d5 X-CR-MTA-TID: 64aa7808 Received: from 0256e95b6480.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 36F9C499-DCE8-49F1-AFA3-F7A7F7CA3A73.1; Tue, 12 May 2020 10:14:58 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0256e95b6480.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 12 May 2020 10:14:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ne//nhtp7An63UyP8jqNq+J4yda5lL9IMYc4LV9AlefK7TWp7vuwp1+Eyc3yhTsmdDqmH4jK+IaLE7mQ07F9fxvHwuZ1X1V/4EUhSjY/WiOF+w/DBe3g06RCAJX3J4dwsmUQARy78LR0g1BMMFxabiMBZBBrmlHPILVyoWYx73Mwj6RH1a2q2L9nc29Jvt1VlET00dOLCSLtMrISZdgJ5skYmz0q3yvxids+A0BpC8AYSEJAl8MbTk0yKhE+jbZUrtSqNBXjI0aQr4rGg+0z57WngbosiKkOixZtw+3hGpREQyjrHiRaiSYQ4mKcHA/fkGfOx2EOSCVXM6e/Qzr26A== 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=CG53rVHwL+ctx7M8HbkgG4gtY2fbxU7d7vLu1lWvgEY=; b=aqn+CF0fKmq2OnVeIp8rpirx3r3ZsntjAEsG33q8nDfwqid/IfDUaqXWFmh6BivD7uco3u8CMoBKoDyr+d7xT35jkDXkqtQXeR2fHqN9wyNOgYisuuRYadxRhQiBeJsxgIwiZ6/nI3HKONJbKPeyRZU9l4+4i/dcRSJ8uxGimpdE57d2hQdqpyh0ttabGXlE/xqLTgt9c3QkXXtUB/HnNDPuO1r1DftD8BE4FkMak7kjfrnSc/fejQ0C4jhWyzFNT54Bo2pzF1OWx8k9R02K23MuOt8IWcfZZeSeZhZX4lkAoa7yUtTGhFhva/RJwuOr7LXIAeqswsKo7CVW/kEwTw== 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=CG53rVHwL+ctx7M8HbkgG4gtY2fbxU7d7vLu1lWvgEY=; b=GJc01Imd4rfHE5okSl2PpMUX/Rz+OAF4HKqiwiP8i1pQ4dY3K11xtBDxmyw6H0LiDLIxmkNjsThIXC0yYlcW/vQxiAZAqvMrTlbOHr+pgpM7eak5ZE+QOJRKm3riXxilajpDj/HMFb5Qpu4/2+Er4mz/SZNq3JE4tFuQDxnuezk= Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM6PR08MB2982.eurprd08.prod.outlook.com (2603:10a6:209:43::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Tue, 12 May 2020 10:14:57 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862%7]) with mapi id 15.20.2979.033; Tue, 12 May 2020 10:14:57 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v2 03/13] Rewrite abi-note.S in C. Date: Tue, 12 May 2020 11:14:39 +0100 Message-Id: <91817a2bc76bf8315125322ee866f99b256fe867.1589277641.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: CWLP123CA0056.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:59::20) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.55) by CWLP123CA0056.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:59::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Tue, 12 May 2020 10:14:56 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.55] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: bdfbf287-f15f-4833-2ddb-08d7f65d56c7 X-MS-TrafficTypeDiagnostic: AM6PR08MB2982:|PR2PR08MB5228: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0+U/7y/u22UaSzpUCD8bXtk0ijFN8HiSCMrgUx+AYAa2dQXJ82NkSy0UqoHKO+omtiwweTrCxLYqNaXOG85heQXPtCFyMmwr17uAcysgd/XGufi/beIHeoN9beZPDyO/nDZnbgLGbADTuhBaobbShXWmHqyg13IcAn4aWc7NbvINlTiOfjh4HHgPdBv5ftXwCXqwp7AOWlRVDaksiCJJAOg5ixAZfJ9bpo5Yb1K3BdNAUfqcZviFBuVjPS1u6T/hzd+qyVU8ibMC9+uHFClaIlaMmGNc21wODwLEthEI/FVoGpkq6nbIvGxv7ZTCEZ/5jjj1axvm65tkAVcw4kyPVNT+x2o/5SCVYaSWJPXao2fgVG1ayhEEeCt2ILbP2hLV/bw5xeG5ZRGqJlyhFKPuApVqG3QjRQO3+ffs09SbFMKOaBmoGXTFPFY/u4Kf+1twgmiSOZ4RwRSQExU2OcEluzodptzO3f8G1jB1h9ysaOiF6X7xFwQE/sVXItlqC2L3Ux8oj3gWestpmn46CY8KA2C0sAsaDJDdtDe/TXskxQzsG6JPDXkmyEzcaUMUim8Ht1j1fyLsk0FufMti11/PQmCqW+nYM715F2S1MkhnIC4= 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)(39860400002)(136003)(376002)(396003)(346002)(366004)(33430700001)(6916009)(16526019)(66556008)(66476007)(36756003)(44832011)(5660300002)(52116002)(86362001)(956004)(8676002)(66946007)(69590400007)(2906002)(6486002)(186003)(316002)(2616005)(33440700001)(6666004)(478600001)(6506007)(6512007)(8936002)(26005)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6cSq+1AxsCt++m0eJI4bfY+y3o6FlxNYJMYT2Kfn2EbrcFxJlEMbWuUup2BjVOTfCBAcyM3N5gRXygdvqYyCixwHS+NCNMQ+O6d/nsolBhrZctyGX7avwkm5ltUSInShdAgbunHPRpQ8vkcWcZEyUGO/9c5kN+lgA0BEa+XT081wVtP/GLFnodYZfYzh+NcdiLFTXlf1Fuva9zW9cl21LSf1mxJgHaeo4B9JG2jz8J3+2hG1fQZgECCumq9aEN8OxrrfrccQfh0v1HcEkIXdlkLp7MOoxHisTFa5J2Ea/Fn6rPTeAva22/ZH/bnXC7Mbn4eQhZaDklwx5FTgqwO4K34Yq8OsFGr0HrDdNR83d1xsxDDHZ1unq1Gr2l8KqPZJxn6LyHLG1Pyf9q3K8bUaimdtuIi37mrFNnHgwRBNKY3RgHTDmG4wxU9ju9Z6fEnB1BWgjHxDTGvoTSGKfO9IMFGFw0c4WuTlXwuJXMnLCKD4xqumJ1laZyeyoX8DZ9T8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB2982 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT054.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)(39860400002)(376002)(396003)(136003)(346002)(46966005)(33430700001)(69590400007)(82310400002)(6512007)(33440700001)(86362001)(478600001)(6666004)(5660300002)(6486002)(6916009)(8676002)(336012)(956004)(81166007)(356005)(82740400003)(36906005)(36756003)(2906002)(2616005)(6506007)(316002)(186003)(16526019)(26005)(44832011)(70206006)(8936002)(47076004)(70586007)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 6b2594a2-32a8-43cf-0112-08d7f65d5250 X-Forefront-PRVS: 0401647B7F X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mSanrB4I90k0X0E2E/h/+UMvUeQstb+ptMgUdgzA+5oR1eH0nTse3oFXTwBEinGf0/IrnZckF6205G6LVhANU6nTMW6eud7gqGfD6CWpqIu/jyQizApB1YEDXnmKKtcHJDwBlMzsQyAgiE2YoXZkU94CAwOvoNJmja1ek8J7w75Ee1axmni3q5+kY7VWN7c+9cBBkjL7lji/DCD1CG2p7dXnNxmFSdpd+m3msELmEJm2x57RPnMgMDQ8/uvfdC6bFq5R9PszA3C6Q/lxj5BopGJ9o6Hv52Xe1rQdMD3REYXSofbCDtmUYynxb3bMnv8cBHG6Y/bR0GgwUvvMQK0qQ0nzyik0Dtj6+2sdcOnVG8sKbIGO1ldMgufHkkI8WV3fH2s2QPVd+i//sVj6UR8RJhMvt07G/ON0kJny1x+XiwUksb9x10q1+fjrrn9GW2rYdXnfLjISUUGWIn0NmojMgd7qJdBuWveDsmd6FBStfTuzkqN9mT4W8TXPgoz1Sf3fx7iThSfpCHk8kPa8i4Ydv8LYsmzAFA6HeYnm+N2eg36m2REfbMCue/xxENxaoOY9L8Cd392B04nx/XdQuHk/9pDvCHaByQehq4GoNjPos9jW//+0cnB6dE+TY6AGcrE8SIg/AQpQGf9ykbFaGbgCig== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 10:15:04.3960 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bdfbf287-f15f-4833-2ddb-08d7f65d56c7 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-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB5228 X-Spam-Status: No, score=-20.2 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: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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} | 28 ++++++++++++++++++---------- sysdeps/arm/abi-note.S | 8 -------- 2 files changed, 18 insertions(+), 18 deletions(-) rename csu/{abi-note.S => abi-note.c} (88%) delete mode 100644 sysdeps/arm/abi-note.S diff --git a/csu/abi-note.S b/csu/abi-note.c similarity index 88% rename from csu/abi-note.S rename to csu/abi-note.c index 2b4b5f8824..cd45f17345 100644 --- a/csu/abi-note.S +++ b/csu/abi-note.c @@ -53,6 +53,7 @@ offset length contents identify the earliest release of that OS that supports this ABI. See abi-tags (top level) for details. */ +#include #include #include /* OS-specific ABI tag value */ @@ -60,13 +61,20 @@ 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 */ +/* Note: Custom type is used as ElfW(Nhdr) is wrong on 64 bit targets. */ + +__attribute__ ((used, aligned (4), section (".note.ABI-tag"))) +static const struct +{ + int32_t namesz; + int32_t descsz; + int32_t type; + char name[4]; + int32_t desc[4]; +} __abi_tag = { + 4, + 16, + 1, + "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