From patchwork Fri Jun 12 13:29:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 39572 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 A64E9395ACD2; Fri, 12 Jun 2020 13:29:54 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10060.outbound.protection.outlook.com [40.107.1.60]) by sourceware.org (Postfix) with ESMTPS id BC121395A825 for ; Fri, 12 Jun 2020 13:29:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BC121395A825 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=1eCCy4K0ZwckRZa6CL8WWLwGepdAnId5Ao552RsUuGAcT7Kux3GGznnZmx5WikaEs2nfwA8uq2YkVdL/rn+bQOJF7/H5KEZEY0jeVER/d2pDRb+eaQnw4rsrmybD4P78fkrDeWlhpDvdC/R2nhiLgcmx+m9jHV4p8LqQRmjinvU= Received: from AM0P190CA0001.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::11) by AM6PR08MB3160.eurprd08.prod.outlook.com (2603:10a6:209:45::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.20; Fri, 12 Jun 2020 13:29:50 +0000 Received: from AM5EUR03FT031.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:190:cafe::37) by AM0P190CA0001.outlook.office365.com (2603:10a6:208:190::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Fri, 12 Jun 2020 13:29:50 +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 AM5EUR03FT031.mail.protection.outlook.com (10.152.16.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Fri, 12 Jun 2020 13:29:49 +0000 Received: ("Tessian outbound 39cdd740f5cb:v59"); Fri, 12 Jun 2020 13:29:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5a24575f06e94c3d X-CR-MTA-TID: 64aa7808 Received: from d167b7339461.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1A1A4C13-61D4-44CB-A3DE-8EBE5575E99D.1; Fri, 12 Jun 2020 13:29:44 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d167b7339461.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 Jun 2020 13:29:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mTudcKNMsiWdDS6K6JvTtWbBqYrQ+h9nLLBnu19tHvJxaKDCKePDnSSBI6F9FPF7A57WlzWzHDT9OuBv0+SWttNfgZRTVFtSWtMGF180QNUkH30ie950qYLpK7yUqCCQoWMW0NbOD3SvLBSXANoS0+nOXr2Ziu89EHhEW3Oshn0b8rpz47Fr+rMYjM70dPV/u/FtnUKFlT/8DK/lVu+PV7IQrL8xUfyUdVTqWM6sw3N/jgIWRtuLUzBs5dHrAMsOG7wRoJfD06RAKFxvmELYHweLmDHdDYhcNYoccXx/e9X49bpEE556q9JpwinbcCd1u0SYG29o3RDRxD4FwWlnfQ== 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=J/umnHuzroO9p1Nt5t36b74MTM7y66AoA0OhDK9uKPl00GzG+Unth6RzYQil1CzO+vab2eiX6gNA1Jnwl4SXT7Q3aPZsze4zpo60OXtDtDydRnPfrsVPrWAB64Ud4Ob8jr7zm0dj0SzLyu5TeT0rQCkcnPMF7j/W964ma7Cu9xu30KT0BeKxc9hfi2z577QtQXbmNbJao3UuPQfy2QENl0ppUN4J5dCda6laf+wTLuH9Eoey5IHpaQ1lUoT4E4JXU9PqBhp6e87V7r+U2qqhTHOwv9J5b8InHGRkNiYtWbijuZiZJ+EvCh2Cqf2pT50wW+EiXnrvq1kJye1/Kvc+tA== 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=1eCCy4K0ZwckRZa6CL8WWLwGepdAnId5Ao552RsUuGAcT7Kux3GGznnZmx5WikaEs2nfwA8uq2YkVdL/rn+bQOJF7/H5KEZEY0jeVER/d2pDRb+eaQnw4rsrmybD4P78fkrDeWlhpDvdC/R2nhiLgcmx+m9jHV4p8LqQRmjinvU= 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 AM6PR08MB4183.eurprd08.prod.outlook.com (2603:10a6:20b:a1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.23; Fri, 12 Jun 2020 13:29:43 +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.3088.022; Fri, 12 Jun 2020 13:29:43 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v4 01/12] Rewrite abi-note.S in C. Date: Fri, 12 Jun 2020 14:29:19 +0100 Message-Id: <3120eb8a4280eb19a87af2d0243cbde54db99930.1591899092.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: SA9PR03CA0017.namprd03.prod.outlook.com (2603:10b6:806:20::22) 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 SA9PR03CA0017.namprd03.prod.outlook.com (2603:10b6:806:20::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.20 via Frontend Transport; Fri, 12 Jun 2020 13:29:42 +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: 8ac54461-aef0-481e-7bb4-08d80ed4aebd X-MS-TrafficTypeDiagnostic: AM6PR08MB4183:|AM6PR08MB3160: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 0432A04947 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: osSbaG7OuOvf7rREVk1VFHPoItPOR6ixxjWJvrjBmfJ+CZ6/PHsT5mHxM3T8ggyD5gpTpOE00TRbuWRh1/h6Ep3iI5V+f99d8Jzb7j19zXwwF7rs5Tx6QNCA7X/CTjE8RC6oFnOTts/5e6NCJKcbl6Ep9QSJvGCB4MYFO3wtLY4F8ncY8GrFJnVtNc+gFZdWjB5/RyRUCWjOPev2j0oHhYFKnBb3fZRZJcb81DEBNADg3QfK9wIufhMNNdbyDjVTk+4cvDgnIw9OPPsIOVUEniYh7ko2gBEN3hWksWrNP6O3b14GS8+q97yojVkutKec+RRgq1LZy4uwnIg3TzixzJg7ZH9P80Mp805ZZMpFY3DtSuZoQNRllNH1hS2t5Bj1yG7dtgkEbgYjsKZTtKiGG/S/5UqYXp9LLZd+cMiA/gs= 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)(346002)(39860400002)(376002)(136003)(396003)(366004)(36756003)(8936002)(956004)(8676002)(26005)(44832011)(5660300002)(2906002)(66476007)(316002)(66556008)(186003)(2616005)(16526019)(66946007)(69590400007)(6666004)(83380400001)(6506007)(52116002)(6512007)(478600001)(6486002)(6916009)(86362001)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Tjx7BSYQc3UIi7vgNWX8nhU7Sf41TdHYXFEeKjYKiUFyUjL9xmYcKS+OGxCg4xiXRR94KN1EAlFES/8L5HXCD7wYKH3IUK1mG3OygH1xwN3aeZmxpox2rw8KDLY9rYaBOOAqRP92DrklQt6DlgjY3RzGpXB0p/nXh9g9gWfHwGtXocpvwQrS+VqjBHBX+vpVSK582/he7RPWCqjyRBAXmA7p7Xvy6Q9ZOquHpOp+mW4SzwrDxKz3fz9/GLpaIGUKoFFEJTSEb8QGCL2Vjj4ONQN8biLoOFNlv5h6YOQIAOkr2msrk5UUWlcfPwUOuNXwEsGgLUJ9U9lmlXVUsu7Cxu7VzWQuQK7ViS329ZEr+xIhieCsMmaKVBCZ5HoGm9f76hrnKE8B5dKxvcO4Mo1UD6QZRCi6TFZTFjBmxlXkwTkkOI4D7MWaF+lAj6Rc/Vm1y63jJe07/ojXOWSMIl01CnbbMmrkJKFhVE/DaU/5Sxw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4183 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: AM5EUR03FT031.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)(376002)(136003)(396003)(346002)(46966005)(8936002)(5660300002)(186003)(6916009)(316002)(8676002)(16526019)(82740400003)(36906005)(26005)(478600001)(44832011)(70586007)(356005)(336012)(2906002)(83380400001)(6512007)(70206006)(956004)(47076004)(82310400002)(6666004)(81166007)(2616005)(36756003)(86362001)(69590400007)(6486002)(6506007)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 6b6e234e-fd7c-4930-8ac5-08d80ed4aa6e X-Forefront-PRVS: 0432A04947 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 524w4ETDqDidc2Usod0uaKn3C16hgOCMniwf5msD/HawOnprQdvLzK3iZs0NAR6EVDjKauoD++585pjWYL9HsSVjeRypDFWGsC/R+cLWjNOkAZgcpHbelFnhOwTVOVCVTsTe4LDM6/ng+fUraTJzRd1YaabmD9wSM+pnKEjK5Em1WUfCqieo8duXW0PDJRHipd3gFwkD/0KRqyDRSv6BVJen9trQoJmdfIrVe/h8ocBaW5FJtSa6eiGhKKXtBVcjkNPwLoqfFhqtn7vDTY1lvOC2cnSOggnMw4WsTtOulKOKcmGSfDUS1aH/+ZwWCccYAjWvxshvRhRTw/u74vtNH3qDuhB0S8CfX9ZN2w60Vghpefz3bAaQHKA9kMtrbq+dLF/tWQzYAJTh4oL6XoHtsuPlzzIYOKZA2ZYpXxexEPvMEKUMWtaw6+fvLrFfbujqwMBoxVotvOVGjdhenJtEcA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2020 13:29:49.9844 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ac54461-aef0-481e-7bb4-08d80ed4aebd 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: AM6PR08MB3160 X-Spam-Status: No, score=-17.4 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