From patchwork Thu May 21 08:54:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 39347 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 17FEC3840C13; Thu, 21 May 2020 08:54:39 +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 C9E9838708A8 for ; Thu, 21 May 2020 08:54:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C9E9838708A8 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=lxTyOwNGNYo8OUBtqUBEVZ9DVVv5myAcZ2YVURWeO9+nJ9YwHLsZKgilvMsX2WVsLq5szyjmtSQWsxBOvxfBEOnwkxXUANmLK3LL2SHQ9QLRAadpZjyqPdA8vLg4H8emmozNYPnGOJCwQOgi25MCD01nnuvcKPdRAvAgT6sdz14= Received: from AM6P192CA0084.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::25) by DB6PR0801MB1717.eurprd08.prod.outlook.com (2603:10a6:4:3c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26; Thu, 21 May 2020 08:54:33 +0000 Received: from AM5EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8d:cafe::87) by AM6P192CA0084.outlook.office365.com (2603:10a6:209:8d::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 08:54:33 +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 AM5EUR03FT027.mail.protection.outlook.com (10.152.16.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 08:54:33 +0000 Received: ("Tessian outbound cff7dd4de28a:v57"); Thu, 21 May 2020 08:54:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bb251c25d3cda6c8 X-CR-MTA-TID: 64aa7808 Received: from 12cde702cd41.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id ACE34BE8-48E8-432E-890A-26FBFD58D58B.1; Thu, 21 May 2020 08:54:27 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 12cde702cd41.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 21 May 2020 08:54:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ejk/LtcDhVv39Q0UJ+n21l/1s5mHjYXJdVsDc/9SGUUVospKiJMEZ+oQN5Ct0Jb6cGB66PApszhdcUWznil4mtq7rUOJ5fCKBrPbWygyyGcfqovz9RdSPot/3v5ADdK8qgcftlrKzExMKs7Ja1tXxYDOhX3ywppAuQCDblbMorF8a1fXOETKLDEUywVTAnMn+Y/TqNPYIVxoQrBp05rV52I6VolZDzaOsEPxT16K3adV0rJBWzkIrknX7lkmxQ3VZv0H6F8TvXdDjt6d9vqjjHepE6xX90ZziDuf3beGJm7ZtOXJEy1X1IC/5JDceV6ahDbBFIYvBoDB+qXk1FvoOA== 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=CCEywpUvggOBYxcq/4pg3ohdkDTaQvCOxMKrX/6P4EDHbAx2pN/fFutw/F3+B2UwBahKc05gPUY5U/iprxY63bK3rtGE4Fqv9YUK6p9FGrdkm9NTrk/QvSB9dh7kb2VEwGCaYzu7s/ISGncfOFRbPsvHjv+dWI+P/PKVLpVJsEPUi5HKk+PO1GgBBb+Wkxs7zrzi57O+Pd7ZTdUjMOIa7aGsdYQYJhVKTqMi2iSouig2loOu2wRt3qb6Hqb0wI5YAC8rDjEDaqxviggHXO5Ymvz9WrGIKxqJ9iQAlGmy27ejRt+OlxdD6/5/eKrOqEIWR2j4XSqmFmOyDD+1SX316A== 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=lxTyOwNGNYo8OUBtqUBEVZ9DVVv5myAcZ2YVURWeO9+nJ9YwHLsZKgilvMsX2WVsLq5szyjmtSQWsxBOvxfBEOnwkxXUANmLK3LL2SHQ9QLRAadpZjyqPdA8vLg4H8emmozNYPnGOJCwQOgi25MCD01nnuvcKPdRAvAgT6sdz14= 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 AM6PR08MB3094.eurprd08.prod.outlook.com (2603:10a6:209:48::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Thu, 21 May 2020 08:54:26 +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.3021.020; Thu, 21 May 2020 08:54:26 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org, Florian Weimer Subject: [PATCH v4] Rewrite abi-note.S in C. Date: Thu, 21 May 2020 09:54:20 +0100 Message-Id: <20200521085420.19777-1-szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <877dx6dhe4.fsf@oldenburg2.str.redhat.com> References: <877dx6dhe4.fsf@oldenburg2.str.redhat.com> X-ClientProxiedBy: LO2P265CA0200.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::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 LO2P265CA0200.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23 via Frontend Transport; Thu, 21 May 2020 08:54:26 +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: 65f50d54-2bbb-42f2-47e1-08d7fd649501 X-MS-TrafficTypeDiagnostic: AM6PR08MB3094:|DB6PR0801MB1717: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 041032FF37 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: N8PznAueB8MFgRXpGQHEfkEqrgct1P5U88PlvsXIH8fGwwfArPLJZMH6FsXtccTMlZbTTbfSYkiPlsSGy7ZSt0nZFuF+hR4biuIjzjsx4GE1xFY7bNWVdv665YjFWpUN7zehLWLZ7DInX0yfbh9Xn833pcHozjsxiVmIN0kwuubtG8/9YjvHFGhTMvyxC4vwR8xBL9/pm5Nf30h8z5bHeBMFyB+sQCJ/ntl0Dt08i60+j+rbXJIlEvnxE6ojpFK0UuTHwZ2YbBXtfqel+XcEZ5nE5owOG3M6u4jgFf2BXE24N7OtOeTLCbCs0KgXT/zZ2SmG66ZPFjOo53AMHHFIaAdY4vA2vhGGks2CWPZKNaVioyw7C5K3fTm7lIBotd4t 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)(376002)(396003)(366004)(346002)(136003)(39860400002)(6486002)(69590400007)(316002)(8936002)(66476007)(66556008)(8676002)(2906002)(36756003)(66946007)(2616005)(478600001)(6916009)(956004)(5660300002)(6506007)(6512007)(186003)(44832011)(26005)(6666004)(52116002)(1076003)(16526019)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: cpYyJrtPEd6wtoCTLS39FGgR+VeKqSW93Tau6dYMzu8NIr3i59JVdwXJ9qgG9AHbdQ+ScHKDiZk1pgIjLVzOwA1qBZgbO04XDG2CN/CKPqVZ6gJp0Tj57toq/k2+vEF6inxUHg+xoi9+8IKJqlh6k5NR+S3gFr5CICNnC+FwJHiCUaoShK3DveiSZSZ3+w6U822kp6AoeRc5/YS/1hWIv8uuYG9iMemfvZEE4zlYdrWssbdc6NLw69EIrW76tBTnIYvuDQScfOl3N8OoxVUPdJH78+Yo/+Z1+we6MnhaZnKn4Kb2YoOZbe3o0UR05w/qINpBAgTIws0dLE480rh6IYJJJNhrK7wdRYj3r8m/ZvKac5RXaMQPxPmhKe0rdkf4Lp8gP10QJYDwYTvKO7a9LDlaucVECpSEeT4zzO0nhWs+bDqUCr+pFGjahYj/NFZFaqdNYaTN2/00w8ppqDqGcPl+MqrfDb8nbgeMqxorzsNuRB33GTnDNBIekvd6HfId X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3094 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: AM5EUR03FT027.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)(376002)(346002)(136003)(39860400002)(396003)(46966005)(82740400003)(36756003)(6512007)(8676002)(1076003)(6666004)(86362001)(82310400002)(356005)(44832011)(8936002)(70206006)(81166007)(70586007)(316002)(6862004)(26005)(6486002)(36906005)(47076004)(478600001)(6506007)(5660300002)(186003)(2616005)(2906002)(16526019)(336012)(69590400007)(956004); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: c9b1ce0e-ae02-4d68-ca85-08d7fd6490d8 X-Forefront-PRVS: 041032FF37 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ACCsCv1sBX0oClJcfwMJ4Dc8vvWuO/bE2orQE9pTzbskZF2KBq+c9Uy2UeyB9L1VNdhpfFO1x3xq8Movp12L4hDRjpMGg7gw9aOmvF/ZWhVqkYADVTQwnBrLtDK5eCFTM6haab6DjHpesoXHl/vzSYIwzdG7GrpK0aB4m2oN4LXxX+/jI310h+qH32EdO6NMNOgpGGBLsq0/agFoei7DRuY6ivHPXn5Zz3emph84f/9StdqxLUui2V2dZI3PBluimIX9I45yPsfLCXFP8VdlcX1OkuIV8oR3R/j6zPOHH69gHvHnOyG+TVhoNzLF4iV9rghV5npI8BJVcsA/Dn7I4HDUvkPeEjffoS8VAQB5OejiJ60zCVedmGBLQJkVrrFgwh/0RLONuGMOzE8X39NlIZ1eNxCgLOdIGeJcssooMNnbTbPOz79jttGU1oWiDFQgj4Py5hZnkEGxIVNhdXp5MnZq2v6fc2lC+z63lqq2I0JQBI+B+hcffoJi0mNkn+Y1rB7nBVY/GTdmJNv2X2sGxMnGGfymHawF1B+huck6Oso= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2020 08:54:33.4080 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65f50d54-2bbb-42f2-47e1-08d7fd649501 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: DB6PR0801MB1717 X-Spam-Status: No, score=-19.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} | 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