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

Re: Kernel module complying and unresolved symbol(s)



V tor, 21.09.2004 ob 05:29 je Hans-Peter Nilsson napisal(a):
> Because the kernel doesn't use floating-point, it doesn't have
> and doesn't export that symbol.
> 
> Does RTAI really use need to use floating-point arithmetic, or
> is there a bug in the module you compile?  A missing cast
> somewhere or something not constant?
Sadly, it does need FP. 

>  That last line should have been something like (untested):
> cris-axis-linux-gnu-gcc --nostdlib -static -Wl,--whole-archive liblatency_rt.a -Wl,--no-whole-archive -lgcc -r -o latency_rt.o
> 
>  For education only, that should be roughly equivalent to (also untested):
> cris-ld -mcrislinux --whole-archive liblatency_rt.a --no-whole-archive `cris-axis-linux-gnu-gcc --print-libgcc-file-name` -r -o latency_rt.o

If I use the first line (calling the linker through gcc) I get a module
which has size of 5.2M (unstrip) and has everything compiled in. It
loads in to the kernel and dose nothing. 

In the second case I get a module which is much smaller but it will not
load in to the kernel. (The errors are in errror.txt) When I compare the
nm output of the complied (look at nm-com.txt) and of the linked module
(look at nm-lnk.txt) I can see that linker put the missing functions in
to the module and this missing functions are the ones about which the
insmod complains.

So I think that resolution to this problem would probably be to have
some kind of FP emulation in the kernel. Any ideas?

	Regards Simon

/var # insmod latency_rt.o
Using latency_rt.o
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __gedf2
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __adddf3
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __fixdfsi
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __fixdfsi
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 14
insmod: Unhandled relocation of type 14 for __clz_tab
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 14
insmod: Unhandled relocation of type 14 for __clz_tab
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 14
insmod: Unhandled relocation of type 14 for __clz_tab
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Umod
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __Udiv
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 14
insmod: Unhandled relocation of type 14 for __thenan_df
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __negdi2
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 18
insmod: Unhandled relocation of type 18 for __unpack_d
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __pack_d
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 18
insmod: Unhandled relocation of type 18 for __unpack_d
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __pack_d
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 18
insmod: Unhandled relocation of type 18 for __unpack_d
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __fpcmp_parts_d
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __unpack_d
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __lshrdi3
Warning: unhandled reloc 17
insmod: Unhandled relocation of type 17 for
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __ashldi3
Warning: unhandled reloc 16
insmod: Unhandled relocation of type 16 for __lshrdi3

         U __Div
         U __fixunsdfsi
00000442 t __latency_exit
000002f0 t __latency_init
00000058 R __module_author
00000028 R __module_description
00000000 r __module_kernel_version
0000001c r __module_license
00000154 R __module_parm_avrgtime
00000164 R __module_parm_desc_avrgtime
000000c4 R __module_parm_desc_overall
00000124 R __module_parm_desc_period
00000214 R __module_parm_desc_start_timer
0000027c R __module_parm_desc_timer_mode
000001c4 R __module_parm_desc_use_fpu
000000b4 R __module_parm_overall
00000114 R __module_parm_period
00000200 R __module_parm_start_timer
00000268 R __module_parm_timer_mode
000001b4 R __module_parm_use_fpu
         U __udivdi3
00000008 D avrgtime
00000442 T cleanup_module
         U count2nano
00000004 b cpu_used
         U create_proc_entry
00000218 D dotres
000001f8 D expected
000001cc T fun
000002f0 T init_module
00000000 b loops
         U nano2count
00000000 D overall
00000004 D period
00000200 D period_counts
         U printk
00000000 t proc_read
         U remove_proc_entry
         U rt_get_cpu_time_ns
         U rt_get_time
         U rt_linux_use_fpu
         U rt_printk
         U rt_set_oneshot_mode
         U rt_set_periodic_mode
         U rt_set_runnable_on_cpus
         U rt_task_delete
         U rt_task_init
         U rt_task_make_periodic
         U rt_task_wait_period
         U rtf_create
         U rtf_destroy
         U rtf_put
00000204 D samp
         U sprintf
         U start_rt_timer
00000010 D start_timer
         U stop_rt_timer
00000020 D thread
00000014 D timer_mode
0000000c D use_fpu

00001048 T __Div
00000ed8 T __Udiv
000011c4 T __Umod
00000d06 T __adddf3
00001708 T __ashldi3
00000014 R __clz_tab
00000e4c T __fixdfsi
000004c0 T __fixunsdfsi
00001650 T __fpcmp_parts_d
00000dec T __gedf2
00000442 t __latency_exit
000002f0 t __latency_init
00001350 T __lshrdi3
00000058 R __module_author
00000028 R __module_description
00000000 r __module_kernel_version
0000001c r __module_license
00000154 R __module_parm_avrgtime
00000164 R __module_parm_desc_avrgtime
000000c4 R __module_parm_desc_overall
00000124 R __module_parm_desc_period
00000214 R __module_parm_desc_start_timer
0000027c R __module_parm_desc_timer_mode
000001c4 R __module_parm_desc_use_fpu
000000b4 R __module_parm_overall
00000114 R __module_parm_period
00000200 R __module_parm_start_timer
00000268 R __module_parm_timer_mode
000001b4 R __module_parm_use_fpu
00001324 T __negdi2
000013a4 T __pack_d
00000d72 T __subdf3
00000000 R __thenan_df
00000520 T __udivdi3
00000544 t __udivmoddi4
00001564 T __unpack_d
00000aa0 t _fpadd_parts
00000008 D avrgtime
00000442 T cleanup_module
         U count2nano
00000004 b cpu_used
         U create_proc_entry
00000218 D dotres
000001f8 D expected
000001cc T fun
000002f0 T init_module
00000000 b loops
         U nano2count
00000000 D overall
00000004 D period
00000200 D period_counts
         U printk
00000000 t proc_read
         U remove_proc_entry
         U rt_get_cpu_time_ns
         U rt_get_time
         U rt_linux_use_fpu
         U rt_printk
         U rt_set_oneshot_mode
         U rt_set_periodic_mode
         U rt_set_runnable_on_cpus
         U rt_task_delete
         U rt_task_init
         U rt_task_make_periodic
         U rt_task_wait_period
         U rtf_create
         U rtf_destroy
         U rtf_put
00000204 D samp
         U sprintf
         U start_rt_timer
00000010 D start_timer
         U stop_rt_timer
00000020 D thread
00000014 D timer_mode
0000000c D use_fpu