Linux PARISC architecture development
 help / color / mirror / Atom feed
* parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined!
@ 2018-02-13 13:55 Meelis Roos
  2018-02-13 19:31 ` John David Anglin
  0 siblings, 1 reply; 5+ messages in thread
From: Meelis Roos @ 2018-02-13 13:55 UTC (permalink / raw)
  To: linux-parisc

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


-- 
Meelis Roos (mroos@linux.ee)

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

* Re: parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined!
  2018-02-13 13:55 parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined! Meelis Roos
@ 2018-02-13 19:31 ` John David Anglin
  2018-02-13 19:55   ` Meelis Roos
  2018-02-14 14:20   ` Meelis Roos
  0 siblings, 2 replies; 5+ messages in thread
From: John David Anglin @ 2018-02-13 19:31 UTC (permalink / raw)
  To: Meelis Roos, linux-parisc

On 2018-02-13 8:55 AM, Meelis Roos wrote:
>    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

-- 
John David Anglin  dave.anglin@bell.net


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

* Re: parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined!
  2018-02-13 19:31 ` John David Anglin
@ 2018-02-13 19:55   ` Meelis Roos
  2018-02-13 20:18     ` Helge Deller
  2018-02-14 14:20   ` Meelis Roos
  1 sibling, 1 reply; 5+ messages in thread
From: Meelis Roos @ 2018-02-13 19:55 UTC (permalink / raw)
  To: John David Anglin; +Cc: linux-parisc

> On 2018-02-13 8:55 AM, Meelis Roos wrote:
> >    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...

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined!
  2018-02-13 19:55   ` Meelis Roos
@ 2018-02-13 20:18     ` Helge Deller
  0 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2018-02-13 20:18 UTC (permalink / raw)
  To: Meelis Roos, John David Anglin; +Cc: linux-parisc

On 13.02.2018 20:55, Meelis Roos wrote:
>> On 2018-02-13 8:55 AM, Meelis Roos wrote:
>>>    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);

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. 
 
> 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


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

It says for you:
> ERROR: "$$remU" [drivers/net/tun.ko] undefined!

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

> 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

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

* Re: parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined!
  2018-02-13 19:31 ` John David Anglin
  2018-02-13 19:55   ` Meelis Roos
@ 2018-02-14 14:20   ` Meelis Roos
  1 sibling, 0 replies; 5+ messages in thread
From: Meelis Roos @ 2018-02-14 14:20 UTC (permalink / raw)
  To: John David Anglin; +Cc: linux-parisc

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.

-- 
Meelis Roos (mroos@linux.ee)

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

end of thread, other threads:[~2018-02-14 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13 13:55 parisc 4.16-rc1 error: ERROR: "$$remU" [drivers/net/tun.ko] undefined! Meelis Roos
2018-02-13 19:31 ` John David Anglin
2018-02-13 19:55   ` Meelis Roos
2018-02-13 20:18     ` Helge Deller
2018-02-14 14:20   ` Meelis Roos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox