From patchwork Fri Feb 10 20:18:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136361 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 F2FCBC636D4 for ; Fri, 10 Feb 2023 20:27:16 +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=/qrgd3HBquBgCgx73x5DCY9rgJ97NR4P4/QEKwbjo2Q=; b=dBCAkFmUEg8nlF +kdiXg3UH6m5+dWjq7iy3q34efBcAwqIaRI/1gnMUi1oUlHRfw5z2KOEgPmI009OuLa0+NaJ2vzNM or37WwqVw+snRPsKpQVtKYtMnLGBxcEFDkZ3JqWfb5e39oojjrlxs7Bkgr4BqMGrv/zMbsEjh35dW 0TdusBC+YGLDqPa28YVLr9MLUuIHp/eM9R9JkVWl32J8iVCgc8Cy46HZuYdpCsh75OJhM91E2u+AC yAhFz5iWiHSi2VtcKcWXQJNhHdJYU8PSYSwEMzcAM/u8sb73eg//esE84cooJxSWXwvcQDFKg5xZk wYnBiOaamB8tHqz5RsGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZzA-007OAk-HF; Fri, 10 Feb 2023 20:27:08 +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 1pQZrX-007Lbk-Fm; Fri, 10 Feb 2023 20:19:17 +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 31AI0G4R029930; Fri, 10 Feb 2023 20:19:03 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=l5/FqJUxQ+bSBl23Eq3ijhenIiQb+5heRXvcO0/i0ow=; b=ESw/ReZ4mNPC2u9fUPFrkRSUTZV3SuDHWuhkVQebyyJtIwnQCHIqCWPOMBMCowKbwvZJ j/jaiAHL2Itxaic7cGbzSA1Uw/YHk5InszbS2NezxCqwTfPMc3/ZFkxDoblYdOVUgYKo uCxolux9zrdDh19tOXfnOpVr/OERELAXV7xkDa/LzW89QLS12iwYObJws7y3IGQsYw8G K5xSX/rd8W6apMVAySAnr4IDYRkFlmbNoTq/4IwAypwP3k4h1m1PuRSNyQUtCz9m+ZyE xvCgsa+zrYQSulvUitMxsFEercEVEKQEfFFucfV7SSoaPFBjxG+Bo2uaf6ugq2TppHHf Bw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhdy1ea13-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:19:03 +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 31AJkndH002644; Fri, 10 Feb 2023 20:19:02 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2104.outbound.protection.outlook.com [104.47.70.104]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdth9p0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:19:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OE89CSfR71RpDWR1Hs2EtP2KSlaMyuAzkIZJIkxMjORSN7bc7Qsy1T+edKHCz+5HwqWqZnE8Djv2kdv+F1qc5sx+4BLpFG2N5h8Z1ioJXjptEYuCd56S7PA6BooYjC3/X1YPFjaTEN9m3cSyeIS6wKaax5TbJOAubXly56Jqs2w8wbx/UDMlNxVXl3v/bPDGjs4UQADF7kwmAooA2VJXrlSRYbpeZHNbDF96w5SaeGG83wcaaC/RYx+Kd3tKTB4PXYW7Iqd6UOCVsQlpr5SoTLLlbCDtLT43weqAIUB5malXDggkD4NHc2Qj1zoghfry6BfcnuljIQ5Lq0p0qkcVdA== 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=l5/FqJUxQ+bSBl23Eq3ijhenIiQb+5heRXvcO0/i0ow=; b=MdGrCo+8clQz6pxpAsMusC9FZR8VXAFe2HK3LHk4yFmjSxfxP33EhZKAubdp04TxxiRU5cm3CdKsRPGJLnMBuoqDc2TDere0X2LeSOyKEOpm5Fe4t/CtSgomw/cmjdNfGCDYddiBSqSz3SW3uPy3kAleUKKRaBUF3oCcuzAuubjHDS2Qe0a/wPmYlBpqCaImZzrT0GcCRS3gpSlUJDgrbK3o5cLMWCcLMUNT0rTP4r8rKQSk4/sQj1QpDh50tvBXe9MYIm/Gjx8qvwW785frxi93aF2MmaCEyoPYE7zKq7n/pISESt8IXtQ9fr3RLYnnNjxqJxsVRhe7M4uMkDsKrg== 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=l5/FqJUxQ+bSBl23Eq3ijhenIiQb+5heRXvcO0/i0ow=; b=YWCIMyzQUoOYrzDpReuVhUlHjhe4cWL9kwnzYfbFM8VbOdl1gRDgvhB+2zPs9IvsM5Hcckwj88nqHyTJVr8j9UWTGUINSeLW9CMRoRga+foQ6/WqIXUJ3Ff57jljMs0FTB8lCDquyUDFJzAjxvtEkLC8JzupIDFTifalQLoFKxw= 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:19:00 +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:19:00 +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.15 v2 3/5] powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds Date: Fri, 10 Feb 2023 13:18:42 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-15-v2-3-6c68622745e9@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-stable-5-15-v2-0-6c68622745e9@oracle.com> References: <20230210-tsaeger-upstream-linux-stable-5-15-v2-0-6c68622745e9@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: SA0PR13CA0026.namprd13.prod.outlook.com (2603:10b6:806:130::31) 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: e5acecf9-a644-4ccd-d38a-08db0ba40b82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wVE7i3PEl0eu2UTmKuoxMgb978Hb55hcouSB+DwK60NIf5Q1/z240TOjb0QpEJlBSht8q+FmR4fzDXz/FLK10y82g15QK+SHAUwFfTNFQKkndSq14MgKZhCkzJbYVRMYGS/npQxqdDvg0q6eajirJ7pIZ0ci4ANAoq5LkrnEis4fatecV8qyPH7eL7r7wjoaOu8qvrmVrCb5HXABYX/JPpXqVUUbzXhDl3Xti5rOHH4PeOrHEega8aIC/v9jXJ1RWbLFMFsmT0hyMpKOPCk6fHyMu2yL1+fTG/s2IJtzz56n25g55InV709OIBF88yXcwhsRxNcGuVCm9n4Y03UOeJJG1qxtjZLdyk9iAVomguYp9hT2+wQOmasWtUkaQI4NUFX8I8mFXx51XPAXioMt32rbvO/23PH8KwnN0QviUW/L9gKujjIkfhy/6JHgb/dJAoiuLATFE4JwMkbYbpFDDVXzShhIUel7dexU0ttUbh94xO3J3in0kMOTvzgZN6fACf0LoJc62GNgJy5MLvJBQu8TwUVZVTS6wdGnCnjL4IBmkw2pSeP5YnXuO8MnYw9AqbNWRhYT5ZfGNtcx2GTb2Vx8zs4PpR+lUrReyo0Z3U3zsrGU334SsA6V+Av1qLvT1OfT0ebPLQN3e2EgcxJeVSrI67KYsK0Jr8eTMPviRzxYsbn2MWFXpRcZa5FTdlUTZrPLJp9DwV9EUjkNY4o5Rko//LP62Aksh3r5EsT7unw= 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?AG4t6ztcZ0aajoEJmNZk/HU29zLE?= =?utf-8?q?g57LyrtF1NaVtXQB1/o5Yw5odrUJqmUv0vc6uSghezA/Itah+Y47HytLumjywiANl?= =?utf-8?q?P23p4+1Ymu/JIKT+BQbGYNValEeaH0r0HhynRvs5aahfnSjCRc2wxrkJwFx4004KN?= =?utf-8?q?XYQZ9ZQNV1ySoUKvzNE8kLJCbibNXp/zpPJ6v9V1kq7BGSqtfFnzSMutOxzQ2O8ru?= =?utf-8?q?ojQwfztyRdKkzqT/Hf6Q2qUiu2I0AyV84PZFirXcPf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HjsxT3Ijxp/pw8W2Zb3eE8SRZ88V4?= =?utf-8?q?7thMHx0Gqe3sdRYW9/LeUdyPS4vIaCAtcohTZvH7xr++fNqgeZAwiuUBsFlcZhtWE?= =?utf-8?q?fCGMICNjZRWl9z4J+O8RnPgCH7iJE7zx6brUC1FaLFKkcReSFiKpOU6auWkKn3ERh?= =?utf-8?q?kCyXdN/V+YrIfunYI+f1MILgfk6KXYPVzs1q5V1ZDtF4i0mh6vTK6eB12XKLQ570k?= =?utf-8?q?qcUpQFkGd+5fxKx5tFt6yZJQ9DmB6ZrgWxx9OonYAPgNIXztdCJ5O4l2T/Lr7Tqs1?= =?utf-8?q?gKYqkWn7z+msIq6tPoPAUxW/y/+KwNLXp2oBJD0BVwvlr8062q8b1iwdrSYLuwi/w?= =?utf-8?q?IgXtvlJbFNfFGNeBdECrA0/oXEKKMzZJNB2lmlyXmFvVsqg8/VBad7u32ypF5zxd4?= =?utf-8?q?o4ueStC4WiDxiVi7OZIyOXd8Ck8xE1dbXZyz73aO3aLADYonLBpJhmA=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?/AjV8lZt+I+3Xo5g?= =?utf-8?q?svUJzqSPcha6oZXFuYfHdbuAtfOy60oGazjG2urxeDxfSv9A+SRLEju97RUGYHRAL?= =?utf-8?q?cT95oQf/LBtcCrAOId8q33je/gnnXSNr/nMojGoto11P62AgxjO83p9xZr92pRjVj?= =?utf-8?q?+wa8BeRNt0UCbC5UL3gHfwgUyipVFxjTTyD5vFa56f5cE6ydJ82XV94OKGgVGrcEu?= =?utf-8?q?V4BaQKdto8NYdpSxdHa10V7G1xuVMgRtwGU9nQkN3+/baKFQizJHuxhmP1B4M3iJB?= =?utf-8?q?IzBhXun19JhqoLO9KYNs8KZHfudcIhT/I1kLMrwfkGDB+Hr+QfN3F7F1aZCsI4Pyi?= =?utf-8?q?uxuj1U8WNJytPrzNCNIp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rg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5acecf9-a644-4ccd-d38a-08db0ba40b82 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:19:00.1378 (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: pUR3X0yk46SSXLBOHemp09DgZNGdou4l7+Utevn1fZ+x4E8Ix3hqhIh2qWya3xsRn8leTHo8ovepmi0tXexXgg== 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 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-2302100173 X-Proofpoint-GUID: xz22lOzeqzvHtsWxInwgogCPGm08L9jb X-Proofpoint-ORIG-GUID: xz22lOzeqzvHtsWxInwgogCPGm08L9jb X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_121915_652688_DC838C31 X-CRM114-Status: GOOD ( 19.57 ) 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 50a04347ab05..3a3ef558244a 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -400,9 +400,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 } }