RE: Problems in compiling a hello world module under 2.6.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,
I compiled a hello_world kernel module sample under
2.6.x and failed to load the module.
I am using gcc 3.4.2.
$insmod hello.o
insmod: error inserting 'hello.o': -1 Invalid module
format
$strace insmod hello.o
(...)
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
\177u\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1512400,
...}) = 0
old_mmap(0x743000, 1207532, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x743000
old_mmap(0x864000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x120000) =
0x864000
old_mmap(0x868000, 7404, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x868000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6fde000
mprotect(0x864000, 8192, PROT_READ)     = 0
mprotect(0x73b000, 4096, PROT_READ)     = 0
set_thread_area({entry_number:-1 -> 6,
base_addr:0xf6fde940, limit:1048575, seg_32bit:1,
contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
munmap(0xf6fdf000, 131481)              = 0
brk(0)                                  = 0x9702000
brk(0x9723000)                          = 0x9723000
open("hello.o", O_RDONLY)               = 3
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"...,
16384) = 976
read(3, "", 15408)                      = 0
close(3)                                = 0
init_module("ELF", 0x3d0)           = -1 ENOEXEC (Exec
format error)
write(2, "insmod: error inserting \'hello.o"...,
60insmod: error inserting 'hello.o': -1 Invalid module
format
) = 60
exit_group(1)                           = ?

Does any one got it work under 2.6.x ? (it works under
2.4.x).
Any idea for creating .ko rather than .o?

Thanks,
--Narjess.

--- Fábio Mendonça Albuquerque Cunha
<fmacunha@xxxxxxxxxxxxxxxxx> a écrit :

> Hello,
> I use RH 9.0 (Shrike), with Adaptec 19160 Ultra 160
> and Sony AIT-2 to do my backups. Everything was
> fine, but yesterday I have to restore a file and I
> can´t.
> 
> I can see what I have inside my tape, using 
> 
> #tar -tvf /dev/st0 
> 
> but when I try to extract my backup using 
> 
> #tar -xvf /dev/st0
> somedirectory/somesubdirectory/myfile 
> 
> I get this error messages from my /var/log/messages
> 90 minutes later I typed the command : 
> 
> Jul 14 11:27:53 servarq kernel: (scsi0:A:0:0):
> Unexpected busfree in Data-in phase
> Jul 14 11:27:53 servarq kernel: SEQADDR == 0x8c
> Jul 14 11:27:53 servarq kernel: st0: Error 70000
> (sugg. bt 0x0, driver bt 0x0, host bt 0x7).
> Jul 14 11:27:53 servarq kernel: st0: Error 10000
> (sugg. bt 0x0, driver bt 0x0, host bt 0x1).
> Jul 14 11:27:56 servarq last message repeated 9
> times
> Jul 14 11:27:56 servarq kernel: st0: Error with
> sense data: Info fld=0x40, Current st09:00: sense
> key Unit Attention
> Jul 14 11:27:56 servarq kernel: Additional sense
> indicates Power on,reset,or bus device reset
> occurred
> Jul 14 11:27:56 servarq kernel: st0: Error with
> sense data: Current st09:00: sense key Not Ready
> Jul 14 11:27:56 servarq kernel: Additional sense
> indicates Medium not present
> 
> I am completely lost ... Somebody could help me or
> simply give an idea on what is happening ????
> 
> Regards.
> 
> InfraNet Tecnologia
> Fábio M. A. Cunha
> (55 11) 5542-0941 ramal 22
> (55 11) 8456-5283
> www.infranetsp.com.br
> www.fsf.org
> 
> -- 
> Shrike-list mailing list
> Shrike-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/shrike-list
> 



	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux