From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 0DDFCC43331 for ; Fri, 27 Mar 2020 23:04:31 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78FDB20717 for ; Fri, 27 Mar 2020 23:04:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78FDB20717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48py97528XzDrNc for ; Sat, 28 Mar 2020 10:04:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=intel.com (client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=yu-cheng.yu@intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=intel.com Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48plJ54BS2zDrDJ for ; Sat, 28 Mar 2020 01:54:32 +1100 (AEDT) IronPort-SDR: Q2ATlSRvUNavmygUm0uKKwIh/SwzH9ms/iIHYOIeSW0zuTygDvQ78mBkClxYHIgtVOGxsi+KNc buKwImkeajvA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 07:54:28 -0700 IronPort-SDR: PHyV6t8vz3ztXAUHikFSN4FujU89Aw6/6odNxAQxtotg7raSj/OegyjNL/hLR2qwoH5rg135WX YUHR3HKBd2aQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,312,1580803200"; d="scan'208";a="447441013" Received: from yyu32-desk.sc.intel.com ([143.183.136.146]) by fmsmga005.fm.intel.com with ESMTP; 27 Mar 2020 07:54:28 -0700 Message-ID: Subject: Re: [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval From: Yu-cheng Yu To: "H.J. Lu" , Michael Ellerman Date: Fri, 27 Mar 2020 07:54:28 -0700 In-Reply-To: References: <202002050743.dc2PtIsm%lkp@intel.com> <87wo901jm0.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 28 Mar 2020 10:02:36 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Mackerras , linuxppc-dev , kbuild-all@lists.01.org, Kees Cook Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, 2020-02-06 at 04:55 -0800, H.J. Lu wrote: > On Wed, Feb 5, 2020 at 7:26 PM Michael Ellerman wrote: > > "H.J. Lu" writes: > > > On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot wrote: > > > > tree: https://github.com/yyu168/linux_cet.git cet > > > > head: bba707cc4715c1036b6561ab38b16747f9c49cfa > > > > commit: 71bb971dd76eeacd351690f28864ad5c5bec3691 [55/58] Discard .note.gnu.property sections in generic NOTES > > > > config: powerpc-rhel-kconfig (attached as .config) > > > > compiler: powerpc64le-linux-gcc (GCC) 7.5.0 > > > > reproduce: > > > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > > > chmod +x ~/bin/make.cross > > > > git checkout 71bb971dd76eeacd351690f28864ad5c5bec3691 > > > > # save the attached .config to linux build tree > > > > GCC_VERSION=7.5.0 make.cross ARCH=powerpc > > > > > > > > If you fix the issue, kindly add following tag > > > > Reported-by: kbuild test robot > > > > > > > > All warnings (new ones prefixed by >>): > > > > > > > > powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab_gpl+__wait_rcu_gp > > > > > > arch/powerpc/kernel/vmlinux.lds.S has > > > > > > .rela.dyn : AT(ADDR(.rela.dyn) - (0xc000000000000000 -0x00000000)) > > > { > > > __rela_dyn_start = .; > > > *(.rela*) <<<<<<<< Keep .rela* sections > > > } > > > > The above is inside #ifdef CONFIG_RELOCATABLE > > > > > ... > > > /DISCARD/ : { > > > *(*.EMB.apuinfo) > > > *(.glink .iplt .plt .rela* .comment) > > > ^^^^ Discard .rela* sections. But it is ignored. > > > *(.gnu.version*) > > > *(.gnu.attributes) > > > *(.eh_frame) > > > } > > > > But that is not #ifdef'ed at all. > > > > > With my > > > > > > ommit 71bb971dd76eeacd351690f28864ad5c5bec3691 > > > Author: H.J. Lu > > > Date: Thu Jan 30 12:39:09 2020 -0800 > > > > > > Discard .note.gnu.property sections in generic NOTES > > > > > > With the command-line option, -mx86-used-note=yes, the x86 assembler > > > in binutils 2.32 and above generates a program property note in a note > > > section, .note.gnu.property, to encode used x86 ISAs and features. But > > > kernel linker script only contains a single NOTE segment: > > > > > > /DISCARD/ : { *(.note.gnu.property) } > > > > > > is placed before > > > > > > .rela.dyn : AT(ADDR(.rela.dyn) - (0xc000000000000000 -0x00000000)) > > > { > > > __rela_dyn_start = .; > > > *(.rela*) <<<<<<<< Keep .rela* sections > > > } > > > > > > Then .rela* in > > > > > > /DISCARD/ : { > > > *(*.EMB.apuinfo) > > > *(.glink .iplt .plt .rela* .comment) > > > *(.gnu.version*) > > > *(.gnu.attributes) > > > *(.eh_frame) > > > } > > > > > > is honored. Can someone from POWERPC comment on it? > > > > Hmm OK. I'm not really a toolchain person. > > > > The comment on DISCARDS says: > > > > * Some archs want to discard exit text/data at runtime rather than > > * link time due to cross-section references such as alt instructions, > > * bug table, eh_frame, etc. DISCARDS must be the last of output > > * section definitions so that such archs put those in earlier section > > * definitions. > > */ > > > > But I guess you're changing those semantics in your series. > > > > This seems to fix the warning for me? > > > > diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S > > index b4c89a1acebb..076b3e8a849d 100644 > > --- a/arch/powerpc/kernel/vmlinux.lds.S > > +++ b/arch/powerpc/kernel/vmlinux.lds.S > > @@ -365,9 +365,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 > > } > > } > > > > > > cheers > > This looks correct me. > > Reviewed-by: H.J. Lu > > Thanks. > Has this been merged into any branch yet? I just checked the tip tree and did not see it. Thanks, Yu-cheng