* Re: current_thread_info_reg undefined
2005-08-18 11:50 current_thread_info_reg undefined Meelis Roos
@ 2005-08-18 18:34 ` David S. Miller
2005-08-18 20:09 ` Meelis Roos
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2005-08-18 18:34 UTC (permalink / raw)
To: sparclinux
From: Meelis Roos <mroos@linux.ee>
Date: Thu, 18 Aug 2005 14:50:31 +0300 (EEST)
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: current_thread_info_reg undefined
2005-08-18 11:50 current_thread_info_reg undefined Meelis Roos
2005-08-18 18:34 ` David S. Miller
@ 2005-08-18 20:09 ` Meelis Roos
2005-08-19 11:31 ` Ben Collins
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Meelis Roos @ 2005-08-18 20:09 UTC (permalink / raw)
To: sparclinux
> What does the compiler spit out when drivers/net/ppp_deflate.o
> is 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-limit\x100000
-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
> 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
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: current_thread_info_reg undefined
2005-08-18 11:50 current_thread_info_reg undefined Meelis Roos
2005-08-18 18:34 ` David S. Miller
2005-08-18 20:09 ` Meelis Roos
@ 2005-08-19 11:31 ` Ben Collins
2005-08-19 18:12 ` Meelis Roos
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Ben Collins @ 2005-08-19 11:31 UTC (permalink / raw)
To: sparclinux
> 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.
--
Ubuntu - http://www.ubuntu.com/
Debian - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
SwissDisk - http://www.swissdisk.com/
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: current_thread_info_reg undefined
2005-08-18 11:50 current_thread_info_reg undefined Meelis Roos
` (2 preceding siblings ...)
2005-08-19 11:31 ` Ben Collins
@ 2005-08-19 18:12 ` Meelis Roos
2005-08-19 19:27 ` Ben Collins
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Meelis Roos @ 2005-08-19 18:12 UTC (permalink / raw)
To: sparclinux
> 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).
Yes, the modules in question (at least some I tried) load fine.
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: current_thread_info_reg undefined
2005-08-18 11:50 current_thread_info_reg undefined Meelis Roos
` (3 preceding siblings ...)
2005-08-19 18:12 ` Meelis Roos
@ 2005-08-19 19:27 ` Ben Collins
2005-08-19 19:27 ` David S. Miller
2005-08-19 20:45 ` David S. Miller
6 siblings, 0 replies; 8+ messages in thread
From: Ben Collins @ 2005-08-19 19:27 UTC (permalink / raw)
To: sparclinux
On Fri, Aug 19, 2005 at 12:27:39PM -0700, David S. Miller wrote:
> From: Ben Collins <bcollins@debian.org>
> Date: Fri, 19 Aug 2005 04:31:29 -0700
>
> > 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.
>
> 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?
--- linux/scripts/mod/modpost.c 2005-06-17 21:48:29.000000000 +0200
+++ linux-source-2.6.12-2.6.12/scripts/mod/modpost.c 2005-06-30 09:29:54.000000000 +0200
@@ -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
--
Ubuntu - http://www.ubuntu.com/
Debian - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
SwissDisk - http://www.swissdisk.com/
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: current_thread_info_reg undefined
2005-08-18 11:50 current_thread_info_reg undefined Meelis Roos
` (4 preceding siblings ...)
2005-08-19 19:27 ` Ben Collins
@ 2005-08-19 19:27 ` David S. Miller
2005-08-19 20:45 ` David S. Miller
6 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2005-08-19 19:27 UTC (permalink / raw)
To: sparclinux
From: Ben Collins <bcollins@debian.org>
Date: Fri, 19 Aug 2005 04:31:29 -0700
> 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.
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?
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: current_thread_info_reg undefined
2005-08-18 11:50 current_thread_info_reg undefined Meelis Roos
` (5 preceding siblings ...)
2005-08-19 19:27 ` David S. Miller
@ 2005-08-19 20:45 ` David S. Miller
6 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2005-08-19 20:45 UTC (permalink / raw)
To: sparclinux
Thanks a lot Ben, I'll push this off to Linus.
^ permalink raw reply [flat|nested] 8+ messages in thread