Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73977C433ED for ; Fri, 23 Apr 2021 07:41:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3519B6145A for ; Fri, 23 Apr 2021 07:41:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240868AbhDWHmF (ORCPT ); Fri, 23 Apr 2021 03:42:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:47154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbhDWHmF (ORCPT ); Fri, 23 Apr 2021 03:42:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 93372613CC; Fri, 23 Apr 2021 07:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619163689; bh=xbfW9+nMsr+EbJ1u7f+oV5Mjdc4DYnSoTlX+3kqGAbk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=crTljxvJV7umKvdU2kafFt69fiEhQVvP0k2XW+a+iNcpyWYbPHkyFEpHhu5d3YTJg hS4F36NtWFVdmeILDz7mnLtFOKFkd5dqJG5z6xhEQkuBcLDEhqXPhWYwucg6U3+tSq CqpYUnJwnSHrZ39aIBPNsJ9uLwG4a4LeSmlTHjMs= Date: Fri, 23 Apr 2021 09:41:26 +0200 From: Greg KH To: Manoj Gupta Cc: Johannes Berg , stable@vger.kernel.org, maskray@google.com, llozano@google.com, linux-wireless@vger.kernel.org Subject: Re: [PATCH] iw: set retain atrribute on sections Message-ID: References: <20210422182545.726897-1-manojgupta@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422182545.726897-1-manojgupta@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, Apr 22, 2021 at 11:25:45AM -0700, Manoj Gupta wrote: > LLD 13 and GNU ld 2.37 support -z start-stop-gc which allows garbage > collection of C identifier name sections despite the __start_/__stop_ > references. Simply set the retain attribute so that GCC 11 (if > configure-time binutils is 2.36 or newer)/Clang 13 will set the > SHF_GNU_RETAIN section attribute to prevent garbage collection. > > Without the patch, there are linker errors like the following with -z > start-stop-gc: > ld.lld: error: undefined symbol: __stop___cmd > >>> referenced by iw.c:418 > >>> iw.o:(__handle_cmd) > > Suggested-by: Fangrui Song > > Signed-off-by: Manoj Gupta > --- > iw.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.