From patchwork Wed Jul 1 14:37:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 39861 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 2F2143861031; Wed, 1 Jul 2020 14:38:07 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70043.outbound.protection.outlook.com [40.107.7.43]) by sourceware.org (Postfix) with ESMTPS id D4D2F3857007 for ; Wed, 1 Jul 2020 14:38:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D4D2F3857007 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=BHLx/io0FZJ2YurE5O/DL90hJy3tVlAxqhrNlqVW1HA=; b=kWhCU8Mp5xZ94afPeaoxq31JiG1ETUDy213tvAqoMAsCBlFXHprjRvG+krwHR++wQV6+Hnn3+0H7LjZZSmAx724G19zXrRXejcG+khKHECxCL+QD0YchVpAvgYfVGLRoCIAA1qeGVTSy70twErOjtjk+zUH9osc1nrvwMZPge78= Received: from MR2P264CA0033.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500::21) by AM6PR08MB3511.eurprd08.prod.outlook.com (2603:10a6:20b:4b::12) 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 14:38:02 +0000 Received: from VE1EUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:0:cafe::ea) by MR2P264CA0033.outlook.office365.com (2603:10a6:500::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20 via Frontend Transport; Wed, 1 Jul 2020 14:38:02 +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 VE1EUR03FT041.mail.protection.outlook.com (10.152.19.163) 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 14:38:01 +0000 Received: ("Tessian outbound 114f46c34313:v62"); Wed, 01 Jul 2020 14:38:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: fb123768e29c4b7c X-CR-MTA-TID: 64aa7808 Received: from 5877384ae73f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C4B56C76-026E-4121-B881-18DB995B6320.1; Wed, 01 Jul 2020 14:37:55 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5877384ae73f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 01 Jul 2020 14:37:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MXyF2c6DC/UsLDjDAlV9VU9ZJW+S2GtiJfkXVCufg6qiCtiKy1hRI/bifM8aD8tilvC37YlRiis31MoAUNvMHJQ6D8Iwat189gHTwJdNxUuMw98n9Ki8zJ97iO/8wgBTCuIVzpnzq6H0vy4tqGmuP3ASHBxOM8Yyae1nwclKQYMooGvhi/ZOOJUScESEL7u0QrLh+jkNJGIJBjjkqTferQtNj0DzMpQriBR9aKqVY+5kCCG40Pyq0LzLwFWklQBd7rAtE8WX7efzbwEV7UWhR4uqiCpQBINOyctz9zg1gVQv+GyH0IEG83dILupSC922fDFyjPRfIGNWf5cdD4gEyw== 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=BHLx/io0FZJ2YurE5O/DL90hJy3tVlAxqhrNlqVW1HA=; b=iVGYoKBTLkIrNMYWIn8x5BxtlR89/1lS9Xwwhk5ADLhlnxKc84fqJj1GXxNoZPpCrEr2IUGrEqIO6lNvPcDdzPo6IOG7TkX7lOXs1mq8zjarqKjjUX3J/SnDD2NHzlkCw+F42sxUwi/e1D1sNkS/jnle+U8wN2lSb7UbnTr6gccKXBnImNyi7paNzxIBW+jOwNlR5RCzXPlXDcBly7GhcmNtGnzRKn+J4cZ9tryThFxnps48p+j8nNtZFybDP+tKlUzumpd+GrKOxk6y559sw6ns7b27ul9qlXWirhKFaqf3NNwTzjAfPO3VRYuBW0NceV4D7UxK7mF19KslRaAsxA== 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=BHLx/io0FZJ2YurE5O/DL90hJy3tVlAxqhrNlqVW1HA=; b=kWhCU8Mp5xZ94afPeaoxq31JiG1ETUDy213tvAqoMAsCBlFXHprjRvG+krwHR++wQV6+Hnn3+0H7LjZZSmAx724G19zXrRXejcG+khKHECxCL+QD0YchVpAvgYfVGLRoCIAA1qeGVTSy70twErOjtjk+zUH9osc1nrvwMZPge78= 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 AM6PR08MB3813.eurprd08.prod.outlook.com (2603:10a6:20b:85::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22; Wed, 1 Jul 2020 14:37:54 +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 14:37:54 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v6 01/14] Rewrite abi-note.S in C. Date: Wed, 1 Jul 2020 15:37:43 +0100 Message-Id: <896f9afab21b31d0e168e61eb8781d477bf3a7dd.1593612309.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: SN4PR0501CA0011.namprd05.prod.outlook.com (2603:10b6:803:40::24) 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.53) by SN4PR0501CA0011.namprd05.prod.outlook.com (2603:10b6:803:40::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.8 via Frontend Transport; Wed, 1 Jul 2020 14:37:53 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c1842914-cf80-4e4d-0616-08d81dcc5b74 X-MS-TrafficTypeDiagnostic: AM6PR08MB3813:|AM6PR08MB3511: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 04519BA941 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: +oGvtbLx/I06G9qW9m10grozRrmvBawoZjL69Tc/EkmoTHM0UWpQw0WbArph5Q7gVXqsOhM7/NDsAIIR1HRJDcWhDTAAHEcWpAHF7jdeNcnrns0yOC9nHC+GS2H6GUmQRBMC4udBCh6d7+C2+w3StfdI3befxkz4qgmlchRA7PvAaH02Bjyvf+la6wcmGV38/P8jKfXLfw6PNsBzSBWmGG8BGmy8d2AV+4337JNe6tNqwwfECd3BpUonbiaHQbc7dVqLKY0TeCVe6zErtlESyMxOK8L0kugnkcOMWDaHHQz+b9TGqO9YR6TyOnBIJIMUOhwKAXPWR2nA9iA70cXy68eqlXfknhKnr4ZU6hXlBExGKxXzY6aLeX8zqPfpXviaZl5pLHiY64iXvVSFt6pZ6HADMT40XSwREsDrC4Qki+g= 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)(396003)(136003)(39860400002)(376002)(346002)(366004)(5660300002)(956004)(6512007)(8936002)(69590400007)(66946007)(66556008)(66476007)(6506007)(52116002)(44832011)(478600001)(316002)(6916009)(86362001)(6666004)(26005)(8676002)(2616005)(6486002)(16526019)(186003)(83380400001)(36756003)(2906002)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 97Eg5fJVSFaa8ImMWdi4pxKZwymdUWzdwnmcPOpC53L33Prfk5CKMcZjd6yXFTwEY43tquu+t4uqjYhP8lKV6df69Sm7xKY2AZA7D8hbIbU1N2ZWDoh3yGVzLiwyvhAUMwwOoAOmE18CO4NJHnLuEksf+/I4GUCuTMqPB2mwUg7JAeRSKITUJN36C+rmS/jKAyCiKvg++OFUnqIYhNAq5TfU0aheLYIgzrIrJ7nMYx64+hg/oOTcG6BMQNPNQ6IqGXRCx1WRtOwyITwxEN2lVdAPM02pIGPL0c9NM8kSnHWHeJPSe9nY9bglzxcFkLHObH9RsPaiC8ELE+I2wG4WvMlyGRQBYEmDsLKzMv7k01kVLznLZK/snwHRJ0zuqcNT+aL+pQLa6SGQvIdLncjt8EPbV2TKM0/YW4007NNZlzvo2lzy61vtVxUgEUkffBt0DJUAeSosbyJPrdZ3NPP0OpJXgFKYPHP2DYP7+SwXlhXCBZ32+4rpWN8ym12AHuPC X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3813 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: VE1EUR03FT041.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)(396003)(136003)(376002)(346002)(46966005)(47076004)(186003)(16526019)(26005)(82740400003)(6486002)(8936002)(6916009)(478600001)(316002)(6506007)(69590400007)(5660300002)(36756003)(36906005)(8676002)(83380400001)(6666004)(6512007)(956004)(2616005)(81166007)(44832011)(336012)(356005)(70206006)(86362001)(70586007)(2906002)(82310400002)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: c79b1e69-8f02-4721-5770-08d81dcc56c0 X-Forefront-PRVS: 04519BA941 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hNtdo3zOSGj4G3FK7T8nYiA5hxsMzc3SLFnuVqf5+Shc8P+L/ZynJmWEhP/1uPfmTTELCijSlsWOKI9cS8tmx5Vwza9DNdxj1a99TkpAVysaIa3MGzc0Gf6UGAauFGdUeFpBAZ/bHUvzyz2e1yHcX+vYSnziY/1JBrRCG4JhcGSx3jSn0B97peEPsEbFU8B8qMHU0TdXpKbGEsS5SqqXxjJj0Y2z7pm+jueNdrkTnJZ8Fi7Z/1VpGa5f4LIN/6+c4aElbKM3yFP0QGy2dtQWmI49M2t7KHhzjWC00oALtkygR11RumBUhucwJM7/hh6X5hL8LaH4GZbJbTWFa8VlXsMS0oZfIhgXwgtK3t/dJ1fCbJXA0V4aIFy502sqyh1oOZc54K0v+EDKuAnXigQJMYVhn5dzz3OFNJ3tSI138WrVcFjU6cexhfvnZ58eGoEiRApy6EvPmoB/SGPXUcnENQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2020 14:38:01.6530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1842914-cf80-4e4d-0616-08d81dcc5b74 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: VE1EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3511 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: , 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} | 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 }, + "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