From patchwork Fri Feb 10 20:17:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136321 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 F358EC05027 for ; Fri, 10 Feb 2023 20:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gl/pRJLwpfDpho0gl3LWbwfhRGNtvVxZeSep+3yiz30=; b=sUd2zqgMjvycUS UmnFxTl9xRxl9z1rdJ1EqHFHH9vPbzjWuN8DTNMAydODBTTDPg3l45OdAQmhj7+j/BRXV8am4juJ0 LCH6HOtrVJ/6iVTzve9dxqghmZaXWtq5Nx9BEsU/LK4co6hbDueaqRwM6txm/r4KrBxqgmOa0uqsb eb/EYD8rhv/gDnfXCZZdQAxsvMpbBHxLQH6ikqG3HerOqZuXtbj2Ezel709QsErq5kMmZ1ETDzabW 0LtUxq/CPVDjbinXIhlK+HgRtBcAq0MqDpkVt0vB8Uk9rFWOcagqhUycSoAC/yyH+AHzOAzfFoUMo NYUMmXzdHvz+q9T9tHAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZqR-007L8p-S2; Fri, 10 Feb 2023 20:18:08 +0000 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZqB-007L34-Ci; Fri, 10 Feb 2023 20:17:53 +0000 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AHwhiP005533; Fri, 10 Feb 2023 20:17:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=ey524uGXcjUpAwcDoiaooA0NVOlBB+1803iKQWrb5rk=; b=u9tfYc18hLaBggeuSGywGGSiMoI6SonOWbb8EleT0VKS/DQPgaVWc0DIWnbb/WDDmlRm JiNf4OIcT2/Nf/uUCpbKC+jVOtyA3XxK+sfx/anzBQ1t7BYZiTXCNqmYCpNgYNOaWeOr UBTEy90q3N0cyNsSc+Z1vqw0XM/shwqFirYeZNWGoFb7pZh8Wyk9JeRlHdR42Zm2p/YM iqQugBaSOKtUPKbdKl1N69rnhydIuoa3/srPqq504PH4dgsP/N3tTGL3dCR/2pBcWjz4 q//KIW9t7BXx++quqM/HsZUNoeRktOZfnjoPKjz6L/tWB9Gow24RRTHtS8G1s0pD6nVN ig== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhe53p6ar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:17:42 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AJXlTD002666; Fri, 10 Feb 2023 20:17:41 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2044.outbound.protection.outlook.com [104.47.57.44]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdth9mry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:17:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kc9HBcICoKzR997+C3KY/ftM8kiJRJzyXU9JF/1PJgsm9wja+ZEzAaG4UTjK+HTCt3xv6cOCdbh65qOlTZS9i1jyT0X7fDelmWpWS72Wasdr696lmRhNyT3RJef7eA4/iq3IOW302Us7C4AYKQi8b4q2cfiHrHhy+E9URvoYqAsRn7ZDUFZ6ywkki+RuzxAFaJGmRPijXuK+hbIcRrUCWYCRejAp8jyYqyEUgz8GZ6emmBMkFNEzGmYC/dVfY4cpCRWIUNWjMDrO9kR3iYbGkcmSqPCzF75gFWsrYHp+ynUNz5VETYmsjx8XSsobKdE9ZmpJ7kbpYPXN66orga2XVg== 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=ey524uGXcjUpAwcDoiaooA0NVOlBB+1803iKQWrb5rk=; b=EfpYpdnK4IqSWrZF0ebLKKm1z0Knb5a46CO0sgM974no3cIaEqELuMUsxdtPHOP0yXO97t4fb0ENf/rv9XS94vk0L+kyDgjCf4E7/vKt2HN1nXYKRfqg3/HiNWuuh27yZO6wVk4NEWTCCF4y17Fvqxa/EvGzqmlX17JbxIbm3N9di/2W/LHW0Hoo8mjTKLVxONBir5JpKwMvru7WQbLZO7pOAmaCs/SDzU8LQNZ/Ghq4o+qG1i4N+6TeU7cyzHPMWsdSVWbxyI52IaH+QIFMzc/72Iqjk7ui2w4ZxgXhcJylITEqmAa+jSOE/NUA04AeuSG7OzkcYl1FKjB8h6Rnqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ey524uGXcjUpAwcDoiaooA0NVOlBB+1803iKQWrb5rk=; b=wqrtCht/9uJYBQKOItF+0Isz4WdQrrURf+kxLIBXGOPABzIWe0mNI7KN6Db6DHXjyppEwgeXSQFTrvpR211QGzidb//lhh2jpp2Rxj3wiPrDzrFuV2zndxCAp/yoWZFDra4dZnC1eZ5YpkO/3FgkoTiWpV3ivfnAaYxuaEjSAfE= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by SA3PR10MB7093.namprd10.prod.outlook.com (2603:10b6:806:304::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.7; Fri, 10 Feb 2023 20:17:39 +0000 Received: from BY5PR10MB3794.namprd10.prod.outlook.com ([fe80::f37e:ad45:7d9e:d84d]) by BY5PR10MB3794.namprd10.prod.outlook.com ([fe80::f37e:ad45:7d9e:d84d%6]) with mapi id 15.20.6111.006; Fri, 10 Feb 2023 20:17:39 +0000 From: Tom Saeger To: Greg Kroah-Hartman Cc: Sasha Levin , Naresh Kamboju , John Paul Adrian Glaubitz , Rich Felker , Masahiro Yamada , Ard Biesheuvel , Nathan Chancellor , Dennis Gilmore , Palmer Dabbelt , Arnd Bergmann , Andrew Morton , Tom Saeger , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org Subject: [PATCH 6.1 v2 3/7] arch: fix broken BuildID for arm64 and riscv Date: Fri, 10 Feb 2023 13:17:18 -0700 Message-Id: <20230210-tsaeger-upstream-linux-6-1-y-v2-3-3689d04e29fc@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-6-1-y-v2-0-3689d04e29fc@oracle.com> References: <20230210-tsaeger-upstream-linux-6-1-y-v2-0-3689d04e29fc@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: SN1PR12CA0070.namprd12.prod.outlook.com (2603:10b6:802:20::41) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|SA3PR10MB7093:EE_ X-MS-Office365-Filtering-Correlation-Id: b69cdc92-3058-412a-1728-08db0ba3db5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OiRHTP8XBlNFq/03v/Ztjs9YeQVscOzbg0zo9vGXySu8Xyk1eaqCTwF8Ygvl9l0LoduQz7fgkiSLTWv15B/zHHtJ3NnihHnM4hNkh74lyjWsA0M1pmjVgDkB57nt9qonfAiCeA/GEGYrEhiw4u9BDo1NtUmZEAZZJ6Vz1UaYoprQ8HPJXO2v6TPkr1OW+VXD/qgWbWIbVpbJ3KhFX8jiH0Q3CupARmFsZOLuAbM825UoPXg623eFo7x3AHneZpQCCUoqyD0Oci9F6YqihPx4quufZYOBLr+9/QbMSSKFb1vke4+ote4NLn5BQKsALIUg+7PVOZp5mssWM+xLxq+nvViy6lsXO/fsmTJig53UL0t19NK3AOiRdEx22vpiigYvUt33Au5pQcjhkaNkpTZJnSh8TPgn211r2PS61RTqb9NorDBlhne93IgSRsxSiVLHub3oLF+m0v+9s0ObB7YTJ0DDjw2v7toK6yHZh1O4fNr/If0wXiugzcAkrwGXaHyNf/tAoAq27/CyiBT/yYaqIoccvMeTv0d8+7jMBNSVbW0F/bPqdErRif1FDLG6FP6tzN95IULyw8ZMz56SMiuCNrvCWT/ohVoZSlNFGmV3gVXTTlXcUw0byiCdHuiJ8mNIIELzySbx5ejO4/i1SLoWFfXDFuOgJuMAoBSW1cBRjh4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB3794.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(366004)(136003)(346002)(376002)(396003)(39860400002)(451199018)(44832011)(6506007)(5660300002)(7416002)(186003)(6512007)(8936002)(36756003)(83380400001)(86362001)(38100700002)(2616005)(2906002)(316002)(54906003)(6486002)(966005)(478600001)(41300700001)(6666004)(66476007)(4326008)(66946007)(8676002)(6916009)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lYk6q0hXvSSt+xADYs0YtdtlJfzl?= =?utf-8?q?yszmk6rhT70V88U+enKAP6Vn8IWfrj++U4lHYZjKJtq4QnL5C/mgKGUjzQCtdByB2?= =?utf-8?q?XRy8awZpfHe9RcI7lFOt10WoihTIuBtCY9WvI+bJtn4H4TDbytI1lY6AgaTgYC3K+?= =?utf-8?q?R6OUxQKYbfStAQVLuzDjTH76KpKDOcixYFmUVDJJzfe7vS8r7iyo00zFu5wz8NU0P?= =?utf-8?q?ETrhwOaMMOPXRU230eijh0ixjGS53YMuKldf2uXdxOK5iVx158pQrow9eFN7QCXqp?= =?utf-8?q?OsZx/aKM6SW2xCed79bCbKMpjwFYZv6WIBGG/+3MhvLIRMt2PeJIUWsKT1RpWeZGj?= =?utf-8?q?Yxex59vumulx5nlaMJS+xXAK3YvanD8Yy3h55KcKkFTbqDCyjf/iVkzlEm3p/tLTo?= =?utf-8?q?MvigdO9ucTNhkhTRYDox9Gl4Ze43/UXAPBbwP/27woXK5+WuU3l18gI+ZjVWW+O/B?= =?utf-8?q?GkK/Lku/0x7zVOtDpasLtIANe7GSXNqNd9FVlB9rlMwjLHeOHVKRGHOt7yDSSAA8d?= =?utf-8?q?9fLS062tZ0+b8iU+4xktzpjQCCuuKDVsa8RE5/Nic74uyDejU7VetJkXQ4Vs6ukq2?= =?utf-8?q?OowwsPZMSrJAaFx1NQdb0zj0XnpFeMv2SdYFzC89Z/JSZSO3tLPy4DjEsjoVRNylO?= =?utf-8?q?yxTCjRcVq1h5hQ5yh5QVhX0It/Kdxy/OQmDRm9lyNhYLhTKnERc6cncb1ru+xlYk7?= =?utf-8?q?YW7gWaD0vXeEvr/YTBtwT8nl1yYj01zhNZE78ljE7Z++SUq8MCwheHwn7qf+iheAw?= =?utf-8?q?cLr3I9bxMMYTe33zHliDY056TsM0QP5zBzS2peNvHcQE+0nxgpbjIg9D1WN3TKC/D?= =?utf-8?q?pMWp4K9kfm5ZevtsqQwE8k6X3f8zKtUy+ywgnoh+pWVfuVme6Ki66WaVpN5AKLOdf?= =?utf-8?q?Lht0E9Z4h5eEbvlE6EiwvNZvjRxp1c38/3IBU/kQGi2xUHOmTDi+cp8J8Wl9qZKO/?= =?utf-8?q?NkfN7wc6x45krGEMIMmF/Hp50ILC0xB3xyvGJepg+XU59XSJA7p8lP0maZvKQlbfQ?= =?utf-8?q?q6XYkzB1j47DSPtOtXJ68RLaQnbU5t3zmL173QKrSDQBrB9GtU44b1RQPA/rdzuny?= =?utf-8?q?kj+wQULiwALFekMtHwrFag61TtxKTvs3g8OVJFVlM0UK4Aw72hX2r5pwRV2VkZKyV?= =?utf-8?q?AYXp75yF78L+hSmW6g4ULPCMAYBEcZi5K/pz45qrVgcSKvZSaDxXXodVNA6jKD+PL?= =?utf-8?q?VOUIrrVNzay6MDhFnnovEnn3XoaEGz/3wyRtqiqQBEBDKOM4cWuaxG3Vl93bts7sX?= =?utf-8?q?LDp2Uby5vQTPPr6GiEwImMcrBnkq8eGlJYET55C10z2TZTYN7J9NfP2SYgfgYsjDf?= =?utf-8?q?k1kHSWqzJnQ6HgOf9nTWm/zH9rMNt3f+oqVZIh9WazLMKZoeTVX0+eyUk1/r8ykgO?= =?utf-8?q?zFA73l4Vhke4Hlz57D6nBZc69CylyCphdeYzUrHqTGhuJdmuBKDVmYLvz4YrMW1j0?= =?utf-8?q?tUMtjFXSv9CpaXoHpZuR1ZTbA7Fz98TGE+qvWOfpb2B3hJ6EuZQPGiL0+Kn6UTMI8?= =?utf-8?q?3toXO7Y4sdb9/+/irLvIh+FkxiFRtVu44sTKX7NIW6OpLYI7kRJS60A=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?abz6VI+tfmxK2Qeo?= =?utf-8?q?5Q1NaznTFPeIXu8qDz4AZyWXJciNgolJeY9U21GGLmWVvAfYicHGiDfV6A5sqH71X?= =?utf-8?q?nctZOOZP55jKXQs1vNBCFeP+AkUjgNYHpL9FggJ3pj1eHCNyuDfDYjigBFTUcPAmP?= =?utf-8?q?nzQkG1XIfcJCv/dFNF/DhnLnT73QORxpBcxhbo/37BUfCWVXhI0UhswFnz2CyRXxa?= =?utf-8?q?DM0G44OAeZfiYVLhAoBafFUcqGFmd9q2SDsvxolBm+D7Gl+5FnMT0h1S2xRgvriBJ?= =?utf-8?q?vzsKLV0IYHwzfSxJ2WeqT36TkZwehm1Wxjl91hrYmJbwOmLU4sDgC6Gayiv10APbc?= =?utf-8?q?hVdftpGHcEmQxQscyiRljLoy3A1o4duehSVGJku5Sjoyc3SaySyKjPhWNAlI2mU/t?= =?utf-8?q?+hCgiV7wL6KWaobtE/q4fJkFWlWvJJvHaxNtfT/aAFRRu4nQtNCldB8ziZt/TGzlh?= =?utf-8?q?eXObx8yYGpqKEWvBed7B+DOq1gT5NONNF2hpqLm1OZqJiBy9d1cu8coCZ/r7fuCCa?= =?utf-8?q?we4gQ1+q6RWn3SdaxEc4oiLyF6Jm9qrC7gj9t9U51eJK9/conkrcfZbALxmjLGll5?= =?utf-8?q?V6tAnnGbKS/fZu7ojSO81Oz6GERZh78xml7R4dfHuGpJeYHAKc3zLT8jL/CReNaZf?= =?utf-8?q?4GBpsCsWk/t/cohXzWC2pBcqNtZ2bfh2amnnVxH1dsuewp2yyLjlCm9t4CXkXTfDW?= =?utf-8?q?HB5ZGLCBk224QtFJs5fEtbsEL/lfqbD2i2blkgqzxo2RUFyuf8gEAvhxPvvK1p8D6?= =?utf-8?q?9inPoU7EzoKK5UH7cHcRb5VaTE067TEbV8KM3qZYSF9jKAvFg5g1w7CjglbbLOKa1?= =?utf-8?q?Eq2d2kTAJ6WjghX/52KmihcVMiWJWdSdzd03sdaUZdDOVkjFhVzE9h4f8O+xhNHXC?= =?utf-8?q?Jwei+Bp2jl7I9cpTfCcNT+ovSHiMaHLyP5FtWRKsaogbqn362Xvb5H6MZyLvwWbx4?= =?utf-8?q?Tlsm12ME/oBG7lBRq86Ypfb4UHhUT39bx9yoAKykqqfV3+ozbDzCBPmSPag6tK3tb?= =?utf-8?q?j2Q3lwFKxmy7+yGWCjb9DNiyx4sHnhW3gDTnzj17X70FmKVnq23hy1NFqHYEFTO1g?= =?utf-8?q?QE8riE+9PlDoZkpVnJMgucyYuoPGC4oLGthQDqZWDo+UHDA1G47QTz+A4DRguMpm5?= =?utf-8?q?PfW45STwHcDb2vsqS0YTkDXD6S1ZL3?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b69cdc92-3058-412a-1728-08db0ba3db5b X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB3794.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2023 20:17:39.2843 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yCngy7KrbrxY0j1FFJrOZu0iyrRpaglIIwGa15OEQe7PREUakCuBFqP84Lok8LDWmn+owsSIgCZs6DqLv6fj8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR10MB7093 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-10_15,2023-02-09_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100172 X-Proofpoint-ORIG-GUID: YSJ8rnnetn4me3k7T4tgpo61qa-9eLzc X-Proofpoint-GUID: YSJ8rnnetn4me3k7T4tgpo61qa-9eLzc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_121751_584006_87DF6508 X-CRM114-Status: GOOD ( 20.68 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Masahiro Yamada commit 99cb0d917ffa1ab628bb67364ca9b162c07699b1 upstream. Dennis Gilmore reports that the BuildID is missing in the arm64 vmlinux since commit 994b7ac1697b ("arm64: remove special treatment for the link order of head.o"). The issue is that the type of .notes section, which contains the BuildID, changed from NOTES to PROGBITS. Ard Biesheuvel figured out that whichever object gets linked first gets to decide the type of a section. The PROGBITS type is the result of the compiler emitting .note.GNU-stack as PROGBITS rather than NOTE. While Ard provided a fix for arm64, I want to fix this globally because the same issue is happening on riscv since commit 2348e6bf4421 ("riscv: remove special treatment for the link order of head.o"). This problem will happen in general for other architectures if they start to drop unneeded entries from scripts/head-object-list.txt. Discard .note.GNU-stack in include/asm-generic/vmlinux.lds.h. Link: https://lore.kernel.org/lkml/CAABkxwuQoz1CTbyb57n0ZX65eSYiTonFCU8-LCQc=74D=xE=rA@mail.gmail.com/ Fixes: 994b7ac1697b ("arm64: remove special treatment for the link order of head.o") Fixes: 2348e6bf4421 ("riscv: remove special treatment for the link order of head.o") Reported-by: Dennis Gilmore Suggested-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada Acked-by: Palmer Dabbelt Signed-off-by: Tom Saeger --- include/asm-generic/vmlinux.lds.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 3dc5824141cd..7ad6f51b3d91 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -929,7 +929,12 @@ #define PRINTK_INDEX #endif +/* + * Discard .note.GNU-stack, which is emitted as PROGBITS by the compiler. + * Otherwise, the type of .notes section would become PROGBITS instead of NOTES. + */ #define NOTES \ + /DISCARD/ : { *(.note.GNU-stack) } \ .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ __start_notes = .; \ KEEP(*(.note.*)) \