From patchwork Wed Jul 8 12:10:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 39965 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 DB9B2386187B; Wed, 8 Jul 2020 12:10:47 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50085.outbound.protection.outlook.com [40.107.5.85]) by sourceware.org (Postfix) with ESMTPS id 33E163861834 for ; Wed, 8 Jul 2020 12:10:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 33E163861834 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=NynhcMH/U7xwYndGvy83dkNxlpa9GjZcpU3+DvfIAiw=; b=Vib7ocMlrMzRZD6tZDjnbppjpeQYJZjqsoTdkJOMBqsPvRH2guYdkd3lBEzQVz5IAOpnWERptPVq2TurIW7wLufpvMifs0U4Kq1g/WcCLOZIlMi7K3PC5PJi4rw1PCZUHitIpnYqEixz6aoILeElmW8E8BcnJfgAciAZFNswPPE= Received: from DB6PR0202CA0038.eurprd02.prod.outlook.com (2603:10a6:4:a5::24) by VI1PR08MB3086.eurprd08.prod.outlook.com (2603:10a6:803:46::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Wed, 8 Jul 2020 12:10:43 +0000 Received: from DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a5:cafe::c1) by DB6PR0202CA0038.outlook.office365.com (2603:10a6:4:a5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Wed, 8 Jul 2020 12:10: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 DB5EUR03FT034.mail.protection.outlook.com (10.152.20.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Wed, 8 Jul 2020 12:10:43 +0000 Received: ("Tessian outbound 114f46c34313:v62"); Wed, 08 Jul 2020 12:10:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3e489e621fd06af1 X-CR-MTA-TID: 64aa7808 Received: from 65b03a43ba17.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6611F75E-F4CD-425A-9979-E75ABA9644D0.1; Wed, 08 Jul 2020 12:10:37 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 65b03a43ba17.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 12:10:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E6vW+ouHrvpGtMvcGQ3MjpoSFjiEsqDX3xBGTLhOitDcRE5/t5pLWCrYYCku+fDUM8qcGNRq+kw84oVZ2bC7KUBb7Evie/LBZVIlAufauB5iLrfhQzQAjwKI2+zwdhlsNozf3SuKsN63+OgBI/Ez3lqDTq34DMFA0Yjr/BwYK5ztFL/DOZVrGT0y7Co4Jh/YHet64Rp66s/K3ZieQ/CMh5nfdgvH/MuRcDYp+yt2syysyMw93FWyPwMFUsYxZ9bTzUcyjlEHVRGLl5OKcHxtad83I0qwLjxnN4QPdL0g0tDgUMwSv/s5S+SWNDPFppNbI4Fczzx6/UfIZ1WbPuU7qw== 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=NynhcMH/U7xwYndGvy83dkNxlpa9GjZcpU3+DvfIAiw=; b=c5eTdPdCWAqnk2ACT+pooLIgMUrAsqeh0NU/z5hJ0DOhiM6XtVF++lsblIkZpup2Y9/N+iZtcR3Ur+98iccCYHfWQCBxogPRDmja1x9HCUD+Ez0JZpB+JeEeMNelwDB6NFfyMcY9TYLoZIiTBWH/cVd7qjdX5KBxTuz5ppS4u8d6Pru9XMguJf2zdifnzSjvjElmADmVmxnVXWhNdqt2pboBHNFWZvuyYwQQVE1mgtA/6VR9qcn1WXUboFx+KWf/6EJ1qQ4ysTeRMm/KsKvCmZhmUwTDOGW/SmPwqeer9ZhS+ehl6p/II7foNwBon+pRBmWMAZYyCTJ0wkrgnaDOCA== 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=NynhcMH/U7xwYndGvy83dkNxlpa9GjZcpU3+DvfIAiw=; b=Vib7ocMlrMzRZD6tZDjnbppjpeQYJZjqsoTdkJOMBqsPvRH2guYdkd3lBEzQVz5IAOpnWERptPVq2TurIW7wLufpvMifs0U4Kq1g/WcCLOZIlMi7K3PC5PJi4rw1PCZUHitIpnYqEixz6aoILeElmW8E8BcnJfgAciAZFNswPPE= 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 AM6PR08MB5238.eurprd08.prod.outlook.com (2603:10a6:20b:e5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Wed, 8 Jul 2020 12:10:37 +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.3153.031; Wed, 8 Jul 2020 12:10:37 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v7 01/14] Rewrite abi-note.S in C. Date: Wed, 8 Jul 2020 13:10:26 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: DM5PR07CA0029.namprd07.prod.outlook.com (2603:10b6:3:16::15) 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 DM5PR07CA0029.namprd07.prod.outlook.com (2603:10b6:3:16::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Wed, 8 Jul 2020 12:10:36 +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: 4ee7c93a-6c45-4696-3e5b-08d82337f015 X-MS-TrafficTypeDiagnostic: AM6PR08MB5238:|VI1PR08MB3086: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: P8aMPJ4d//YVz/5XGmEwi20Wscw7qDfxHU2jlduu3S5PT+bESp5g4ZgeZRxYfhr3nvYvojrw8tMp5B6KG+Gs9tHjsCpoP5iQ85AKde7oHNqipigJJ1CJKxyAXHnNz7tW69Pc3HXt9heZF+TfskBxZmtOPahRojCm4VJvbSPlm50Tg9HICXqHNtGyhuiQq8vCoO6BKkMGoPcE+ftMJM+wh5Fzhz78zNvi4uzqCULok4UNXI5LsLunypwyrNS2m1yWYeXXuMRTUiEXnCgzzy3hQJ26zC6X8Uc0b7xv7j1Ni4l/sehHLWC23PNPcdWeTNAGSZzgxIvRF4ehWJBIPcQYECkJBm9OftZ4KQzjYD3grquwPXStsl9IyqXGUWR3goA3nw2/g9hJqObjOgGhiY+ENT/JrMXqPh6OL/jvgi9O4lY= 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)(346002)(136003)(376002)(39860400002)(366004)(44832011)(6666004)(26005)(8936002)(6506007)(8676002)(83380400001)(956004)(478600001)(52116002)(2616005)(86362001)(6916009)(66556008)(66476007)(5660300002)(66946007)(316002)(36756003)(186003)(16526019)(6512007)(6486002)(2906002)(69590400007)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BlqZ0YZShnc6Abtbrq3An3yGxuiy04zooLgQihNSZ34VP2ttgfnvMMUkr+a6ivTJPOSYCjrdhmU/AwWMh2B7bnv9lP1XDR87v3O+kxowCPuu36YdIfngPdUvj5FGzuWoo0+bNb68NrA3SqXulTtdpvP6/1yKnXEnfJXh5Wnz13THj1QW+hwZJJXZP5Bwmqs76yE4bQaaVOap0mWrxqboy0mBoyd/GKBACwXSI+K+yRvwkLyQv71r5lCjIUaL5OXpcnlWpUI1xSzEd2ey12om74zFilKWw8l4Cajljb7PhskyOBnRD7ce6ARtwEjBlEReAORBXZ33OsZpApsaA+C6h/a7wJMoKQUkFXbtpMMPiELg+USDCArYIAN1BmKrzRpKzMVzaXz8eeyp8l1gVdTnxF8uLrGmDU4Ya2q7C7fzhjViSJ5zvYaE6ktzjKm9n+TNK1u0Iv393HyPBqOoIcC5Mj0PfsH/jXtH6/Ju+l5lZ3k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5238 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: DB5EUR03FT034.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)(136003)(396003)(39860400002)(346002)(376002)(46966005)(47076004)(6506007)(44832011)(36756003)(5660300002)(8676002)(70206006)(82740400003)(70586007)(81166007)(86362001)(316002)(26005)(6512007)(82310400002)(2616005)(956004)(69590400007)(356005)(478600001)(6486002)(16526019)(8936002)(2906002)(6666004)(186003)(83380400001)(336012)(6916009)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 8f08af91-4beb-45fb-f769-08d82337ec3c X-Forefront-PRVS: 04583CED1A X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zppqlJOB8BHBV5gIKZ29PUpscsGyywF1ur7IsLo+PuzJhwIcuD44FXTAnRcP375xGGKi9CY1MtS0ae6+OZd95eTg11s+wTeVeJzRG9wzL2YNJmr0EeXNjMz0riLsal79G/S+vuVAim/tXQ0jgj2ql4nAq0zqvkue9QkKEvYdsN5sYRKyMnlRMr4rdQ/MyRKLV3sLsEjCt5B4+fkGjGSv+j8BVuULJYb8TSuZ/JuyHhY4s1XlyJHhlWdW5GRBSqXyueP8R5zfm55ghNR+vZm5f07sBOozh/J1mP0XJGzliYKs5tKg2Y5tqy48q1xJNs5qywbHmSoIbY8ZkvKY3r6gNeB2jcL+BRgTyurM5kCM9kY2Y0Ke/k2amdHfjD4PnZGSjdRE2rbD4SQ20tdmbgxhO0v18w5Z+drmwlEio4IxDsZtphL5jHulIOTyxQWocK2BslTRIE/7vHN7/IoxhU/8CA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 12:10:43.0792 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ee7c93a-6c45-4696-3e5b-08d82337f015 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: DB5EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3086 X-Spam-Status: No, score=-15.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, 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 protection. --- csu/{abi-note.S => abi-note.c} | 25 +++++++++++++++---------- sysdeps/arm/abi-note.S | 8 -------- 2 files changed, 15 insertions(+), 18 deletions(-) rename csu/{abi-note.S => abi-note.c} (89%) delete mode 100644 sysdeps/arm/abi-note.S diff --git a/csu/abi-note.S b/csu/abi-note.c similarity index 89% rename from csu/abi-note.S rename to csu/abi-note.c index 2b4b5f8824..8febf4cac0 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,16 @@ 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 = sizeof __abi_tag.name, + .n_descsz = sizeof __abi_tag.desc, + .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