All of lore.kernel.org
 help / color / mirror / Atom feed
* ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
@ 2020-08-29 14:29 kernel test robot
  2020-08-31 17:19 ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2020-08-29 14:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4678 bytes --]

CC: linux-kernel(a)vger.kernel.org
TO: Feng Tang <feng.tang@intel.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4d41ead6ead97c3730bbd186a601a64828668f01
commit: 09c60546f04f732d194a171b3a4ccc9ae1e704ba ./Makefile: add debug option to enable function aligned on 32 bytes
date:   2 weeks ago
config: riscv-randconfig-r014-20200829 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        git checkout 09c60546f04f732d194a171b3a4ccc9ae1e704ba
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld.lld: error: arch/riscv/kernel/head.S:52:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: init/main.c:664:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/linux/trace_events.h:611:(.text+0x25C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/linux/trace_events.h:612:(.text+0x46C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/linux/trace_events.h:613:(.text+0x6BC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/linux/trace_events.h:613:(.text+0x6FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/linux/trace_events.h:613:(.text+0x788): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/linux/trace_events.h:614:(.text+0x7D0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/linux/trace_events.h:614:(.text+0x810): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0xFD4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x103C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1150): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1254): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1394): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x13FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1450): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1538): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: include/trace/events/initcall.h:10:(.text+0x15FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: init/main.c:664:(.init.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
   ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26233 bytes --]

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

* Re: ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
  2020-08-29 14:29 ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax kernel test robot
@ 2020-08-31 17:19 ` Nick Desaulniers
  2020-08-31 17:35   ` Fāng-ruì Sòng
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Desaulniers @ 2020-08-31 17:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5410 bytes --]

https://github.com/ClangBuiltLinux/linux/issues/1020 sounds like we
should add `-mno-relax` to KBUILD_LDFLAGS when using LLD for now.

On Sat, Aug 29, 2020 at 7:29 AM kernel test robot <lkp@intel.com> wrote:
>
> CC: linux-kernel(a)vger.kernel.org
> TO: Feng Tang <feng.tang@intel.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: Linux Memory Management List <linux-mm@kvack.org>
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   4d41ead6ead97c3730bbd186a601a64828668f01
> commit: 09c60546f04f732d194a171b3a4ccc9ae1e704ba ./Makefile: add debug option to enable function aligned on 32 bytes
> date:   2 weeks ago
> config: riscv-randconfig-r014-20200829 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install riscv cross compiling tool for clang build
>         # apt-get install binutils-riscv64-linux-gnu
>         git checkout 09c60546f04f732d194a171b3a4ccc9ae1e704ba
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>    ld.lld: error: arch/riscv/kernel/head.S:52:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: init/main.c:664:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/linux/trace_events.h:611:(.text+0x25C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/linux/trace_events.h:612:(.text+0x46C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/linux/trace_events.h:613:(.text+0x6BC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/linux/trace_events.h:613:(.text+0x6FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >> ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/linux/trace_events.h:613:(.text+0x788): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/linux/trace_events.h:614:(.text+0x7D0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/linux/trace_events.h:614:(.text+0x810): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0xFD4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x103C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1150): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1254): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1394): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x13FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1450): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1538): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x15FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: init/main.c:664:(.init.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>    ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202008292210.L44zhfiq%25lkp%40intel.com.



-- 
Thanks,
~Nick Desaulniers

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

* Re: ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
  2020-08-31 17:19 ` Nick Desaulniers
@ 2020-08-31 17:35   ` Fāng-ruì Sòng
  0 siblings, 0 replies; 3+ messages in thread
From: Fāng-ruì Sòng @ 2020-08-31 17:35 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5775 bytes --]

On Mon, Aug 31, 2020 at 10:19 AM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> https://github.com/ClangBuiltLinux/linux/issues/1020 sounds like we
> should add `-mno-relax` to KBUILD_LDFLAGS when using LLD for now.

Yes. R_RISCV_ALIGN & R_RISCV_RELAX are difficult to implement. In the
foreseeable future we have to use -mno-relax with LLD>

> On Sat, Aug 29, 2020 at 7:29 AM kernel test robot <lkp@intel.com> wrote:
> >
> > CC: linux-kernel(a)vger.kernel.org
> > TO: Feng Tang <feng.tang@intel.com>
> > CC: Andrew Morton <akpm@linux-foundation.org>
> > CC: Linux Memory Management List <linux-mm@kvack.org>
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   4d41ead6ead97c3730bbd186a601a64828668f01
> > commit: 09c60546f04f732d194a171b3a4ccc9ae1e704ba ./Makefile: add debug option to enable function aligned on 32 bytes
> > date:   2 weeks ago
> > config: riscv-randconfig-r014-20200829 (attached as .config)
> > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
> > reproduce (this is a W=1 build):
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # install riscv cross compiling tool for clang build
> >         # apt-get install binutils-riscv64-linux-gnu
> >         git checkout 09c60546f04f732d194a171b3a4ccc9ae1e704ba
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    ld.lld: error: arch/riscv/kernel/head.S:52:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: init/main.c:664:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/linux/trace_events.h:611:(.text+0x25C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/linux/trace_events.h:612:(.text+0x46C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/linux/trace_events.h:613:(.text+0x6BC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/linux/trace_events.h:613:(.text+0x6FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> > >> ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/linux/trace_events.h:613:(.text+0x788): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/linux/trace_events.h:614:(.text+0x7D0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/linux/trace_events.h:614:(.text+0x810): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0xFD4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x103C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1150): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1254): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1394): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x13FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1450): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x1538): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: include/trace/events/initcall.h:10:(.text+0x15FC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: init/main.c:664:(.init.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
> >    ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe(a)googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/202008292210.L44zhfiq%25lkp%40intel.com.
>
>
>
> --
> Thanks,
> ~Nick Desaulniers



-- 
宋方睿

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

end of thread, other threads:[~2020-08-31 17:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 14:29 ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax kernel test robot
2020-08-31 17:19 ` Nick Desaulniers
2020-08-31 17:35   ` Fāng-ruì Sòng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.