From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mCx3I-00073l-TS for mharc-grub-devel@gnu.org; Mon, 09 Aug 2021 00:38:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCx3H-00073a-Fu for grub-devel@gnu.org; Mon, 09 Aug 2021 00:38:15 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:54844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCx3F-0007gj-ID for grub-devel@gnu.org; Mon, 09 Aug 2021 00:38:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1628483889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TfCsuvVNMLeixUVsPDNo8z75fe1Zrlbi2Paac/9mqUM=; b=Y9lAZq3ynCPA4y7Fw8KgsQQWfVA+zWVnr0x14E5stjBZ0iOmPVIvY2/i+UkrbdN7yutfy3 bhg/BDv/uQ8UEEIqAokNK0M+quw42FDs8XwaEnWRT91Aa25xVN8yjHXLNJrMaLMdhIs1NZ qtETRAI6mHWdLRer5T+Vx89nqk2u7dk= Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2170.outbound.protection.outlook.com [104.47.17.170]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-9-LhS8xcvJOym4kVmPz0zCnw-1; Mon, 09 Aug 2021 06:38:08 +0200 X-MC-Unique: LhS8xcvJOym4kVmPz0zCnw-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hyi0TKpjAMwd8loloMqaHf/zUqZzgaQJK+wnWgkmc8+RHr2yPFcUV7+KFyd4qfmubqjrvLTffpEOwOqxpW/BOt7pJrSKXxSvY+qUcPuGfiuWF1iNjlXcnMsxJJYmx5STaYpgL7n99Md7MStMSxX2o3PE8FGeWw7FCOnUfLzNUdW2oG02w5aHqNDLZ5fYYYDFFHbLkIKc+AhD0PEteiEn63gqLJ5iAVdOIwuI28vno4+eA8zGcewsSP5tiaHimFRALPqHNOJSMsq256It9mxnwns1IvwA27QsJR09ls7hEwTL1L8BpCwYqL0u5raYsBenEiPm/kpdyf6ByezP13OF7g== 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=TfCsuvVNMLeixUVsPDNo8z75fe1Zrlbi2Paac/9mqUM=; b=l05wBqM64hQoIMwJewaUS0RSESEJ6dbANTG/j6Llk7IiToTjwO+0eQK4AaYyU9cxFwqXHLKDiGm4wuqY/xZEWG2vAta4vdKLW0j1OIF+4cUKZJa9zjjvNsZCqcq9jmWGvDzbNZzyvV5aTESWjyc5otSmkqRhXN5ACNKNIBYei7ri9GwiQ0ka3bm9eg9NP8kAdPvmqCZq7faF6xOlv1lJlcenn4AaBMINr2QwJqG7FDhlkwriRKPfUX9ZviYozAxTb3an44AfmFObVim67HXMTfLCleTjwavWBbHJOH7zDK9pRG6EqhnWMFnB0bgREBw9//gs9OG49mBIIPuEukdz8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=suse.com; Received: from DU2PR04MB8648.eurprd04.prod.outlook.com (2603:10a6:10:2df::21) by DU2PR04MB8616.eurprd04.prod.outlook.com (2603:10a6:10:2db::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15; Mon, 9 Aug 2021 04:38:06 +0000 Received: from DU2PR04MB8648.eurprd04.prod.outlook.com ([fe80::5586:d75d:b656:b85]) by DU2PR04MB8648.eurprd04.prod.outlook.com ([fe80::5586:d75d:b656:b85%5]) with mapi id 15.20.4394.022; Mon, 9 Aug 2021 04:38:06 +0000 Date: Mon, 9 Aug 2021 12:37:59 +0800 From: Michael Chang To: The development of GNU GRUB Subject: Re: [PATCH] Fix build error in binutils 2.36 Message-ID: <20210809043759.GA13488@mercury> References: <20210802094115.19377-1-mchang@suse.com> <20210805130721.ajskggdw6ma6emzj@tomti.i.net-space.pl> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210805130721.ajskggdw6ma6emzj@tomti.i.net-space.pl> User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: HK2P15301CA0010.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::20) To DU2PR04MB8648.eurprd04.prod.outlook.com (2603:10a6:10:2df::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (36.226.40.253) by HK2P15301CA0010.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.4 via Frontend Transport; Mon, 9 Aug 2021 04:38:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4104f0e9-7a02-4675-af0b-08d95aef7b78 X-MS-TrafficTypeDiagnostic: DU2PR04MB8616: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: czJAyAfHkwXSGkCLDl/WAw0kSDWNsJI39l2YbDriDXqfSmMg2iVM2eGxjOlT+cO//qBC0BTfUwN+6qtgvwct4F6ZMqcTpe0MYe+9DEUBezePbsVzWAL4YFNA1Gqz4LHEoaJXOWsGZlhlJQDW8251XgDgWjbokwSUsvruEYaMiHcratt+PpUme2EnRRNu+R0t2+wGSzWAEHGotVN0DLkFL0oWck70MrBBIFaNjdzjeEyOFo6O3a85J6yCd0nNRjuOsc7qoeAWf2COJKYqZ1jjKYEEYtTT0U0GNts4q9f898ngdFCoD6CWnwA/rohT3vk5XMHWZCDUqVOgIEj14vn2ffqOpehHv9Dk7K+cQRac4GrKM9w+w8xY9Zz4j2gWKukQY+Tpt3nRG8gMhvKEFW5QqJE+e+eZUgpQoEqMvBaLVOVp3D3vq85Tj6XDSY3wOYVcQgYw94fAtI5GiP3TSO8XPnfCf5qJZvT92uYJBTqkXoUWvNuoIioGwvxjy8FTZxph9qXtuYQ5/whNAewjo6hIrY+TCaIfQa5uwvW8iBWroFOrp80JqwHmVdaamzIXsEo3L5spL/MBlSHnTKGXNg2S/toLp/NPXMcH5+57N+Gt11IIroKVUhs5W28HPQmKnEdSqJl1ximeFLDKuN2MH5cVv03kSFBJiZ3I0yB2tK+jd8L9N6xqemuD0dtBqTHhdqOLi+M+qglPErpVLgEBjBabZUj+U5kRhbIXKGqKTRFYdC5rsyY1AHqp0obMGkTMR26YXAbGVoFNzqQMztVq8nRSyRaKIfxsP4X90pE60/0vX7OZOvvl3cNXjX7OWwYGW+2X X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU2PR04MB8648.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(7916004)(346002)(136003)(376002)(39850400004)(396003)(366004)(316002)(33716001)(8936002)(6496006)(66556008)(26005)(2906002)(478600001)(6666004)(6916009)(66476007)(9686003)(38100700002)(86362001)(66946007)(956004)(966005)(186003)(33656002)(1076003)(6486002)(5660300002)(8676002)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount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-ascii?Q?JRLAedKWROn9pyCc4eDIpY7rAAkeLIUpkYYvuyHln6l8uE7AX8ffckvXJmGI?= =?us-ascii?Q?nk9k0fpOnQsDpqxnnhgmq1OBw1o4WlkciXU+LJi9UYVpyZrZ5+1nhDhZR+mA?= =?us-ascii?Q?f+PI9GFPpMl2gLaDcvRRA++388/tUMLMm4VBNTB/4NidBo01c+8RDZWwDjgN?= =?us-ascii?Q?M9Z8Ucfpe1IZaFrbTeLsih/BAWZnq4Vh79ZiSPEUUBarL4Ow0Xg/jskssQwf?= =?us-ascii?Q?NoQzkCxlnTK9nINu7aNGYmC0n9YcX2MBDFZqyeiJru5cIvWywl9q08oVSOhM?= =?us-ascii?Q?LqQcHfW36//6PEsiKU/jGmr5pg5xDjqMvHhICLthZqyHw7LMX2IrPnOxXpcm?= =?us-ascii?Q?KrsR8o/pcRDVwlRgW4EVZX+AwnJK1QJzkbgeTcZqJwZ4GGI7DK6wA7UoFYEq?= =?us-ascii?Q?Zw1Jcoznch1Fw896fqmC/iAdDvesLsIRK32oQMhGcaS9PjnS1+MerJYrzyjV?= =?us-ascii?Q?ZQW4SJ26SfNFIGkmXssjD7lD?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4104f0e9-7a02-4675-af0b-08d95aef7b78 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8648.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2021 04:38:06.5732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: T7J5WKX0kbfml8EIKtBzXf0PRoaV0lyMC0JbGIKq7JFV3d0IVspfxBM88k0ROqq8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8616 Received-SPF: pass client-ip=194.104.109.102; envelope-from=mchang@suse.com; helo=de-smtp-delivery-102.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2021 04:38:15 -0000 On Thu, Aug 05, 2021 at 03:07:21PM +0200, Daniel Kiper wrote: > On Mon, Aug 02, 2021 at 05:41:15PM +0800, Michael Chang via Grub-devel wrote: > > The xen build fails on binutils 2.36 with the following error. > > > > /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: > > section .note.gnu.property VMA [0000000000400158,0000000000400187] > > overlaps section .bss VMA [000000000000f000,000000000041e1af] > > Could you send us full command which is failing? It is reproducible on xen platfrom with all defaults. git clone https://git.savannah.gnu.org/git/grub.git cd grub ./bootstrap mkdir build-xen cd build-xen ../configure --with-platform=xen make > Anyway, I would consider writing our own linker script which is dropping > .note.gnu.property if we do not need it. Dropping it from the assembler output is a cleaner cleanup than linker script IMHO. We also faced similar issue in the past to stripping off this section from soruces of objcopy to produce correct binary. 6643507ce build: Fix GRUB i386-pc build with Ubuntu gcc To avoid falling into such trap again when manipulating on object files we'd better use assmbler option as the fix once and for all. > > The most significant factor is that new assembler (gnu as) generates the > > Could you give us gas version which does that? # as --version GNU assembler (GNU Binutils; openSUSE Tumbleweed) 2.36.1.20210326-4 Copyright (C) 2021 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `x86_64-suse-linux'. > > .note.gnu.property section as default. This note section overlaps with > > .bss because it doesn't reposition with -Wl,-Ttext,0 with which the base > > address of .text section is set, rather the address of > > .note.gnu.property is calculated for some reason from 0x400000 where the > > elf executable defaults to start. > > Is not it linker bug? The binutils upstream apparently doesn't seem to consider this as a bug ... https://sourceware.org/bugzilla/show_bug.cgi?id=27377 Thanks, Michael > > Daniel > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel