linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval
       [not found] <202002050743.dc2PtIsm%lkp@intel.com>
@ 2020-02-05 18:51 ` H.J. Lu
  2020-02-06  3:26   ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 2020-02-05 18:51 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, linuxppc-dev
  Cc: Yu-cheng Yu, kbuild-all, Kees Cook

On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot <lkp@intel.com> 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 <lkp@intel.com>
>
> 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
 }
...
 /DISCARD/ : {
  *(*.EMB.apuinfo)
  *(.glink .iplt .plt .rela* .comment)
                           ^^^^ Discard  .rela* sections.  But it is ignored.
  *(.gnu.version*)
  *(.gnu.attributes)
  *(.eh_frame)
 }

With my

ommit 71bb971dd76eeacd351690f28864ad5c5bec3691
Author: H.J. Lu <hjl.tools@gmail.com>
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?


-- 
H.J.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval
  2020-02-05 18:51 ` [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval H.J. Lu
@ 2020-02-06  3:26   ` Michael Ellerman
  2020-02-06 12:55     ` H.J. Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2020-02-06  3:26 UTC (permalink / raw)
  To: H.J. Lu, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: Yu-cheng Yu, kbuild-all, Kees Cook

"H.J. Lu" <hjl.tools@gmail.com> writes:
> On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot <lkp@intel.com> 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 <lkp@intel.com>
>>
>> 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 <hjl.tools@gmail.com>
> 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval
  2020-02-06  3:26   ` Michael Ellerman
@ 2020-02-06 12:55     ` H.J. Lu
  2020-03-27 14:54       ` Yu-cheng Yu
  0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 2020-02-06 12:55 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Yu-cheng Yu, kbuild-all, Kees Cook, Paul Mackerras, linuxppc-dev

On Wed, Feb 5, 2020 at 7:26 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> "H.J. Lu" <hjl.tools@gmail.com> writes:
> > On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot <lkp@intel.com> 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 <lkp@intel.com>
> >>
> >> 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 <hjl.tools@gmail.com>
> > 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 <hjl.tools@gmail.com>

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval
  2020-02-06 12:55     ` H.J. Lu
@ 2020-03-27 14:54       ` Yu-cheng Yu
  2020-03-27 17:36         ` RFA [PPC kernel] Avoid upcoming PPC kernel build failure H.J. Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Yu-cheng Yu @ 2020-03-27 14:54 UTC (permalink / raw)
  To: H.J. Lu, Michael Ellerman
  Cc: Paul Mackerras, linuxppc-dev, kbuild-all, Kees Cook

On Thu, 2020-02-06 at 04:55 -0800, H.J. Lu wrote:
> On Wed, Feb 5, 2020 at 7:26 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> > "H.J. Lu" <hjl.tools@gmail.com> writes:
> > > On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot <lkp@intel.com> 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 <lkp@intel.com>
> > > > 
> > > > 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 <hjl.tools@gmail.com>
> > > 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 <hjl.tools@gmail.com>
> 
> Thanks.
> 

Has this been merged into any branch yet?  I just checked the tip tree and did
not see it.

Thanks,
Yu-cheng


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RFA [PPC kernel] Avoid upcoming PPC kernel build failure
  2020-03-27 14:54       ` Yu-cheng Yu
@ 2020-03-27 17:36         ` H.J. Lu
  0 siblings, 0 replies; 5+ messages in thread
From: H.J. Lu @ 2020-03-27 17:36 UTC (permalink / raw)
  To: Yu-cheng Yu; +Cc: Paul Mackerras, linuxppc-dev, Kees Cook

On Fri, Mar 27, 2020 at 7:54 AM Yu-cheng Yu <yu-cheng.yu@intel.com> wrote:
>
> On Thu, 2020-02-06 at 04:55 -0800, H.J. Lu wrote:
> > On Wed, Feb 5, 2020 at 7:26 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> > > "H.J. Lu" <hjl.tools@gmail.com> writes:
> > > > On Tue, Feb 4, 2020 at 3:37 PM kbuild test robot <lkp@intel.com> 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 <lkp@intel.com>
> > > > >
> > > > > 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 <hjl.tools@gmail.com>
> > > > 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 <hjl.tools@gmail.com>
> >
> > Thanks.
> >
>
> Has this been merged into any branch yet?  I just checked the tip tree and did
> not see it.
>

FYI, my patches have been queued on x86/build branch.   Could someone
from PPC community add this patch to PPC kernel to avoid upcoming PPC
kernel build failure?

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-27 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202002050743.dc2PtIsm%lkp@intel.com>
2020-02-05 18:51 ` [yyu168-linux_cet:cet 55/58] powerpc64le-linux-ld: warning: discarding dynamic section .rela___ksymtab+jiffies_to_timeval H.J. Lu
2020-02-06  3:26   ` Michael Ellerman
2020-02-06 12:55     ` H.J. Lu
2020-03-27 14:54       ` Yu-cheng Yu
2020-03-27 17:36         ` RFA [PPC kernel] Avoid upcoming PPC kernel build failure H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).