Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1137238pxy; Fri, 23 Apr 2021 00:44:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH/qNhomC/2iXcWWAghrS6d+dNrik4QhPuf3nQDBLaYvpRqNAwKzBcZBp2eX+fVTRmXDHn X-Received: by 2002:a65:62c5:: with SMTP id m5mr2471346pgv.319.1619163879212; Fri, 23 Apr 2021 00:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619163879; cv=none; d=google.com; s=arc-20160816; b=lAtcD9q7kP5X9JGYJ9LrhvBwa3kcy7OoXjH3YBTOhHX0L5k2kmow72NjFzL8VSd41q 58gw3yoTHqS10raItY3jIZWrxI4Enn18ZJxpHMZAG9H4ptMsAPEnQ4E14l2YOmNXqPus YABTvnslymx09CRvhqhVxDAtm/FkVSAz7nbjisGAAXeO6sqipPeTIZ/C1a68e8mQ7QDb /gaJR/WRjwiOhhhor9AV+2seo/ZvBugmVm+FK9km6KwiztdEaynaIC3f32dn+SdTOI7M CS616HhMibZntshjVjenatKrgoDpAFLkkwLZF87WTEDjGYz8EXe5wJd/Cb/N72fPvqRF yULg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SIg/N9xKjsdst9/5lSHIQppaKvN8AJchIVMjnyDa9Yw=; b=HMmrwU3IlCCw6VDvhkdfNiiDIyx066BbyjlHPugOpVFuc/8hJW8cEen4Ku/vzm5aQr FpIoKQ4VSslUna2epmGVsBWR/gf9nxL6Mw856gOtgA7c0C50g+w7up4fGnN2mejh03P7 YQAg13T23AGe3/j4lHdgEA1fDMPK6FuRpnL1+3tKfPIfWAV6Rw+43JIWntv1LbTwRPH6 EHSJGZIc6LDEkqH8PSvpDcCL51hlt0dCDKigOUHdk2Co2bXct6HMQfJZoKeTcTQa5EQt lvgPQpAJ/VklJYWkHj9EcLuvG+R0+FCHxesjT64Hvh6/tGzU4TvL0pdafkHT5dE/Nbuu tYOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=crTljxvJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id il7si8914390pjb.136.2021.04.23.00.44.21; Fri, 23 Apr 2021 00:44:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=crTljxvJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240868AbhDWHmF (ORCPT + 99 others); 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.