ld.lld: error: include/linux/trace_events.h:613:(.text+0x748): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax

0 visningar
Hoppa till det första olästa meddelandet

kernel test robot

oläst,
29 aug. 2020 10:29:362020-08-29
till kbuil...@lists.01.org, clang-bu...@googlegroups.com
CC: linux-...@vger.kernel.org
TO: Feng Tang <feng...@intel.com>
CC: Andrew Morton <ak...@linux-foundation.org>
CC: Linux Memory Management List <linu...@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 <l...@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/kbuil...@lists.01.org
.config.gz

Nick Desaulniers

oläst,
31 aug. 2020 13:19:352020-08-31
till clang-built-linux, kbuil...@lists.01.org, kernel test robot, Fangrui Song
https://github.com/ClangBuiltLinux/linux/issues/1020 sounds like we
should add `-mno-relax` to KBUILD_LDFLAGS when using LLD for now.
> --
> 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-li...@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

Fāng-ruì Sòng

oläst,
31 aug. 2020 13:35:382020-08-31
till Nick Desaulniers, clang-built-linux, kbuil...@lists.01.org, kernel test robot
On Mon, Aug 31, 2020 at 10:19 AM Nick Desaulniers
<ndesau...@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>
--
宋方睿
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden