From patchwork Mon Jun 22 13:59:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1314406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=u3g4PCpa; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=u3g4PCpa; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49r9yH0xywz9sQt for ; Mon, 22 Jun 2020 23:59:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8AAA8388A80E; Mon, 22 Jun 2020 13:59:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130082.outbound.protection.outlook.com [40.107.13.82]) by sourceware.org (Postfix) with ESMTPS id 93DA73887013 for ; Mon, 22 Jun 2020 13:59:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 93DA73887013 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=u3g4PCpavs0rL5EbJxRq9tBGFC4bXk4Rpp/vM602xxe+EUM4wVpyvIRVfG3Eaos3A5lj2E+M1daDClG3g0FWfhWqa2OLP1yuhoV9IyWOxGiO4ng7rmkyMcnO2KGRFYvhGoHpDsPb+HpkmPTEziaKwb4WBME81ktuzJpw+6tOl3U= Received: from AM6PR0502CA0038.eurprd05.prod.outlook.com (2603:10a6:20b:56::15) by DB7PR08MB3209.eurprd08.prod.outlook.com (2603:10a6:5:1e::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Mon, 22 Jun 2020 13:59:28 +0000 Received: from AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:56:cafe::c7) by AM6PR0502CA0038.outlook.office365.com (2603:10a6:20b:56::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Mon, 22 Jun 2020 13:59:27 +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 AM5EUR03FT033.mail.protection.outlook.com (10.152.16.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Mon, 22 Jun 2020 13:59:27 +0000 Received: ("Tessian outbound 2ba684f51d22:v59"); Mon, 22 Jun 2020 13:59:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d5d16bb5af3205b9 X-CR-MTA-TID: 64aa7808 Received: from 17e2f8673d14.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 18E7CDB9-FDB0-4B0B-9544-7E484408F469.1; Mon, 22 Jun 2020 13:59:22 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 17e2f8673d14.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 22 Jun 2020 13:59:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CvONO++dCII7yTD/6XTl5NyebY2K4+lzvYABDmWJc89g7r3G+PhuyjGYFAtRXam4F8eurfH86VQpRSCUGZ4mOq6emgNLN/ppaomHCzytPONFhxIgv8joj1ncLxvmwEPRGd8qT46HKnJ8aUZ2HZ3EixwO7ZIm2GyWu5aMSZLKX+FBgfUZuG3+IiUXy2rxmwIBkNahjHsgOpcrySt+1avxQ3MzjNa+sOsbEjPdYq13PG//dC6bi+h5bYwRMaSxG43KYN6BCVSDLJmMG3csxjmVA2hB9DygUZa6zAwtqelu6mW+vVyYYO1XPH0m9HyxxySRm9+XtY6LB6Y78/5tnJcv6A== 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=ZlCSRoRAfbwUAQuxZfxV9dfnvhL9zWgmPV5Y+mqgigT9JHA4RnHdVykP9DqB+GTc3YZtUvOTHFvGfsygBcZPYsxDVu6c77UpP9zW9uPf65zFD6y7jZoj0BwyH68RspI9E3fKzhaNuNLSfY/txM7ayetHSMJ2pviar94p0elLGIrJgvp5xiBcpT40zatbMDTivb8FjMhXZeNRjsmKu4x5u4C6PI3CWtjZsgqKwIL0HYmJKdMF58cNZ3To3jwmhTosohs9pO4Vi4h25XDGG1gOFoFtOzf1QMAoOU0jEJIGZlvhfglsBX27cqjsX59H2fZWe6kn1vPOG+TzyuFaua1vfw== 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=u3g4PCpavs0rL5EbJxRq9tBGFC4bXk4Rpp/vM602xxe+EUM4wVpyvIRVfG3Eaos3A5lj2E+M1daDClG3g0FWfhWqa2OLP1yuhoV9IyWOxGiO4ng7rmkyMcnO2KGRFYvhGoHpDsPb+HpkmPTEziaKwb4WBME81ktuzJpw+6tOl3U= 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 AM6PR08MB4344.eurprd08.prod.outlook.com (2603:10a6:20b:74::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Mon, 22 Jun 2020 13:59:21 +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.3109.027; Mon, 22 Jun 2020 13:59:21 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v5 01/14] Rewrite abi-note.S in C. Date: Mon, 22 Jun 2020 14:59:15 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0126.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::18) 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 LO2P265CA0126.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Mon, 22 Jun 2020 13:59:20 +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: bcef9ef9-c5ab-467b-3da8-08d816b47a96 X-MS-TrafficTypeDiagnostic: AM6PR08MB4344:|DB7PR08MB3209: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 0442E569BC X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ixVsvziL1LTCdJD5GJ22K92mvLFjcQ2Ho84n0G2+yHnzkiBc5JOJyY30Y3W4+5NqeAjunogVYssMXBOZWM9AWjeRv7YROKeNm0KoIk95eynIe3DexPau/JrBB/fliEti8iX4vmVB6Wt1PFD1jlymE3OiK3jmlkDs/ykvayb7dr1mbhykyB1WbZ4ZnDNnvmCCybCEUBDz8tTy5ifZyQ7mZHJSOYUz/HXT2f5A8h2HFX9djyziyHmFnUjKaKLHM7HceB8GMmyMxkyR2OtqtBUY88L/M0MmNUCLHL9n0mCTTUaXDi8VSupvUM3lLE3zmGe9MnP+7IfAz6HWlKugKqhU6ndkKMiVI+Y/2QJaLWVKUeCM+lXp79Wl4XhWhpil/vbiUnwsQMeBL2x4YyiD3XU2o/qZJPmSCfJ/21uMVnAu/vA= 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)(396003)(346002)(366004)(376002)(52116002)(2616005)(69590400007)(66946007)(66556008)(26005)(66476007)(6916009)(956004)(6666004)(6506007)(2906002)(186003)(16526019)(86362001)(6486002)(44832011)(478600001)(8936002)(36756003)(316002)(5660300002)(83380400001)(6512007)(8676002)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: V0vxqX+khblzd4fSmDOso6O3vQCLwddiqZrHeVxXos3HO8UFyIleMVPtQL6le/eS/j0LtmoSKb6DOdp5zS1uTIRYuZtXXrZDQhQp/WPEk6BShqB40Ay5ItYfsPUj9SnvUyZW8d9t2T0GmFyHF+r7YdlvUBZiu8o52L5Cwk0d+z2/J+uELn2CsxnYS3HxJi+eO1SNbiFUUd7V++O6nILU0E+K3UQU+xzrniy6fPxMXC95SI+qYkO61GZVejEcDVut1yKeQpX7Kvpat1kPWkqe20XMaY/0tta9cJJX5odLyxICSKCuNBav/zCTtKNesStmWsB8/vOVO74pfctTsB6ayGTZMpbdmx5cqmbYMgdJNBjct+kARIkuSco49yWRuJcwYQMpwO4Lhv3/+WFD7qXoug0PJPWXs5CC9utSB5wVPOL53r4GvtT5O1vIsnEswQC2TuB3dFCyXJYRkYV+sGuQMMYkMRfjLOULsXOgAKKKYUU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4344 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: AM5EUR03FT033.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)(346002)(376002)(136003)(39860400002)(396003)(46966005)(70586007)(956004)(336012)(8676002)(70206006)(2616005)(6512007)(82310400002)(6506007)(47076004)(82740400003)(69590400007)(81166007)(83380400001)(86362001)(36756003)(356005)(44832011)(6486002)(478600001)(6666004)(6916009)(26005)(16526019)(36906005)(316002)(5660300002)(2906002)(8936002)(186003)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 71b8f26f-6baf-4c3e-bfe8-08d816b4764c X-Forefront-PRVS: 0442E569BC X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0I059I9NxgKeZsXPUiefuTIXDyVtrWxcILtQ+xQK09HvNSAiDoldYZfMLstWU6RaY8IIWsXVDd4V+2zP9qXWgz5o8dH6QzGfPgQZ/02ywAlORNTcSxyQapyOjwLek3a1OImuCrKbfPGvagcpbe7WNaJgLU/3edccgRxg/ZBJaHyfuHH8n6AvWuoX5/5GfJn2ofXNy+9kibf9P6d3ApEH4FQJ4jdTc+Sn6fBWxfhZ4oV9WjTf018qRpNYayHZlxV7LlWo5gREIpk4WGJCmju2FeCA4bcFNhkI+KNiArN7WvztRYrpJDn1r8eudzL1G8X9jwtl/nEfXH3qwNy2/DHpiSOu1ALqaoq0Ev+jocihv8aDo/v1iBiUgj6yNeOJjNMhUGgwzLmnqlveoV+kI+L2HpDza6zVbfJSFXHEhyd26Y90WdmSFqmocnafj1zv08iCx1udgkjPKtK+Pcka7z1opw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2020 13:59:27.8727 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bcef9ef9-c5ab-467b-3da8-08d816b47a96 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: DB7PR08MB3209 X-Spam-Status: No, score=-16.8 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