Skip to contentSkip to conversation

sh4-linux-nm: 'drivers/soc/litex/litex_soc_ctrl.o': No such file

PATCH New kernel test robot 3 participants 4 messages Jan 26, 2021 – Feb 10, 2021

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
commit: 9d93a9e8aab3f82b6742dd034a6a81d4025cd82e [3035/6048] drivers/soc/litex: move generic accessors to litex.h
config: sh-randconfig-r025-20210125 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0

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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9d93a9e8aab3f82b6742dd034a6a81d4025cd82e
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 9d93a9e8aab3f82b6742dd034a6a81d4025cd82e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> sh4-linux-nm: 'drivers/soc/litex/litex_soc_ctrl.o': No such file

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

#1 lore raw
Quoted 16 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
commit: 9d93a9e8aab3f82b6742dd034a6a81d4025cd82e [3035/6048] drivers/soc/litex: move generic accessors to litex.h
config: sh-randconfig-r025-20210125 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0

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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9d93a9e8aab3f82b6742dd034a6a81d4025cd82e
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 9d93a9e8aab3f82b6742dd034a6a81d4025cd82e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh

Quoted 6 lines

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

sh4-linux-nm: 'drivers/soc/litex/litex_soc_ctrl.o': No such file

This file exists and required are also enabled.

Quoted 4 lines

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

#2 lore raw
Quoted 16 lines · Souptick Joarder
Quoted 15 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
commit: 9d93a9e8aab3f82b6742dd034a6a81d4025cd82e [3035/6048] drivers/soc/litex: move generic accessors to litex.h
config: sh-randconfig-r025-20210125 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0

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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9d93a9e8aab3f82b6742dd034a6a81d4025cd82e
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 9d93a9e8aab3f82b6742dd034a6a81d4025cd82e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh

Quoted 7 lines
Quoted 6 lines

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

sh4-linux-nm: 'drivers/soc/litex/litex_soc_ctrl.o': No such file

This file exists and required are also enabled.

Hi Souptick,

The issue is related to ARCH sh if ftrace enabled in kconfig file:

$ make CROSS_COMPILE=sh4-linux- ARCH=sh M=drivers/soc/litex
   CC [M]  drivers/soc/litex/litex_soc_ctrl.o
sh4-linux-objcopy: Unable to change endianness of input file(s)
sh4-linux-ld: cannot find drivers/soc/litex/.tmp_gl_litex_soc_ctrl.o: No 
such file or directory
sh4-linux-objcopy: 'drivers/soc/litex/.tmp_mx_litex_soc_ctrl.o': No such 
file
rm: cannot remove 'drivers/soc/litex/.tmp_gl_litex_soc_ctrl.o': No such 
file or directory
rm: cannot remove 'drivers/soc/litex/.tmp_mx_litex_soc_ctrl.o': No such 
file or directory
sh4-linux-nm: 'drivers/soc/litex/litex_soc_ctrl.o': No such file
WARNING: Symbol version dump "Module.symvers" is missing.
          Modules may not have dependencies or modversions.
   MODPOST drivers/soc/litex/Module.symvers
drivers/soc/litex/litex_soc_ctrl.o: No such file or directory
make[1]: *** [scripts/Makefile.modpost:111: 
drivers/soc/litex/Module.symvers] Error 1
make: *** [Makefile:1709: modules] Error 2

and the below change can fix it.

scripts/recordmcount.pl +5 -1
index 56c801502b9a..867860ea57da 100755
@@ -265,7 +265,11 @@ if ($arch eq "x86_64") {
 
      # force flags for this arch
      $ld .= " -m shlelf_linux";
-    $objcopy .= " -O elf32-sh-linux";
+    if ($endian eq "big") {
+        $objcopy .= " -O elf32-shbig-linux";
+    } else {
+        $objcopy .= " -O elf32-sh-linux";
+    }
 
  } elsif ($arch eq "powerpc") {
      my $ldemulation;

Best Regards,
Rong Chen

#3 lore raw

PATCH 1/1 scripts/recordmcount.pl: support big endian for ARCH sh

In reply to kernel test robot

The kernel test robot reported the following issue:
CC [M] drivers/soc/litex/litex_soc_ctrl.o
sh4-linux-objcopy: Unable to change endianness of input file(s)
sh4-linux-ld: cannot find drivers/soc/litex/.tmp_gl_litex_soc_ctrl.o: No such file or directory
sh4-linux-objcopy: 'drivers/soc/litex/.tmp_mx_litex_soc_ctrl.o': No such file

The problem is that the format of input file is elf32-shbig-linux, but sh4-linux-objcopy wants to output a file which format is elf32-sh-linux:

  $ sh4-linux-objdump -d drivers/soc/litex/litex_soc_ctrl.o | grep format
  drivers/soc/litex/litex_soc_ctrl.o:     file format elf32-shbig-linux
---
 scripts/recordmcount.pl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/recordmcount.pl +5 -1
index 56c801502b9a..867860ea57da 100755
@@ -265,7 +265,11 @@ if ($arch eq "x86_64") {
 
     # force flags for this arch
     $ld .= " -m shlelf_linux";
-    $objcopy .= " -O elf32-sh-linux";
+    if ($endian eq "big") {
+        $objcopy .= " -O elf32-shbig-linux";
+    } else {
+        $objcopy .= " -O elf32-sh-linux";
+    }
 
 } elsif ($arch eq "powerpc") {
     my $ldemulation;
Signature · 1 line
2.20.1