current_thread_info_reg undefined
Todays 2.6.13-rc6+git tree has broken many modules with warning like this on sparc64:
*** Warning: "current_thread_info_reg" [drivers/net/ppp_deflate.ko] undefined!
These warnings don't go away after make clean.
Signature · 1 line
Meelis Roos ([email protected])
From: Meelis Roos <[email protected]>
Date: Thu, 18 Aug 2005 14:50:31 +0300 (EEST)
Quoted 5 lines
Todays 2.6.13-rc6+git tree has broken many modules with warning like this on sparc64:
*** Warning: "current_thread_info_reg" [drivers/net/ppp_deflate.ko] undefined!These warnings don't go away after make clean.
What does the compiler spit out when drivers/net/ppp_deflate.o is being built?
It is declared in include/asm-sparc64/thread_info.h quite plainly:
register struct thread_info *current_thread_info_reg asm("g6");
I've seen this before, but I have no idea why it keeps coming up or what causes it as I've never triggered it myself.
Perhaps it's toolchain dependent, thus some binutils or gcc bug.
Quoted 2 lines
What does the compiler spit out when
drivers/net/ppp_deflate.ois being built?
I removed the file and reran make. gcc does not say anything and the later warning stay.
The warnings are actually longer (were before too):
*** Warning: "" [drivers/net/ppp_deflate.ko] undefined!
*** Warning: "" [drivers/net/ppp_deflate.ko] undefined!
*** Warning: "" [drivers/net/ppp_deflate.ko] undefined!
*** Warning: "current_thread_info_reg" [drivers/net/ppp_deflate.ko] undefined!
make V=1 just shows
gcc -Wp,-MD,drivers/net/.ppp_deflate.o.d -nostdinc -isystem/usr/lib/gcc/sparc-linux-gnu/4.0.2/include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-ffreestanding -O2 -fomit-frame-pointer -m64 -pipe -mno-fpu
-mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -finline-limit0000
-Wdeclaration-after-statement -Wno-pointer-sign -DMODULE
-DKBUILD_BASENAME=ppp_deflate -DKBUILD_MODNAME=ppp_deflate -c -o drivers/net/ppp_deflate.o drivers/net/ppp_deflate.c
Quoted 2 lines
Perhaps it's toolchain dependent, thus some binutils or gcc bug.
This host is running up to date Debian unstable so it might easily be buggy:
gcc-4.0 4.0.1-4
gcc -v tells it's gcc version 4.0.2 20050806 (prerelease) (Debian 4.0.1-4)
binutils 2.16.1-2
ld -v tells GNU ld version 2.16.1 Debian GNU/Linux
Signature · 1 line
Meelis Roos ([email protected])
Quoted 5 lines
The warnings are actually longer (were before too):
*** Warning: "" [drivers/net/ppp_deflate.ko] undefined!
*** Warning: "" [drivers/net/ppp_deflate.ko] undefined!
*** Warning: "" [drivers/net/ppp_deflate.ko] undefined!
*** Warning: "current_thread_info_reg" [drivers/net/ppp_deflate.ko] undefined!
The empty symbol warnings atleast are just a bug with scripts/mod/modpost.c (the patch fabbione sent you awhile back Dave, for STT_SPARC_REGISTER changes in glibc's elf.h).
I think the current_thread_info_reg went away with that patch aswell. If it didn't, I have a fix for that one aswell.
Signature · 4 lines
Ubuntu - http://www.ubuntu.com/ Debian - http://www.debian.org/ Linux 1394 - http://www.linux1394.org/ SwissDisk - http://www.swissdisk.com/
Quoted 3 lines
The empty symbol warnings atleast are just a bug with
scripts/mod/modpost.c(the patch fabbione sent you awhile back Dave, forSTT_SPARC_REGISTERchanges in glibc'self.h).
Yes, the modules in question (at least some I tried) load fine.
Signature · 1 line
Meelis Roos ([email protected])
Quoted 7 lines · David S. Miller
From: Ben Collins <[email protected]>
Date: Fri, 19 Aug 2005 04:31:29 -0700Quoted 4 lines
The empty symbol warnings atleast are just a bug with
scripts/mod/modpost.c(the patch fabbione sent you awhile back Dave, forSTT_SPARC_REGISTERchanges in glibc'self.h).
Quoted 5 lines
Quoted 2 lines
I think the
current_thread_info_regwent away with that patch aswell. If it didn't, I have a fix for that one aswell.That fix should be in current 2.6.x... Oh I see, it's still checking just
STT_REGISTER. Ben, can you resend that patch to me?
scripts/mod/modpost.c +7 -2
@@ -359,11 +359,16 @@/* ignore __this_module, it will be resolved shortly */ if (strcmp (symname,MODULE_SYMBOL_PREFIX "__this_module" ) =0 )break ; -#ifdef STT_REGISTER +/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ +#if defined(STT_REGISTER ) || defined(STT_SPARC_REGISTER ) +/* add compatibility with older glibc */ +#ifndef STT_SPARC_REGISTER +#define STT_SPARC_REGISTER STT_REGISTER +#endif if (info->hdr->e_machine =EM_SPARC || info->hdr->e_machine =EM_SPARCV9 ) {/* Ignore register directives. */ -if (ELF_ST_TYPE (sym->st_info) =STT_REGISTER ) +if (ELF_ST_TYPE (sym->st_info) =STT_SPARC_REGISTER )break ; }#endif
Signature · 4 lines
Ubuntu - http://www.ubuntu.com/ Debian - http://www.debian.org/ Linux 1394 - http://www.linux1394.org/ SwissDisk - http://www.swissdisk.com/
From: Ben Collins <[email protected]>
Date: Fri, 19 Aug 2005 04:31:29 -0700
Quoted 6 lines
The empty symbol warnings atleast are just a bug with
scripts/mod/modpost.c(the patch fabbione sent you awhile back Dave, forSTT_SPARC_REGISTERchanges in glibc'self.h).I think the
current_thread_info_regwent away with that patch aswell. If it didn't, I have a fix for that one aswell.
That fix should be in current 2.6.x... Oh I see, it's still checking just STT_REGISTER. Ben, can you resend that patch to me?
Thanks a lot Ben, I'll push this off to Linus.