From patchwork Fri Apr 29 09:36:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12831673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC89BC433EF for ; Fri, 29 Apr 2022 09:37:27 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.317073.536246 (Exim 4.92) (envelope-from ) id 1nkN3q-0006DB-UP; Fri, 29 Apr 2022 09:37:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 317073.536246; Fri, 29 Apr 2022 09:37:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nkN3q-0006D0-Qc; Fri, 29 Apr 2022 09:37:14 +0000 Received: by outflank-mailman (input) for mailman id 317073; Fri, 29 Apr 2022 09:37:14 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nkN3p-0005tt-Vq for xen-devel@lists.xenproject.org; Fri, 29 Apr 2022 09:37:14 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ed10e22e-c79f-11ec-8fc4-03012f2f19d4; Fri, 29 Apr 2022 11:37:04 +0200 (CEST) Received: from mail-sn1anam02lp2044.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([104.47.57.44]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 Apr 2022 05:37:10 -0400 Received: from DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) by DM6PR03MB4825.namprd03.prod.outlook.com (2603:10b6:5:187::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Fri, 29 Apr 2022 09:37:09 +0000 Received: from DS7PR03MB5608.namprd03.prod.outlook.com ([fe80::5df3:95ce:4dfd:134e]) by DS7PR03MB5608.namprd03.prod.outlook.com ([fe80::5df3:95ce:4dfd:134e%4]) with mapi id 15.20.5186.026; Fri, 29 Apr 2022 09:37:09 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ed10e22e-c79f-11ec-8fc4-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1651225032; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=TvmAqsUTGDPD43B73PPYjQV948fkcZfmfIipPMxthuY=; b=XCDm0mqG+YruCRLzS/ufAVnT/8Q30BZfomWsKJRW2zsM//iE5QrmguKh LlLIEEnjwaGFUE76Wl+XGxvL+BGhrHEKO74bjlCp4gwXprGNniI1dqyrF k1RUNsNMN673v2/z/5lrkwfVBbwpZhlPQ6fxp3vcXgH+YalWVr5aBba28 Q=; X-IronPort-RemoteIP: 104.47.57.44 X-IronPort-MID: 70238449 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:KHuZ46Kje+VUgiYoFE+RzZQlxSXFcZb7ZxGr2PjKsXjdYENS1D1Rn WBODDjUbPaKMzD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DIini9QTKB/rlgG0Db4REIGqjXQQmqWC+VwqmN 7Dr1MJONly0WrYeiWPrR7ky2DboUETA9OL8y7qvVLT5ejCAB4qActIgoxUNjHD7VA7gd162K VXm0qEqpt+F3r77WrAzumNcysvulu/oHIkn+JWpWdYS5EiZLhYqpFa1F9JEa0HADnx5OkcYa ZT5fnnlbZrmG6hHjPkVjEF+q3vYp1zJGbLfqE6gL3V79AM90oJinfxx6Qk7wM9HdwGOt15Dt //Q9VVfYF1P7ErhJ1GdZc8qLOMewrwqDL3QRSvyAfcZeg600ykke+E3JwFoMeXRbcv8Lwe3L z8bXIwjx9GR6upM7zC4KF2 X-IronPort-AV: E=Sophos;i="5.91,297,1647316800"; d="scan'208";a="70238449" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N6AZhgU6YyzcKRZs+OGU9iRXWeJPhkxyTdMjGfAzcV3x+O1ZXxV1kvRw0pZsc3gmOu3hGfSq7s5WBfmS7K8wX/aKw+LJUEli6l+7ZJ1okzUAAOXH9zd7rzdtEg7/J50JUtP5oJdL6I1E3Qzr+TDPdQj0KAve49BrX982PKarySkp1k6coNMEmnBmDAthRECaAzfA6bbSccTqEj0JneFrNBbVufr3BEd6YTAMdWXbqDqgxThpHxZskdn4VIWWaRpqFAmNp58iIAhsNtq/e8S3RJ4zCeyH60CNEEeiIvob6o/8LL8BbQKiCIKsnQzXx4oqvaaYkfq+jvZ8vf0uj1axpw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ym6N3M5LNo8FbySG9wQ5XDzt5zU2d2LaWp3GmRtJ71I=; b=DtaiZDXcmZJRN72T90Cwlx6QPaLXuYIwKkOHpuVjQUIN/R+GE97PvOt8VYcvBlBeR7VS7e8sgo7ZLrB0vvn+4zisGW3vxQ/VddpZmZxRbj0uy5rdgJjBJzvsLcpsshLw6FJoNJd4t2aALG7D4J+RaTH0IIRHkDpgwBfTJw8xeBa57W4qfasmu90Host2swV+/deNSSJTbXtQeB54NnWn4/ZGQ2+mOb3fLLkcAtez22iVobKkTusCgbZE8lRndyWuiztXwEQSkO1+uSxoGOYtP8wM3cqvh+G+lPGzlwBhh2oa+XPUZwO29hqb5Z02/CEZIl12efm17Cx4dIDVrX64yA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ym6N3M5LNo8FbySG9wQ5XDzt5zU2d2LaWp3GmRtJ71I=; b=c/ED5V8nC1aRxjjey5JgtBtfZF8AfwlzIX7buUADnGXT6zJ/Q0Gnvlon/yCup77V7gtdbhnfzesrHQLvnVVN1W1pcLFxE55hNKyY3tbp6RfcJNa+gCexzyMw+P6HQ9qFVC127pJMPuCL9bmV7RTkKe+/wPY8s+fsi0GyU2sQiyw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu , George Dunlap , Julien Grall , Stefano Stabellini Subject: [PATCH 2/2] linker/lld: do not generate quoted section names Date: Fri, 29 Apr 2022 11:36:44 +0200 Message-Id: <20220429093644.99574-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429093644.99574-1-roger.pau@citrix.com> References: <20220429093644.99574-1-roger.pau@citrix.com> X-ClientProxiedBy: MR2P264CA0171.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501::10) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a660e286-a746-4674-7e81-08da29c3d4b7 X-MS-TrafficTypeDiagnostic: DM6PR03MB4825:EE_ X-MS-Exchange-AtpMessageProperties: SA|SL X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t7U7xp2AOme4nHG1QWw7SdMZgr/4CR0kFhhBmJPFD3ukq/ouuOhW6gJSC2s+AkxEOEZnzD44AItvW/WVOQcIArUFWe2qrdZPTNlS2vWCH6J3ZIbst6uqlAAS+9h5ToIi3oH/situsS3C1X7jRFemCp9TQ2kCKwGdlEquQK6igFz6qqsr8pc6fI3JLfj1gnzZF1/BCbpZp8NV7QxxL4PupJYb15hJz+M9H1h+q+aZOJdg4ql25S+hk6lsFrHuO066jYNmjApmdZ2XyIOUCzQEgOIexmHRmww27FFxqGV0P++jcJSBDTCBXp4uUrR7m8jVCH7+At3Q8AvEfUoUJi38V/fSUTJn72fZQ0zrQRbqf2N7WkrAl7FTjLWoZ7amDgHSV4nDmhLSlfspcpnw69KNLOizFjH2hvSTOcpyDLVu3F63shTtYyEIEg1B691O4gK7lJ3Zet9giONsNOhFr/v1DpNHlbBXJ5Z46+kij4bZkSExptDvv7FOsTWGnuB7DVwux/+ApsPUUNzgyoYcQVFlfNmLOQecLjY8S+bcicWK1MYYmTSt4Q5HjHxZpDO9IPszi2Py6s9APUXeaFh37OymcWtAomFx18xBsRoPLklVrW+RYvsh622juBtyM4NX0q2t6fsRGyOW+jjEaTPPXAB/tCEgZ2ArnRU3XqkdndexFW/YAQ7POPmN+MD9RHcQhYKfNfsZCGC06jPGdiZ10K2fZlb6DWNBnOpPs36P4K5HTNg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(6916009)(508600001)(8936002)(36756003)(66476007)(4326008)(8676002)(66946007)(316002)(82960400001)(54906003)(66556008)(26005)(2616005)(6512007)(6666004)(2906002)(1076003)(6506007)(966005)(6486002)(186003)(83380400001)(86362001)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?THIILTWMkVtSqp/c5sz5/84RDU0t?= =?utf-8?q?VOS0IKNONwmqK0I3PChFz8H/xjLt5Q8Z3VPIo8+ytn4D+2MDf9T+ei/OW0c+jwGb2?= =?utf-8?q?ZMt6oWgLXdvT6N9e+vq+U6JR5cNAsd89O2nthTVOLD7fMkZzJejMqlmAu4VRoQXID?= =?utf-8?q?CyNYO1U9sOpe6oa5Dlsfo5cNpa8yl5ZWoxAq26ydTpnA1c6gOHYeFoqvqVGx/Aikj?= =?utf-8?q?hDyUUZ/Egtp3K5n36IH/SrA37j0eYuH69MPVhSGlZ29SDnIk8Cctf64SczAtKVLC/?= =?utf-8?q?VPHSEbGpsaaJw8NMzbr1J15jrjhMYGN4QHOvJCfMm9bAGNsMj6KWKToGIsUNPq90J?= =?utf-8?q?sxQSaSkdfFbHifxPUHo1D8aYcJ2NZWqdfnvataQ7LAcvHVKK9dbMSBXeXfHKHOSU3?= =?utf-8?q?ynApbzRFtBMSXtlooqm9Wre7UhX2t/FAJ8AxYPADzFWGSkTsrHNCmIf0Yk6C+YLhs?= =?utf-8?q?DNpYcs8KDdbi5Z/9I/KAk+FMtg0P1uhztYHu0js3X6acHonYVPQPnsCtcpwEMFC2b?= =?utf-8?q?zaoa8omtOMvPHhppEZMUxa2ysvHNnHHXT7ujkQNhh+D3S7e6V8XWo+Jx1YFcgq68K?= =?utf-8?q?e/qAm6Y1K/a8LOTz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QXVJsi9q2s/F46Rf/SWLuQN6EguM1/eOOnOiEcxG9x?= =?utf-8?q?V6oshyhJ3fCNX0bcwHQeLxBd1D75Wb0ks7p/glU0bv7ebwDvlLoN1eI+zkEHRNsHi?= =?utf-8?q?0uNipFKV6G58d/y/8ak2p/bFXt2Lo7pWOZcXv47bwNz2SM47GZsv6AYhgRBSLzZbu?= =?utf-8?q?2vdqqNLXlhwGAfi9ksdjoOshoTb5QpReG/jgStYIai0bZpDbusvvA=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: a660e286-a746-4674-7e81-08da29c3d4b7 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2022 09:37:09.2377 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ltEPECmoFMr/xXWpJpXTTgtz/enXC1V9E5eilleDZGBPYGuKQ6whCQ0/DeRfLzGQ186zJjgOdNpB+Le1kpo75A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB4825 LLVM LD doesn't strip the quotes from the section names, and so the resulting binary ends up with section names like: [ 1] ".text" PROGBITS ffff82d040200000 00008000 000000000018cbc1 0000000000000000 AX 0 0 4096 This confuses some tools (like gdb) and prevents proper parsing of the binary. The issue has already been reported and is being fixed in LLD. In order to workaround this issue and keep the GNU ld support define different DECL_SECTION macros depending on the used ld implementation. Drop the quotes from the definitions of the debug sections in DECL_DEBUG{2}, as those quotes are not required for GNU ld either. Fixes: 6254920587c3 ('x86: quote section names when defining them in linker script') Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Reference to the patch for LLD: https://reviews.llvm.org/D124266 --- xen/arch/x86/xen.lds.S | 6 +++++- xen/include/xen/xen.lds.h | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 6e4abbc1ce..d94915ea7d 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -20,7 +20,11 @@ ENTRY(efi_start) #else /* !EFI */ #define FORMAT "elf64-x86-64" -#define DECL_SECTION(x) #x : AT(ADDR(#x) - __XEN_VIRT_START) +#ifdef CONFIG_LD_IS_GNU +# define DECL_SECTION(x) x : AT(ADDR(#x) - __XEN_VIRT_START) +#else +# define DECL_SECTION(x) x : AT(ADDR(x) - __XEN_VIRT_START) +#endif ENTRY(start_pa) diff --git a/xen/include/xen/xen.lds.h b/xen/include/xen/xen.lds.h index fc47bb1ccc..06b7110837 100644 --- a/xen/include/xen/xen.lds.h +++ b/xen/include/xen/xen.lds.h @@ -18,11 +18,11 @@ * for PE output, in order to record that we'd prefer these sections to not * be loaded into memory. */ -#define DECL_DEBUG(x, a) #x ALIGN(a) (NOLOAD) : { *(x) } -#define DECL_DEBUG2(x, y, a) #x ALIGN(a) (NOLOAD) : { *(x) *(y) } +#define DECL_DEBUG(x, a) x ALIGN(a) (NOLOAD) : { *(x) } +#define DECL_DEBUG2(x, y, a) x ALIGN(a) (NOLOAD) : { *(x) *(y) } #else -#define DECL_DEBUG(x, a) #x 0 : { *(x) } -#define DECL_DEBUG2(x, y, a) #x 0 : { *(x) *(y) } +#define DECL_DEBUG(x, a) x 0 : { *(x) } +#define DECL_DEBUG2(x, y, a) x 0 : { *(x) *(y) } #endif /*