From patchwork Fri May 15 14:40:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 39259 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 4B3A8398583F; Fri, 15 May 2020 14:41:24 +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-eopbgr70058.outbound.protection.outlook.com [40.107.7.58]) by sourceware.org (Postfix) with ESMTPS id 8D84D3984048 for ; Fri, 15 May 2020 14:41:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8D84D3984048 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=DBE16i+dKUeMz7qVsSi/ZOL7jDzGDx7korVhkyob57G1dpLc8jPKTLyFl2Mq5s/B8O09L0g4gcCgfM3ICw22+iBPRqVgtQ4JrM8dgX6pML5UJ/Y572mi9CxS92YDeVNruSwKrlmBFU/+mhv+fohqyibqJUJjS5xEuu/VZqzDJuk= Received: from DB6PR0501CA0023.eurprd05.prod.outlook.com (2603:10a6:4:8f::33) by DB7PR08MB3449.eurprd08.prod.outlook.com (2603:10a6:10:42::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27; Fri, 15 May 2020 14:41:10 +0000 Received: from DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::26) by DB6PR0501CA0023.outlook.office365.com (2603:10a6:4:8f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Fri, 15 May 2020 14:41:10 +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 DB5EUR03FT037.mail.protection.outlook.com (10.152.20.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19 via Frontend Transport; Fri, 15 May 2020 14:41:10 +0000 Received: ("Tessian outbound e88319d7ccd0:v54"); Fri, 15 May 2020 14:41:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 87d99df0964b9d24 X-CR-MTA-TID: 64aa7808 Received: from 8bf6242b898d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FE589C84-BD1F-4F19-900C-2BAD839CA454.1; Fri, 15 May 2020 14:41:05 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8bf6242b898d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 15 May 2020 14:41:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bACX8aS5wGr9txzHvBPkjWzgWDeppQLaydsdWrJZxRdDGGRVaDpegOJWJLcj/xvWUItg5rxTRneX1cEuFus2s7zBr+kvnayTgiJ3Q7bdld6ARoKvDM0g72mmoVJQMYYyB5+Jm9mw2yAqMs6gVf5KqeeYjfbXkzjdv6wqLz8ij4znGdtSx9EArNaJL0y3PFfBalkjVnRhSkXuYB5ZNdXlxgioVLpECY7qexMA6aHtXGA+rhyYHJqIu3IGqYJXn5+acW6oAerNGhpaM3UXnlM7WKlcOJGK1ubww4/Ic0vZczlucjFNhm9oduF1MGYhRNL5FwKHCmzt/LK8wxgu676/rw== 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=SufNI37vQvzzxadV0VNHZDvO+c9nAFQyCSPCLz/G/XvEtSvswTt7dsUdfLUTG45gT8AQIKAbEFArNuWblVfqzpz1Bv2p2EAMLigoTcJPDFy2nhlMESIr/ML4863RkzD7F1TWVu/DE4wbBZHlvuQafLZcViHlMk34x2iqyvOnJiP/UArGE8qoK/PteBd4ffUBpBZLVPaFIWRXFZ0piDdM9641a6gvWTPGYHTHveWkPNi4eA5cls/bBwDJ+W+Nf74KSNfK/Ow9/VwhRW7WnVtE9GYUex4DLk0r4/0a6lri51TXvQq87EW10ua9d9BKPs2zLAmQw79DqxGXz56jLF0vdA== 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=DBE16i+dKUeMz7qVsSi/ZOL7jDzGDx7korVhkyob57G1dpLc8jPKTLyFl2Mq5s/B8O09L0g4gcCgfM3ICw22+iBPRqVgtQ4JrM8dgX6pML5UJ/Y572mi9CxS92YDeVNruSwKrlmBFU/+mhv+fohqyibqJUJjS5xEuu/VZqzDJuk= 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 AM6PR08MB3528.eurprd08.prod.outlook.com (2603:10a6:20b:4b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Fri, 15 May 2020 14:41:04 +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; Fri, 15 May 2020 14:41:04 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v3 03/13] Rewrite abi-note.S in C. Date: Fri, 15 May 2020 15:40:47 +0100 Message-Id: <6fbbbbbca662497f180ea5356d50a4f16a3b5716.1589552054.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0309.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::33) 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 LO2P265CA0309.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Fri, 15 May 2020 14:41:04 +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: b18c1321-ca72-4f9d-8935-08d7f8de02b3 X-MS-TrafficTypeDiagnostic: AM6PR08MB3528:|DB7PR08MB3449: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wFkG5Do+FzwzyTLG0XOuy6sE0GCGV++oC04w2chIDBX45mdl4MKgOrVnXRfEuoQI626S//bvj6pm2UDxoaaM31KN8HKpZHOKv21ZcqzDlgrA0jJId+9xfP/7EAm42PbhYE5/j2wL8SoUy7ChjYPllk6ccKvszZ1DDtl4YD2QJt8RsBrT15tRFsL6sFM9YFl7+gpqEDRuLbN9uu8iPCq6F9LmSdotpZjRdm5Q+Y+JVHKNgJiGA6NKy2PnN4bc5DBLcRRvsEHJSkHdkU68x3jyeCK84FIi/gPXz+FLN4GgDGRL6entTLJ4xiIvRb27dsN2DrVSiy6NJjmOkuO6wdd3uOFhSOvjTsirZHzDylirq/MsFHJO99395BP+tXa/cuv1Zm1C/eAUAZkzPqV8ZQ9R/3H41gDrfjh4hmski2+nYJIKIRGHkUqnfFIWxrD1Ft0ZDmmnYumLWoIcK43+T4sMFqytJEgDx9jpv6ddvp7hhES+i94rLE8eNsFxisPJmn8IImOD4nxnFGU3PFLBn786mBuS2nPDdAW98CnzsJBiRVg= 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)(376002)(39860400002)(346002)(366004)(396003)(86362001)(6506007)(69590400007)(52116002)(478600001)(316002)(6666004)(6916009)(6486002)(66556008)(44832011)(6512007)(5660300002)(2906002)(956004)(66476007)(8936002)(66946007)(36756003)(186003)(26005)(2616005)(8676002)(16526019)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: bFYX3uDras0Vd6oMnpoISNpUACbAhlGfmyIetbpDY2PANB7FgbfOV9xxLl7HMpV1Ao/0NHKu23Z42OFxXenFAS11Hfek9oZjXr+d3BVnTrqFJVUXxImk+nPNYKXwBC+LfQEvesFfsi1F385mBZCNVfwru3fpAUaLooI1q2nzoDWBDjrRfSElcegIcrOl7jXxErf9R344FXvWTD7CValyZ3qQW1lS0h6AzGZWqd3w3TE6/nIOPFGUU3Paeh/Odf6ANRa5VyYtMi8qZsVOp3r4j1b7EUxIOExqO2IDGC8hMa7ClT7LtCrEVdF06C6Qda1duxKk3jyPKDny7QfTirmLcOgXePved3SkiDHhW6tkOfTNdAALG+/cpVUntsgoqMX723QKFx4ZI54L2abi/O17g972BF1NX4pTNkgzNHSKmfdCify8CFQ7rRHTznrnNjCGutNHRpQw6pbkBw9BET8WjjBuMm5LtAIuKN9KHuVh6RC66tajRFNzmmY3590SGWbk X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3528 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: DB5EUR03FT037.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)(376002)(346002)(39860400002)(46966005)(6486002)(478600001)(2906002)(44832011)(356005)(186003)(16526019)(86362001)(26005)(6666004)(36756003)(8676002)(6916009)(6506007)(5660300002)(69590400007)(47076004)(8936002)(82310400002)(70206006)(82740400003)(70586007)(81166007)(336012)(316002)(6512007)(956004)(2616005)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 8c485dbf-40fd-4a6e-5b70-08d7f8ddfebf X-Forefront-PRVS: 04041A2886 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kUJSenISbHGyxsJ2ZT6z0W6ZElskqIDXDQg2GSMHZKgNmJaZTheFc8wHbQ/8zCmcvsP/tQOs8RdBfOzkWU76ekRe33jQPmuAQAmO+vk7+vm4gjgL/pn/tmcwClH2XoIRyXkgHeiFohOvOb9xMadNR6mDwBKUCLX3Y4JAAP0/DvBOrgZoi823PSsQPC2n4daVznCpEmZ256ooClGu/GyugTbIP2a7RDce7Xew1V92B3qsXh8BijYn5pw91RarNMTgKcHungLNzODVT3PZrJRO/krcMgZSGUP7lbW3LA6ewRuG0ygqga8jwbZWv2rR4toysIfXkzyCHrcbSuTpbvaJ/C0cWHdfe2rVQ0viq7PpQPCYQsYpilP70ubyW2qV/4i2MvdUc/LlfKyxvBztyWNyP4ytM6+GNJcfBWhGKQGnOqqudhs/MFg9bYn6nCsnCnevFeeZZT/HUExq4EYc7IJD3sremfX4Hr1BCvCg8DqscmxrNAf1BgPa6/6Q2V6mmGOdUY28UuBFiNmubUuQ7faQn3NWoJfjbtZyn5kM/HPDUdH2oojhh1nvsDTGLV2xKsK8uDi6MO1hWCVPkx3lwzZeBg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 14:41:10.7903 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b18c1321-ca72-4f9d-8935-08d7f8de02b3 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: DB7PR08MB3449 X-Spam-Status: No, score=-19.6 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