Skip to contentSkip to conversation

parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined!

DISCUSSION Meelis Roos 3 participants 5 messages Feb 13, 2018 – Feb 14, 2018

lore
Share & tools
lore
#0 lore raw

I am compiling todays git on HP A500 (Gentoo) and it fails with this error. Strange thing is that it did work on RP3410 and RP3440 - I may have different kernel configuration there but Gentoo state is roughly the same (maybe days apart but not months).

MODPOST 9 modules
ERROR: "$$remU" [drivers/net/tun.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1

Signature · 1 line
Meelis Roos ([email protected])
#1 lore raw
Quoted 3 lines · Meelis Roos

MODPOST 9 modules
ERROR: "$$remU" [drivers/net/tun.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1

I believe $$remU comes from the millicode library milli.a.  It is bundled with compiler. Try adding V=1 to the make command so you can see the gcc command for the above.

Dave

Signature · 1 line
John David Anglin  [email protected]
#2 lore raw
Quoted 8 lines · Meelis Roos
Quoted 3 lines

MODPOST 9 modules
ERROR: "$$remU" [drivers/net/tun.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1

I believe $$remU comes from the millicode library milli.a.  It is bundled with compiler.
Try adding V=1 to the make command so you can see the gcc command for the above.

The command is modpost:

find .tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -o ./Module.symvers -S -s -T -
ERROR: "$$remU" [drivers/net/tun.ko] undefined!

hppa64-linux-objdump --disassemble drivers/net/tun.ko and
hppa64-linux-nm drivers/net/tun.ko
do not show any sign of the $$remU.

mroos@a500 ~/linux $ fgrep -r '$$remU' arch/parisc/ arch/parisc/kernel/parisc_ksyms.c:extern void $$remU(void); arch/parisc/kernel/parisc_ksyms.c:EXPORT_SYMBOL($$remU);

It's in /usr/lib/gcc/hppa64-unknown-linux-gnu/5.4.0/libgcc.a

CONFIG_CROSS_COMPILE="hppa64-linux-" - maybe modpost gets this wrong somehow?

mroos@a500 ~/linux $ file scripts/mod/modpost
scripts/mod/modpost: ELF 32-bit MSB executable, PA-RISC, *unknown arch 0xf* version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, not stripped

This is strange, *unknown arch 0xf* ?? This hould be native binary... yes, all my binaries under /bin have this arch, so my toolchain is broken is some funny way...

Signature · 1 line
Meelis Roos ([email protected])
#3 lore raw
Quoted 14 lines · Meelis Roos
Quoted 8 lines · Meelis Roos
Quoted 3 lines

MODPOST 9 modules
ERROR: "$$remU" [drivers/net/tun.ko] undefined! make[1]: *** [scripts/Makefile.modpost:92: __modpost] Error 1

I believe $$remU comes from the millicode library milli.a.  It is bundled with compiler.
Try adding V=1 to the make command so you can see the gcc command for the above.

The command is modpost:

find .tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -o ./Module.symvers -S -s -T -
ERROR: "$$remU" [drivers/net/tun.ko] undefined!

Quoted 8 lines

hppa64-linux-objdump --disassemble drivers/net/tun.ko and
hppa64-linux-nm drivers/net/tun.ko
do not show any sign of the $$remU.

mroos@a500 ~/linux $ fgrep -r '$$remU' arch/parisc/ arch/parisc/kernel/parisc_ksyms.c:extern void $$remU(void); arch/parisc/kernel/parisc_ksyms.c:EXPORT_SYMBOL($$remU);

Yes, that's correct.
The linux kernel executable should link in libgcc.a, thus include the $$remU symbol (from libgcc.a) and then be able to export it to linux kernel modules if necessary.

Quoted 1 line

It's in /usr/lib/gcc/hppa64-unknown-linux-gnu/5.4.0/libgcc.a

Yes, it should be in some libgcc.a file which is linked into the kernel. For me:

root@phantom:/usr/lib# hppa64-linux-gnu-objdump -x ./gcc/hppa64-linux-gnu/4.9/libgcc.a | grep remU | grep text
0000000000000000 g       .text  0000000000000144 .hidden $$remU
Quoted 2 lines

CONFIG_CROSS_COMPILE="hppa64-linux-" - maybe modpost gets this wrong somehow?

It says for you:

Quoted 1 line

ERROR: "$$remU" [drivers/net/tun.ko] undefined!

I would be astonished if $$remU hasn't been included in your kernel executable.

Quoted 6 lines

mroos@a500 ~/linux $ file scripts/mod/modpost
scripts/mod/modpost: ELF 32-bit MSB executable, PA-RISC, *unknown arch 0xf* version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 3.2.0, not stripped

This is strange, *unknown arch 0xf* ?? This hould be native binary... yes, all my binaries under /bin have this arch, so my toolchain is broken is some funny way...

That's normal and not related to your $$remU problem.

Helge

#4 lore raw
In reply to John David Anglin

Since the error was strange, I ran "make clean" and make and the error was gone. So something in the build system might have missed a recompilation need (maybe) but my problem is gone. The new kernel is running fine.

Signature · 1 line
Meelis Roos ([email protected])