From patchwork Fri Feb 10 20:20:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136428 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 44882C636D4 for ; Fri, 10 Feb 2023 20:52:58 +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=lpDw5e9Cts4QEQSLwSq/EBbGLKpnRJoNw7nEStKrmXY=; b=TAqu9XQQu3t1ZV 6gT/hsNYhfuunTnbq4icxTEcfNZ0dRJZ1osPEaoGu0KHH1NJro5hiSSg0/iCG6H5OWabTvEfx3xJg zoJjylShLmDObEsaHjiaFU9qb8iIt6kw5lQRp94XXTIwdgXXS97aA05Vw3sI8n6lcHOpe20vRObV5 PkLAQOirHHVXTyoaJz3yVsB0hnpmaXMtT0oKJ02YtRanGbAA+qiiqf27qrAFuaxUPqh9y0j6e90qY ZT2WeiEwWbqP4lTKgpw8cE4uOzGdfiyqSRqvbm9AxtHZcd5crD3MfAQUDVQ9sZSjiArJ8M4+3OZ47 qsUjlLekEID8I7N9BCaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaO0-007UxM-GA; Fri, 10 Feb 2023 20:52:48 +0000 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZtI-007MEE-5P; Fri, 10 Feb 2023 20:21:06 +0000 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AI0AuY029674; Fri, 10 Feb 2023 20:20:52 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=VhfbtTG/NUQ7wu7lNb9jypTCgn4r0UxTOdaBvnltlAo=; b=pTm1Iit9zmzxv71Bd7U3vXObz98mtWNyRqbYnxhBDtKWgVPLd0Vz84m+574mHGB3ckrA n+M7gnDP334bwWsuAFMt0m4D3bKvdLj3rQnD/1kjEastqY3wxjy2iHYsE3sQHOtOcQBU E/1OlQpFf543W/5Meip04IvlzLql+PypMTa4MU6F5yGhmRDnknMoDdl3FkSuusBqFIBh HAq1X0AiJDUDVBE+07hR98MO0zFpbmMqvPRrhbrZ0we/JoJSXVDjjmo37zglVeYZh1aK EoNnnlm5MLWnAZCOsvKz26LuUy7gZoFYWKxsKetRB6WXem/KcPnVGTwyObEm1fwtliBD LA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhdy1ea5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:52 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AJlaR9003038; Fri, 10 Feb 2023 20:20:51 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdtb7jn8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nFrxWels0pCeU26fJ7ZC2Bp/abtgdJtx9KNgk6cDwdDPc7MklL1r+aXdgaqz24+rlPky3LNXVZ6Cqimt2vPc5iq8QbGEXOLheBFszgKwcz/z4VKVfSwXPZlvmzLOn5Yi9RU5PS3gKKsHOHMPDFo/o3nNDVq3D1y3ekXT8547mZlKBHDNZpiYT2Q5NkHG/I7oP4y0sbZhnetmBlC+fu5nGovVvbPJ/V9PYDxdoxK1baLRDlJIqd/0uqnhWdZfSK1JWQ4MET1IVREdqL5JwkA7ypxcpmEa0PeQHmcKcW89OmkaDtd2UoEWj3foD+aCGHebotAMNJZiqu4JJDL0eti69Q== 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=VhfbtTG/NUQ7wu7lNb9jypTCgn4r0UxTOdaBvnltlAo=; b=ljwBpP+KvEUaf80t3C/O1vORhIlDnGh1lN17yGnkgiD5GswlrWW6gBflFEtdBEho6jEsSEJRf9vmk1Rq2JfJzhWjJhYO6O4AWh8Ff2ukcxaqAK4AU1AJ0JHxQRyrlvxq0c/9COOMicaWow6qN+GgoSRVOdByNqWsoNrcMRd7iAt38Nq04kkkZwd9p/lKxolXpk0q6DdTaX/6b8zXWPor/bmRgM8ZsYimfjpwUA4MzytAuUwL6gndTDZIv6mQbH6n1MybQJ2xQED81grhHeoR9KWiLbw38apdjJNOm3gCqX1TTS+KTkd4CjeM6FSyWgVQHMfm3eG1tHHcXI6SNF0iIA== 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=VhfbtTG/NUQ7wu7lNb9jypTCgn4r0UxTOdaBvnltlAo=; b=di4p5x9uKsvliWuBIj8Eht+qR56LMiv52xsSyurMg57B+IbtZONzs7V62rDtAUkpGKUQWXXi2l4FBQwyKah/8WDh5lJddj75QfF5ZSSS0LEh/YDCB6oQduwvogXUWTLHLmiDQQuMn0OcSDgeI6pHgyTtUiHKqBVEUzIWsoGI2ts= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by CO6PR10MB5652.namprd10.prod.outlook.com (2603:10b6:303:135::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Fri, 10 Feb 2023 20:20:48 +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:20:48 +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, Michael Ellerman Subject: [PATCH 5.4 v2 4/6] powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds Date: Fri, 10 Feb 2023 13:20:25 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-4-v2-4-a56d1e0f5e98@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-stable-5-4-v2-0-a56d1e0f5e98@oracle.com> References: <20230210-tsaeger-upstream-linux-stable-5-4-v2-0-a56d1e0f5e98@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: MN2PR22CA0006.namprd22.prod.outlook.com (2603:10b6:208:238::11) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|CO6PR10MB5652:EE_ X-MS-Office365-Filtering-Correlation-Id: 802d9a39-fe1a-4e7d-3393-08db0ba44c13 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X/gtWJr4gov0yTWARw8puQ3uwHNyOSbAvdPmJfumB+Lx9B8sWoSBX9Qs4m0r1airdf2lgJDB+NfaIUItB1IFh1ZXFvJW1GYxcDM37y+jq+I3xGuMsS35N0kSMY+F8aLWZWmwYcRwnNNfqwkL+btmeWd7sOGaQcGB+8wteZIXWuflCrjX0POb4byRku//+/CeMaf6q2/TPAjcUj6wl7urYZqCJFdcbkCbopsoXmw8SWWfBPgretL/ObA4dKW4kmKZ2Fa33stUfwhkjWq4CcTUp1pQoX9LM+y0zfDLiMfwrRvbTJs5yr44tOVWfp2vflv/0m32GioeKHOhKMbuSLnDeeOIK3fQHZs6Dj1ElAyPLkeZXJXRnz4ZXOT+kGVQezG/msm16GhuTjF4CYd33pEiBM5q56gJqluNBP3keIOTSs3y+HM7r+aiNdWa5XZUlNAKSzIVGbfNL9rGiq81krcmwY0cE1Il9zNpPgNfgJLJlxF6J92fez6MLAQzODLID52qAd3hbyV74DNn8/3rxzv57I1o4SIRFGbnWnOAZR4w2clfMO9hhyszaXZdwhlGh/foInxl0JhPslPXDzT5FWlB2x0uXP9OtiAJsGSzIZfRey7LsORfV7Lio5UJQPIwBV0UdPirHeRkOoe2sOkDQGdnOpbxdjrotrhvTGU6kyB/lnqFrK04biu0UTsC9QbrUCf3mVCAf6vg8mdLkOok4iPelHlS6OMZ+ugr2n0MPdlnGwQ= 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)(376002)(136003)(396003)(346002)(366004)(39860400002)(451199018)(2906002)(36756003)(966005)(6666004)(6486002)(478600001)(6512007)(86362001)(2616005)(4326008)(83380400001)(6506007)(6916009)(8676002)(66556008)(66946007)(66476007)(7416002)(44832011)(186003)(5660300002)(316002)(38100700002)(8936002)(41300700001)(54906003)(142923001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?sjOt1k8Tz+Oenu29nSZDuYbsbwxo?= =?utf-8?q?A8H70R++1LFFGlSoBFpEl6q0/TVq8y/nMmZwiTeyY5NjcxvW0sqnTwZeGclKDOfTa?= =?utf-8?q?ps9zijz6Y/0/J5lbh6gweuAzLkOjjhtSLbu4OmnrWR7gQ/bF3iwwV+/CYu/KCFqER?= =?utf-8?q?k/rlVEgldCN96NsrieYpVSSACmXttxuCPO+cNZuqwIiVX13clK+f31oy3zInTWThz?= =?utf-8?q?OY0Tpdceg1sKJiB89cO3oeDVMGwWocdBu0GfnWDr8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858mDCd4J?= =?utf-8?q?5SdXGFirhpqbkuC5SGCIOiyh6F3O7VQNnHIUgHLJuA/BV0FVI7zibI+u2CNh+U22J?= =?utf-8?q?FcWAaeN4prZ6uGzm/N0TTP1motj3nGg/Bj4wNeQaMQRigfOysEUNrcdluULQ0foHQ?= =?utf-8?q?hxb9lOEAyaMLK0Ib8hXaIcXPHJpTKChmKdcnK7gxqPWewT27Bya+IoargBpCaOREp?= =?utf-8?q?LQbOb6fJLr2IH8KNiy1pqkMERF3Q0F676W2AHko0s/xWZTDQIvByVYVASPKljGT47?= =?utf-8?q?415bSxMAzkHhxhzJ/v3rGV8QbVSq+ODNxkvrxfdyW21CQNkg2DIxWnXroSmhIgs1d?= =?utf-8?q?AY8xTzaTo5qNYflsFY6/tE2CVfoswszo9Dc8ECZc0m5M50bMs4GcMFCoxwpPeE1c0?= =?utf-8?q?qbNoY4+YV1BDQnYjDQaRlP9klRuRxA3HV35ZFrDnBRPF92b7bPB2cpU=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?zbpeuKgEQi7QDQ31?= =?utf-8?q?I/Fy+H6dUcJPBlYmRn+okvt02fxITrI5T7tw0aB8Vr1bKkDRzg3wge2jB+Q0iV2/K?= =?utf-8?q?Idow0lVzRWF2xtniBB6VviqduxT4xfE5KxFNPprnHM9kHp4nJAzhqIZ17rw2QF6yZ?= =?utf-8?q?zeDXyeHQrol26yTmfm4xYKQ7pWjB19bXVUtC9QgstWxLYb7az83PeD1jm9Ibg/Y2j?= =?utf-8?q?PqB+AbvPMkBtq1Sq2dpMWAkeK9txdMDV8WiZytjbTwt6tqcu/lMiP6sGSuAVnEcs4?= =?utf-8?q?JoK2MnoPcjAdy4qVuZayHyn6ReD9CXcadhIU1tJavbIjgZ6td58+PUANZh4hC9BfX?= =?utf-8?q?7Od5DfmtaZNVBvgKOzCiTl0bGnG5rqz6SNeHh8OUmOsrT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Tenant-Network-Message-Id: 802d9a39-fe1a-4e7d-3393-08db0ba44c13 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:20:48.4738 (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: dmIBfBt26LNRG84GNw18ElTtk2b6Ajyc6w6+ar5oljiss6sVoQEDhSXPe9vCdj5T55KdDo+Z+RvHWw9OVJyv+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5652 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 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-GUID: _9SfZzz_hyNWvtKAa_H7JPZveok2GwwL X-Proofpoint-ORIG-GUID: _9SfZzz_hyNWvtKAa_H7JPZveok2GwwL X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122104_447699_D3A80F05 X-CRM114-Status: GOOD ( 19.66 ) 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: Michael Ellerman commit 07b050f9290ee012a407a0f64151db902a1520f5 upstream. Relocatable kernels must not discard relocations, they need to be processed at runtime. As such they are included for CONFIG_RELOCATABLE builds in the powerpc linker script (line 340). However they are also unconditionally discarded later in the script (line 414). Previously that worked because the earlier inclusion superseded the discard. However commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") introduced an earlier use of DISCARD as part of the RO_DATA macro (line 137). With binutils < 2.36 that causes the DISCARD directives later in the script to be applied earlier, causing .rela* to actually be discarded at link time, leading to build warnings and a kernel that doesn't boot: ld: warning: discarding dynamic section .rela.init.rodata Fix it by conditionally discarding .rela* only when CONFIG_RELOCATABLE is disabled. Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230105132349.384666-2-mpe@ellerman.id.au Signed-off-by: Tom Saeger --- arch/powerpc/kernel/vmlinux.lds.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 4d5e1662a0ba..46dfb3701c6e 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -395,9 +395,12 @@ SECTIONS DISCARDS /DISCARD/ : { *(*.EMB.apuinfo) - *(.glink .iplt .plt .rela* .comment) + *(.glink .iplt .plt .comment) *(.gnu.version*) *(.gnu.attributes) *(.eh_frame) +#ifndef CONFIG_RELOCATABLE + *(.rela*) +#endif } }