From patchwork Fri Feb 10 20:19:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136391 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 9ACEFC636D4 for ; Fri, 10 Feb 2023 20:36:42 +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=iNNCAqmLCoLWjXCunxxemOSzqew9/IAoO280LfB4umg=; b=gzXdim345fLSmg 2fP+cg1PC+LckJ0Td0RLRpQQQ+G9FUVKtTZmWUv4xDSAEc+X4/mX6bKxsnFGZS3+4HnuwvvSa5xk+ kAi4S+5xCCoS2Dc2C6r5MwDbywjEcM66vFMdUQweq+98D0EB/sfpHEW/wYfPv1tvDVbKUIRAmmpSy GqmXiIrXKHmjFFVLaI+xxhXIqd4y13ouDMX1OvMnqiXxGScgWWbxxDmlhtuXA+1FOdBTir6Z/RWZN pu1SiBy84FvfRaOhCG+y9VBDM37rkZYO+H005qmSzBAhGBZ45r3LnUnpuiUwQBbI0ToQ7k760Inzp AYVWtBvnyLmjqEs6ewog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQa8H-007Qor-Jz; Fri, 10 Feb 2023 20:36:34 +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 1pQZsM-007Lt8-In; Fri, 10 Feb 2023 20:20:08 +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 31AHwrY9007089; Fri, 10 Feb 2023 20:19:56 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=AhQSONNbupqVH4rRfSwGHzzv1jtMgpIdW7W9Pkq82J4=; b=LbQ3sKng8CxtAVNnUJmXoS7P6xlEAPh6qVNC85dyzfmLlz4U2qQ/0P3uVlt09RRijgWf Oc65ojX6i9/Tk2xwYqqb5JPoW5Tg9VnHdnwSEhHqDAKCScJJgLp+9FJjjmihDfuUjd4a jy10w4BigopFUOMgxF5eFRr9fCE6wn33MwYEsvzKRnqtHZo/TLa9p3eh9QkQVa7rwn5b ku+lizEFIASA90pAyHpZLNvk2ioJEfyJfN8qCAQ/RjeYkaEAw1xJB3IfP4Y1P4SRGx1W k61JOEuzU0pfkb3+876/QwS2SMuWYMz0BNOpsKOA2ccaw/gh/pWlWHzk3sIwdtKCZVYn OQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhe53p6df-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:19:56 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AJ6w6x025750; Fri, 10 Feb 2023 20:19:55 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2104.outbound.protection.outlook.com [104.47.70.104]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdthtf2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:19:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AZsPwwBWvbqUKIDQlGXJZkk+WEix4QZ3DNI5+C4yCdxWbYKZRAKD6Q/8vBEe3J5o8C1/9rk/ft87YmskS6NTJVRK2fAKYmDDQ7vQZvg8TcTFVzYXA0aEiO3Mst72U1FPmXBh90ro2UReBcSone3OuTySrSTCYxQZUt1Flt3/hN6ANTcu7JSx1x2OVuNnvKGPclZfvUDgzUv0uFl+bbYOJ/Q9VnYuyWTrdhXEZ/LPb78wdnRLrTWwRjaemkkKYnjCIAHhWKfEiytykH8B9AhjIVQksp/3rLStLyWbVGNl/iVCVdYg6rv2DbL4Pq7y70wcBsjEeEBQjwN+ik6yTJPu7w== 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=AhQSONNbupqVH4rRfSwGHzzv1jtMgpIdW7W9Pkq82J4=; b=LHQlcUMnavrUYq2Mu4gbmxcn2NnsIFGbU0Om3JVGsElnoHNtidP/NrXmHRfduMIlqIRHWwTJVf4eQ4OfL1AmpxBTiK0yvU/YM8uFlirNJkdUR6alBjw6HI3Aaj3CpJwerKXa02O5vbt0B1lJuJNfSu9bzkmq78rBZrJJPRhm7mLk5/EuDv9Fb3FI6ZAwpKu5nDF1Lr+dLNCVnijFYXgw0nS0r/SEBFgb3H42zEjcNzfjtT3JdY9YiNo9r0a7IR118ozlvaUAzH1K0TrMwYwgJ1O8r8qIZhJfcVPvLJXjDBy5N2AxKuCA2UCJ+eAuwqZB6G5OiVmGNqzJx6lsNtttPQ== 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=AhQSONNbupqVH4rRfSwGHzzv1jtMgpIdW7W9Pkq82J4=; b=Y5ucjTmvKUfyBwHZEtYfyaC0SyyayTv/dTCEldgOz5CkMJMZXmDMgLcXDikbzyxCBUymr+ook3XMHr3I5d8fjQ2t8+08HtlWBxM9sZV3f5LBmWXwzHq4zbe8ruUMWAB9GSc1JHcFijpu3A4frAaRxFarhcwGZkE9Z9B5WzChxEM= 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:53 +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:53 +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.10 v2 3/5] powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds Date: Fri, 10 Feb 2023 13:19:37 -0700 Message-Id: <20230210-tsaeger-upstream-linux-5-10-y-v2-3-ada7b8d36096@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-5-10-y-v2-0-ada7b8d36096@oracle.com> References: <20230210-tsaeger-upstream-linux-5-10-y-v2-0-ada7b8d36096@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: SJ0PR03CA0027.namprd03.prod.outlook.com (2603:10b6:a03:33a::32) 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: fa645596-0984-4327-1795-08db0ba42b2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t/YPNq1DB7KPNYhxpzHuUakrfMAbymNsgeQeoTrviyYv990dhLfGyjJjfW3qGYfCbebjts7uhHW9gJNgcydWL61ck5cse9mr/8o48FEUxf50kEFVXvqfLTbw5DIImz97l6jJH3x6u4XS0NEb4qKdoIhz7O56dhROV5OkRGUrT8AsfTj/hmhzxqPYA+x+it/bSbZcFSd6YiN5m6gXcss8rFb0KzPVFXsSMmr33yl45DYPj59kDhGcVruJc7QwcPIOfh5KdNMEay1H5im5THXDiYGeAf2FhYlcAP4CmsgJsvpRVRPDLGqKkoYZuAyb70/Gm4l3YHXlm0BZhyPFdcYN84pBXGorRudyc26pa6i+C8NomiJjvrtPwNHG1B7iun/o1V1tnIiUGrW8RQ8sA/u/v/NHvzv9JNIvRk2pq9QKGoXE7kOprn7pHvRmjshJ+UZl3D8XerzXSF0lHZRqGR5ZpIiHRprqX/cmN+ToMcfwSVV/HxDIOuI9EidUp5wQDVNRRyanCeDrfDmsFmM+TQVT3exAEO0IWiLs9HIzzKodf/Ylnk0C/Zm2OpoTXh8GXOXcVTG8gQL22beQqN905oM3hs8WpwBqIK/WBGhSGtGHUh2w+M9nwUOqmW6FelTb5rcoBqaRFADNsNqxDD85/gMFw1rAW/5VftsWBlxQmwwP1Mk2G9S/I3hTjCHAvLA1QDRUE3HiDyr1++bptDjD3jCKda6la+MBLBYrlAVBFylMVls= 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?31EKcGxCprgFMvc8mN+4b2iliYET?= =?utf-8?q?Ud6V1URZxj+cyH/jsfqC7shi8M8RgrCP9LVzTfmJ4fKG0m0IZ9P5jxXCKitlQE+FU?= =?utf-8?q?aHpqDIGOjGMvbp/S2u6v+G+frLbcFMCX5RWZ+DZ6VB+R0KG+x7fKknL+C4JdPDTLg?= =?utf-8?q?/I2y0VvvkaSCbZ6vOYn8IMk1csNmh/6wsoUPcpKO+gwWHkxa1XZT+xdVIui8ncPUk?= =?utf-8?q?oVe6XCpvK8oxEz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ovhxJPbXxz+NAUvSz8JJvoNuhPG1mXVLl?= =?utf-8?q?xEzadyBT1zEFO7ZpWd4hTP5r/2f1T+LkXmAt4KFh+vt0k2kBw29OJkCaAYXyInNC9?= =?utf-8?q?YKluqZzGzhdKt1jWdBpCd0BBfIkRgQZ67+z0ytf8IFBe6sHGjkS5+oiYfhS8pyDBe?= =?utf-8?q?gxPHWsKF/DUOhbeKXNPcq66HXy/JiuKpXWeJyPcqEA+YcaLLnyFRSF1VNwVvo9lJK?= =?utf-8?q?rdoM3/NqE3UN1WKpD8+w3OW0lTOuf59IC81IA06d0Q3gpL4JOyKYERnXur5MOLaP9?= =?utf-8?q?qWfQIqkOqsw4gudHowhu3hUw+BiHcJCOjJIm3ZR/DDVjVk8pZ1YBQliVdxC7p0aW4?= =?utf-8?q?dx/wTF3NT/g+biPp2DWg9ql4JNLCmnWnrdlEvrIxVWy34y1j1kTFeZM4qcqubzU3R?= =?utf-8?q?P5+zvJpo9AEnsX0GnnHRR7OBxczGjCFllhQi9eUAwILKeHXNdOPbQ7k=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?1lXwgb2U3MPsxe8u?= =?utf-8?q?nhISEsBiqbrSLiyuANzBtNCZ6DQRJkA0rwrVF/qgIFIS5kLT4N3g3Ad/NEmMrLEMn?= =?utf-8?q?9xRFMlUfbRJos/QxpQfOYfMdvGfIRVwdbqxdwi//JGZz240dxhZoy/KSnX0Tccres?= =?utf-8?q?s6aulXa1uSFqes17wMYARUkCWSl6ulKT7T42JLhMgEVHx2Ln+GrA6TFs4o9iUGxZp?= =?utf-8?q?vpypZS+QWps4UPigHJfERKmWuWj8zD9GpPX1M02IOHDe+Q7F6M2TP3NnTUu9FZ9i+?= =?utf-8?q?bXnBeCA5w48XOCxbZcTGM0GGJboOKrWBbABmqw3H19yIeokCkATPWseHAG57MhrL5?= =?utf-8?q?Jx0qNcA7wSwnW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g: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa645596-0984-4327-1795-08db0ba42b2a 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:53.2434 (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: KPh6LnLnzVffKPIsQlO+kxrzNptvl+m+011RAxl/RJuhNB9S3lF8w/xdfqa2RmFyNWFU1B6yTKbRgQ5XcTBrQQ== 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-ORIG-GUID: BrvnppJUZZxvUUU6RiWKYwdEpinEMZwl X-Proofpoint-GUID: BrvnppJUZZxvUUU6RiWKYwdEpinEMZwl X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122006_800519_B57B76FE X-CRM114-Status: GOOD ( 18.97 ) 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 e3984389f8ef..fabe6cf10bd2 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -379,9 +379,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 } }