Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 85094

Summary: nvidia-kernel 7167 module does not work when compiled with GCC 4.0
Product: Gentoo Linux Reporter: Roel Brook <Rainmaker526>
Component: [OLD] GCC PortingAssignee: Please assign to toolchain <gcc-porting>
Status: RESOLVED INVALID    
Severity: normal CC: lejban, Rainmaker526
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: The kernel moudles binairy (bzip2'd)

Description Roel Brook 2005-03-13 07:58:36 UTC
When compiling nvidia-kernel 1.0.7167(-r1) with gcc 4.0, the module does not work. There are no compile errors, but when trying to modporbe the module, it says "invalid module format". When compiled with gcc 3.4.3, the module works fine.

The strace log from modprobing the nvidia module (not sure if this is helpful):

execve("/sbin/modprobe", ["modprobe", "-vvv", "nvidia"], [/* 64 vars */]) = 0
uname({sys="Linux", node="Medusa", ...}) = 0
brk(0)                                  = 0x805c000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=173102, ...}) = 0
mmap2(NULL, 173102, PROT_READ, MAP_PRIVATE, 3, 0) = 0xa7fbf000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340P\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1315248, ...}) = 0
mmap2(NULL, 1227996, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xa7e93000
mprotect(0xa7fb8000, 27868, PROT_NONE)  = 0
mmap2(0xa7fb9000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x125) = 0xa7fb9000
mmap2(0xa7fbd000, 7388, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xa7fbd000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e92000
mprotect(0xa7fb9000, 4096, PROT_READ)   = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xa7e92aa0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xa7fbf000, 173102)              = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "W\364P`", 4)                   = 4
close(3)                                = 0
create_module(0, 0)                     = -1 ENOSYS (Function not implemented)
uname({sys="Linux", node="Medusa", ...}) = 0
brk(0)                                  = 0x805c000
brk(0x807d000)                          = 0x807d000
fstat64(2, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 2), ...}) = 0
open("/etc/modprobe.conf", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open("/etc/modprobe.conf", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=5901, ...}) = 0
mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7fda000
read(3, "### This file is automatically g"..., 65536) = 5901
read(3, "", 65536)                      = 0
close(3)                                = 0
munmap(0xa7fda000, 65536)               = 0
open("/lib/modules/2.6.11-love1/modules.dep", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=9462, ...}) = 0
mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7fda000
read(3, "/lib/modules/2.6.11-love1/video/"..., 65536) = 9462
close(3)                                = 0
munmap(0xa7fda000, 65536)               = 0
open("/lib/modules/2.6.11-love1/video/nvidia.ko", O_RDWR) = 3
fcntl64(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
open("/proc/modules", O_RDONLY)         = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7fe9000
read(4, "nfs 82216 2 - Live 0xf0d83000\nlo"..., 1024) = 108
read(4, "", 1024)                       = 0
close(4)                                = 0
munmap(0xa7fe9000, 4096)                = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFREG|0644, st_size=4402787, ...}) = 0
mmap2(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7fda000
_llseek(3, 0, [0], SEEK_CUR)            = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\1\0\3\0\1\0\0\0\0\0\0\0"..., 65536) = 65536
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e71000
read(3, "1\311;Nts\22\213E\370\213Vx\213\24\212\211\24\210A;Ntr"..., 65536) = 65536
mremap(0xa7e71000, 135168, 266240, MREMAP_MAYMOVE) = 0xa7e30000
read(3, "\202\0\0Pj\2R\213B\30\377\320\211E\374\203\304\374j\0j"..., 131072) = 131072
mremap(0xa7e30000, 266240, 528384, MREMAP_MAYMOVE) = 0xa7daf000
read(3, "\203\304\370\213E\20P\213U\310R\350\374\377\377\377\203"..., 262144) = 262144
mremap(0xa7daf000, 528384, 1052672, MREMAP_MAYMOVE) = 0xa7cae000
read(3, "\364\213M\10Q\350\374\377\377\377\203\304\0209\307r\242"..., 524288) = 524288
mremap(0xa7cae000, 1052672, 2101248, MREMAP_MAYMOVE) = 0xa7aad000
read(3, "\260\0\0\0WV\213\206\4\1\0\0\377\320\203\304\20\205\300"..., 1048576) = 1048576
mremap(0xa7aad000, 2101248, 4198400, MREMAP_MAYMOVE) = 0xa76ac000
read(3, "U\211\345\203\354 VS\213]\10\203\304\374j\0j\2S\213C\30"..., 2097152) = 2097152
mremap(0xa76ac000, 4198400, 8392704, MREMAP_MAYMOVE) = 0xa6eab000
read(3, ">\0\0\0\22\0\1\0\n\253\0\0\30\216\32\0\26\0\0\0\22\0\1"..., 4194304) = 208483
read(3, "", 3932160)                    = 0
read(3, "", 3932160)                    = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 2), ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7aac000
write(1, "insmod /lib/modules/2.6.11-love1"..., 109) = 109
init_module("ELF", 0x432e63)        = -1 ENOEXEC (Exec format error)
write(2, "FATAL: Error inserting nvidia (/"..., 97) = 97
munmap(0xa7aac000, 4096)                = 0
exit_group(1)                           = ?


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-4.0.0-beta20050305,
glibc-2.3.4.20050125-r0, 2.6.11-love1 i686)
=================================================================
System uname: 2.6.11-love1 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 00:46:55)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.5, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r6
sys-devel/libtool:   1.5.10-r5
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow
-mfpmath=sse,387 -ffast-math"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/fax /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/alias /var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow
-mfpmath=sse,387 -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks parallel-fetch sandbox
sfperms"GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://gd.tuwien.ac.at/opsys/linux/gentoo/
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="nl_NL@euro"
LC_ALL="nl_NL@euro"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow X aalib alsa apache2 apm arts audiofile avi bash-completion
bitmap-fonts bzlib calender cdparanoia cdr chroot crypt cups curl dba divx4linux
dvd dvdr dvdread emboss encode esd fam filepro flac font-server foomaticdb
fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 guile hal imagemagick
imlib insecure-drivers java jpeg jpeg2k junit kde ldap libg++ libwww live mad
mikmod mime mmx mono motif mozdevelop mozilla moznomail moznoxft mp3 mpeg
mplayer msn mysql ncurses network nls nptl nvidia odbc offensive oggvorbis
ooo-kde opengl pam pdflib perl php pic png postgres python qmail qt quicktime
readline real rplay samba scanner sdk sdl session sftplogging slang softmmu
speex spell sqlite sse ssl stroke svga tcltk tcpd threads tiff truetype
truetype-fonts type1-fonts usb userlocales v4l wmf xine xinerama xml xml2 xmms
xprint xscreensaver xv xvid zlib video_cards_nvidia linguas_nl"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS
Comment 1 Roel Brook 2005-03-13 08:01:02 UTC
Created attachment 53339 [details]
The kernel moudles binairy (bzip2'd)
Comment 2 SpanKY gentoo-dev 2005-03-14 08:54:16 UTC
what version of gcc did you build your kernel with ?

in other words, what does `cat /proc/version` display ?
Comment 3 Roel Brook 2005-03-14 12:25:28 UTC
That might actually be the problem :)

cat /proc/version                                            (~)
Linux version 2.6.11-love1 (root@Medusa) (gcc versie 3.4.3 20050110 (Gentoo Linux 3.4.3.20050110, ssp-3.4.3.20050110-0, pie-8.7.7)) #1 Sat Mar 5 03:02:50 CET 2005

I'll try recompiling my kernel with GCC 4
Comment 4 SpanKY gentoo-dev 2005-03-14 12:37:58 UTC
sounds good
Comment 5 Elfyn McBratney (beu) (RETIRED) gentoo-dev 2005-03-20 04:31:07 UTC
*** Bug 85995 has been marked as a duplicate of this bug. ***