From patchwork Fri Feb 10 20:17:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136350 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 0029BC636D4 for ; Fri, 10 Feb 2023 20:21:10 +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=ZvBwn3tim7MRs7POEKTS5H1ap0CqQVoGnyg8tIwB7VY=; b=Grhj1E2mIhcIXr GyMYc/JMcIFiB4hnHyIVb+qHO9XThOMJGekD/YGq7DUqG4LBeE7Zd4pTwIQtvXztoJQSNLXSm+494 F0flMm8otQCksQ2gYCVx2vLAHrablUVH+ibkpJ9x13pbSh4Q5ywC8I5u1sEkCzATP8eCoGUqJ31an /CXknhJmQCDwTD/wRcS+Q4OgR9Tc2rM3PfqSZ4mfcsKXidsZXaBi3xlWs1ZxlGxM9gQUicTocR2Et EN6uIH0vQrA6KpYNZWtwFfqqCM3sIl1uFjQtAzufraOPRRI1Hka3YifCeAX4mR2/ZyDK3nmQ4IQBd 3s65G1B5uz8qjUQiahfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZtE-007MCc-Bw; Fri, 10 Feb 2023 20:21:01 +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 1pQZqK-007L6Z-QU; Fri, 10 Feb 2023 20:18:02 +0000 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AHwhNH019425; Fri, 10 Feb 2023 20:17:50 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=ny504gccfvL4lZKcZdaoTQ2gm72LYNb1HXOelKkx1FY=; b=FoQ+4ojKR7qU0pYP7ZphxQn2jY9uFBSBnR7JBIWKaGd5MBj6mNz2TrDxBG0UuBaaepjj YXh1ZMrkQ/POZqnb0hYXsk2GzodSS6Cua3pXDxhZ6BohKSwMdI4AiP3ab/NojSD1fa3x oK1Di2sHhpBcD7qlSiMvsIvWoym1xDgKPI3l8LKoejPwwD+OtI7odCW9JzYPLMSN4U6d GKJlbkWwzOT7hGu0WfhmIFEHSLjEtG48ZffBBzmwsj8IBg7wtZqZqdWbWDd3SZoSiBKm yF6l6Uu/AT+G4B96pal7pROUG2w/iFzU8j91e2GjcdnmawdLszCWJ50RnI1Ac+JVhN5w Pw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nheyu68gc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:17:50 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AIfR1U036187; Fri, 10 Feb 2023 20:17:49 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2041.outbound.protection.outlook.com [104.47.57.41]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdth2aby-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:17:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BCELJ/4xBBrge2Lwy/NFrsEiuIg7hXPxXu/ZUG8ib60OwF2Bz7b/gBj5ajqrxXETLpLwHhAQW1aHMp5rmelHI5CJkBR9iflM2XkH+/ESt5VBLOv8Atprl6kSDfKW36DpZGLrOuiI50pdeh9I5oChltjqjAvowHHpxR0I5WcbHwYCvGY9xPavMusdHAH15f7Yizwv8hDzFxpBfnBfVo12oubh9Ia9tanSIsC2N1RX9nd/zICKRGKYi6DbyC6anPYwFREmI/5sLHXlBbEnPNPCWMW7QEju6/bvZl4EmPiZ42vMmW1UVDZ6ZNGyBzeIXYjKs1sOr1NqdHEW9qu5JGRtgA== 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=ny504gccfvL4lZKcZdaoTQ2gm72LYNb1HXOelKkx1FY=; b=apUTzCt7l6fyQTXwu5tEgXBTVZyTvNGWBVlZh4Z7p+ZfkPeD59y04DN/QDn6ZdWbPwcGg0KuMWQM9wTbMYW6f3U1G5zQ0prXcWB/ilnlj+yDaSqZHD4AFfOO5/xoZV6sx2juLvgdT7dfj3DQ+4s0g6u8yCmPgPGPNsuDsu/6mGsk4n4AwksJRIs8cOUm6he558HzJ3530phDojWOzzHDOtD2NAmBQtKNwRsMhDvSYkb2M0CWOisI0tni2l84paYddJBLKQt9s7P378o25Gd1D0SVm8TkzDvClrj+lnW5Z0TBD5j4a4WBtLHC5oA4YyQ6PGJZva4qjW3slsGd/Hjrfg== 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=ny504gccfvL4lZKcZdaoTQ2gm72LYNb1HXOelKkx1FY=; b=QTioAFNkpoepoh5Dcyj25OBW2eJxZ7qCjezSluJWHxUuy14n51jyvPufUE3QDcvejxERQwt5FOZ5+QTuG1qOGTuoxwdlcBvfr61yUClKP5X6QlDu0kO3gDyBJOFt4T5BAJvgSSv3dwYsfS1jvDuKdSU+eHq3l5McQx4amfofsKw= 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:47 +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:46 +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 6.1 v2 5/7] powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds Date: Fri, 10 Feb 2023 13:17:20 -0700 Message-Id: <20230210-tsaeger-upstream-linux-6-1-y-v2-5-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: BLAPR03CA0005.namprd03.prod.outlook.com (2603:10b6:208:32b::10) 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: 9259b972-0de0-4eb0-45e1-08db0ba3dfad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oIdoJMcA7D6Rvq56I1inSNcBaiDu2LZjOGt7h/11OdbWz6YYyIy3mS5X1S/0+DrSoBh6TKVOLGzT1Kh/bXVldvO27gO2/n0IrQb7j0yawSzNPzJNKLwbWyAXfQ7D4uOg6gk4Q9NbLB9ygcTUy0BqyRG31d9EQh+b8JRcMe0mF3ncBX3DbEdeXs1UCWSOQItNIplnN7QA6tHtUXqCMCMNc14+k3617PIDpHQh/xfOWtCUgIUzuchBpQFfTAnzlfpnbgp37FkeiFBZ16uSP0u278d8VfvDhgIfZ+NUohWtvO6wApgPGrgfdM0kWOEhrlPLoYhj5v9R1dWKnZr392Az0x302RoR1hCdv76lXWv24biykxtDly7UN9nk+ISR9HaFGb1ncVtqlyDR7hOnwrsbTGIKUoJusj/6iIgKuRcqVa3rUggLslF4Ow0inQeEfcp0sYvdpRvqf+dq8d/V6SiDxsZvK54v/lsV89CEH3iZj4UXEtxw6Y5axr5ug9HaOXPJxJoMCiXs8dAC7H6qNj4zdmLd/f2OKG36GvImk2Ao9X/FpXYLNzJJNcDIJgy30/d+ghnT4WoxE0k29YDm2NfLTBtBfHNVwenoVX5Mepa3ueyl76YrPdrc70SiFOuO4iEBj4+Sw20yTEd1a6OemF/5S5PNxZMwIXEd3sifgAccaAkNEr0sTUbuenE6NpWZfeZF0W1uVwPfFjD0fqtWNrwB1YsiTNfVKtRMJKsuw6Fd0dY= 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)(142923001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MQYwQSRls549dkksoexEy0iZLsAW?= =?utf-8?q?zjGSZm9f0Wz9prR991rhQjKZgsI+U53AE+fWegGPKPF+y9dAJde5hFD8IXqE9/OID?= =?utf-8?q?Mu/RtTAg8oxIrY8TL2fa2Fvb0sCih7L2UuPybI9xzOezUgqtplWci3OVXaUAUJKhG?= =?utf-8?q?gYD620FIbiRuFkzsztgw2tjQ7mTc5qDCG4UOhvRmGyXHPoEGcP8niiWG1kUTWROB9?= =?utf-8?q?FpjgT53NiPQ2zX9v8D681zn3HBdAw+ezQg4de9ibRcoH1H81h1di32Tnhgp5f0WLi?= =?utf-8?q?TT07b1MPbD/hZv9gYouI2vGbXNLGoh0tEwy6xT7EF4TUTKSAl89mRvhB+ddtrB0fI?= =?utf-8?q?55wOzlwVSARmkvGqsh3AjH1Iduoby3Lbt0ttBpu6bD+fkZ8nzhcAbnpc7sIAPqRqp?= =?utf-8?q?LPo4HAKlOb7eB5gjo5Nx72yXPgY9co4nrSQurAdfBMo/8Lbcx4RysXn9FtQh4AVq8?= =?utf-8?q?442S0qtxyaD3GAg3so9EAh3wPiBmtfnT2vluyLHD64TLYgJITxNNDnRXodC3e0FTo?= =?utf-8?q?EdsBGmqvd9qWWLoeELDBQJIt1xZOx5e+X6Iew7M0SOuqVHmnJMTGhO0GihPPR5EQy?= =?utf-8?q?Jcn++54QHDCWXn1ycQs01OeOJfMIHcKsJyo26aVJ70A84b5L+qGtPrTKrZDrzBkwh?= =?utf-8?q?P7R8vsi6xexyOGHjLjBktQRsFN1yUmCGS01cGC5XmDl6yAyklR6hOzeF6v0GMAeWX?= =?utf-8?q?bOoB44iNHd2I0TS9DdYfsk6xk/s6+Z+dImnCJTgByiJI1tJo9bdS532QULh+3Aq3M?= =?utf-8?q?94z4tk0hsxc2xCpvQJ4L4WNdXAAfAu48/n0Jzo5L/pxy+9lfPpARtS16znc961397?= =?utf-8?q?r6GeYi7mEFFR6uLS5EfIDp1Dc75xm514DWVBnLe5QGnlndExbF3zAfSN8p+tRbZQt?= =?utf-8?q?iMygU9cRWR9b7J8L3B6VhrgYgaSkoz77UEYOg9EY1s3dG/YRZb6EBCbMy39kuetuF?= =?utf-8?q?t41pR3w3B27Q8ZfZM9U4SBxTH3FZmVuLQd9Qfn4NhHUs21gkf0uZpELd6vfK+kY6b?= =?utf-8?q?kpeVTATvORtLqg2ffRTIf0bEcN37JAdQxaa0Eb9kDw1LqVpfnPKKHmqAw2QZ/Mf74?= =?utf-8?q?8g+8xiSmYa8TybtFsK3tuLH4svCQz5wVNh6yOzMD4LrqDC6QaJiLW4rChMM0Pjv7o?= =?utf-8?q?AcSlabpDUYCJhU0U1YkVYWfsenTXUecDxBMQEn4+npcJWWGaa8fOejnffpgLsGOJc?= =?utf-8?q?yJ7aIiFeMNPVHW2Xx79C5epzSkPAPjjbhpnerDIwHtvWHQWj1pb5ChP9OcNJZrwua?= =?utf-8?q?gW58R+ULe5BtdkZp5RkG4XEtMYMBAtpv7vF+rBfnlLzsYeVdCrWJXwh3xHd1rj2rw?= =?utf-8?q?Wi8eyF96qU2GuqF2lBK7EfO10qA7VFS9CNGq4WteeCuMGeJhSBy93VyEPUHt+P5jp?= =?utf-8?q?eFA2/nvWNuvD2EGmebZzRpen/vX6cecykSxwXVZ1CL7ExGVuuXOC6JMwG4yVJxJd8?= =?utf-8?q?aafQFBEKfwuNu8f+R1wLyebAa6NfImPUV3loQ2C36FDolv8m7rHHlheskRhEvZZ/B?= =?utf-8?q?XLVtwTVTeC0mztsNThELgc7MDa/fRUr8kiR++oC813L2d+hvebj8QgA=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?foum0RRfBZr7NLtT?= =?utf-8?q?x5nJOp9gsBiex/Y9cRyPcfs5UCFqJwzBLIMud8HXojEUZsCS0zzgRHQ0pkJY3EVl9?= =?utf-8?q?aIjq+4PMRT2sjU4q8g+wczj/hzi2hm7dDoGleMENKxFjqNR7Sb5U4C2I8V5bdGTT0?= =?utf-8?q?q0WvxauB7latGHmD2t3EdTzQssw6dsFWrwnyqN1Kzn/WNnOe0+odo3oRwWeaOXGCq?= =?utf-8?q?s1i/pV3xxuuFUcIfOFAy9TkiC2rEbyzigptrW7a8ayJdKNeU8rFFum2PdFRmCUsfF?= =?utf-8?q?200FNdz5EhogU1hNqrA6G7kLXPS29/kmNxGPzW5vQdu3eLuX0UwCt/uUbRfE+RK5g?= =?utf-8?q?m4mtwYsEoffPGKY1HD3TBpPKI8gvXRdIzX5Ltm30R4sdUHZfV7nYAhLsuKNkUZWM2?= =?utf-8?q?IdZsuCiJmn35h5FR8AWdiOdzZhz3L9N1lh/5oz+SGg7bwB0ELQq5uo+qJaPGTP1ZW?= =?utf-8?q?Z0+lJk5tsBNWB/k0/wgdnv+/QvugOzhja7KMIv/3BChJYavfyDPa8mobGGaDxHyHK?= =?utf-8?q?PrQfTycLESc7L17cKkVDaz8OArAoJN9mfx08ZjJwR49jrdsXx4sQXf4iypsPNXEQW?= =?utf-8?q?ZQlpa2RP+aDrB+J5BUbXM/y1YtZnOw9pF+l0shLBkfRmSNX6KuMR+eF1HT/3I+cNb?= =?utf-8?q?IopCFtotpPDqgr6HTF93QpN8+LfehKprT5GQGKlIX1B3OMlm1pizX/Jhjd7DZyxQr?= =?utf-8?q?RKs3tDPMtx2AxB4Jca1mpfAKwiexUj80m0HjjgIe6F8wmiXqHApzdfieotDJIMTNQ?= =?utf-8?q?hsThkt+zfQxAxOakKunf2JR+q21kelZvJDL3iWq9hszwCZ9YexEgK/mTHwq14S0tq?= =?utf-8?q?3vTilytxo7XheaduHTWSbtYYcuv+tbOW6Uzb0OKEWMDoeFwvee2JIp41P/0H4UhUQ?= =?utf-8?q?WorO49cqEqikEgSCNtmFP31ryzJBEqjNwkI2ET2lrpN91z1q7M0zCFYEMZe8isc/w?= =?utf-8?q?z13AK7yMNvxV9e88nNmu67n2+Pil8J+w8H3nDAax1OXgLNMraxOm5Mu12DWTGaftY?= =?utf-8?q?vnxgzqn2pjb5CtZX5NkT6UIXgxPGCTGgervKDYHRc954svj0/l+EKycahrHYLnczq?= =?utf-8?q?6tail+vPOqAw5w02Jquz5Ie3NYJzZ99H2o8ZkVHtkzsOOKoelsdpzqdaqqo/bLVw+?= =?utf-8?q?04tjO3cHmu2HuN9RS2nljMEuDZAoDoRgs12WNl2QuZNNkXAjaQYSrmRzCAS1v0NsV?= =?utf-8?q?PwgAl7os=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9259b972-0de0-4eb0-45e1-08db0ba3dfad 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:46.6275 (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: eEjucOjqC6pJrrUU8lEutCHzW/tcbV5+BC8rXDDtf0X88qhE56maljNgdUogTfu0EOXdZ2zgYM2lS79zM2651A== 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 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 phishscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100172 X-Proofpoint-GUID: OTca1dRXEf8Yn9NkezlEQSfaVWnM6UtD X-Proofpoint-ORIG-GUID: OTca1dRXEf8Yn9NkezlEQSfaVWnM6UtD X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_121801_029231_824CDD14 X-CRM114-Status: GOOD ( 18.84 ) 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 c5ea7d03d539..a4c6efadc90c 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -411,9 +411,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 } }