当前位置: 技术问答>linux和unix
模块编译出警告,insmod不能
来源: 互联网 发布时间:2016-09-12
本文导语: 编译模块时,就出来如下警告,但生成了.ko文件了 “…… Building modules, stage 2. MODPOST 1 modules WARNING: "__aeabi_d2iz" [/home/toy/test/camera/camera.ko] undefined! WARNING: "__aeabi_dadd" [/home/toy/test/camera/camera.ko] undefined! WARNING: ...
编译模块时,就出来如下警告,但生成了.ko文件了
“……
Building modules, stage 2.
MODPOST 1 modules
WARNING: "__aeabi_d2iz" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_dadd" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_f2d" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_fdiv" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_i2f" [/home/toy/test/camera/camera.ko] undefined!
……”
拿到板子上去insmod camera.ko,显示如下:
“
/module # insmod camera.ko
camera: Unknown symbol __aeabi_i2f
camera: Unknown symbol __aeabi_dadd
camera: Unknown symbol __aeabi_fdiv
camera: Unknown symbol __aeabi_d2iz
camera: Unknown symbol __aeabi_f2d
insmod: init_module 'camera.ko' failed (No such file or directory)
”
请问这些符号是怎么回事?怎么解决呢?谢谢
“……
Building modules, stage 2.
MODPOST 1 modules
WARNING: "__aeabi_d2iz" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_dadd" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_f2d" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_fdiv" [/home/toy/test/camera/camera.ko] undefined!
WARNING: "__aeabi_i2f" [/home/toy/test/camera/camera.ko] undefined!
……”
拿到板子上去insmod camera.ko,显示如下:
“
/module # insmod camera.ko
camera: Unknown symbol __aeabi_i2f
camera: Unknown symbol __aeabi_dadd
camera: Unknown symbol __aeabi_fdiv
camera: Unknown symbol __aeabi_d2iz
camera: Unknown symbol __aeabi_f2d
insmod: init_module 'camera.ko' failed (No such file or directory)
”
请问这些符号是怎么回事?怎么解决呢?谢谢
|
我搜到这么一段,可以参考一下
3.2 Standardized compiler helper functions
A helper function might also implement an operation not implemented by
the underlying hardware, for example, integer division, floating-point
arithmetic, or reading and writing misaligned data.
4.1.2 The floating-point helper functions
float __aeabi_fadd(float, float)
float __aeabi_fdiv(float n, float d)
float __aeabi_fmul(float, float)
4.3.1 Integer (32/32 ? 32) division functions
int __aeabi_idiv(int numerator, int denominator);
The compiler assumes a helper function is available and the linker
locates it for inclusion in your binary. For example, if your code
divides using integers at runtime, the linker must include
"__aeabi_idiv" from libgcc.
Without linking libgcc, the older release of Code Sourcery produced a
cryptic error:
arm-none-eabi-ld: internal error
/scratch/paul/lite/obj/binutils-src-2007q1-21-arm-none-eabi-i686-pc-linux-gnu/ld/ldlang.c
4295
The current release of Code Sourcery produces a more readable error:
undefined reference to '__aeabi_idiv'
CodeSourcery GNU Linker documentation (see start menu) describes link libraries.
Fix: these makefile modifications provide the location of libgcc to the linker:
+ LSEARCH = "C:Program FilesCodeSourcerySourcery G++
Litelibgccarm-none-eabi4.2.1thumb"
! @$(LD) -T $(MEMMAP).ld -o $(PRJNAME).out $(OBJS) -lgcc -L$(LSEARCH)
3.2 Standardized compiler helper functions
A helper function might also implement an operation not implemented by
the underlying hardware, for example, integer division, floating-point
arithmetic, or reading and writing misaligned data.
4.1.2 The floating-point helper functions
float __aeabi_fadd(float, float)
float __aeabi_fdiv(float n, float d)
float __aeabi_fmul(float, float)
4.3.1 Integer (32/32 ? 32) division functions
int __aeabi_idiv(int numerator, int denominator);
The compiler assumes a helper function is available and the linker
locates it for inclusion in your binary. For example, if your code
divides using integers at runtime, the linker must include
"__aeabi_idiv" from libgcc.
Without linking libgcc, the older release of Code Sourcery produced a
cryptic error:
arm-none-eabi-ld: internal error
/scratch/paul/lite/obj/binutils-src-2007q1-21-arm-none-eabi-i686-pc-linux-gnu/ld/ldlang.c
4295
The current release of Code Sourcery produces a more readable error:
undefined reference to '__aeabi_idiv'
CodeSourcery GNU Linker documentation (see start menu) describes link libraries.
Fix: these makefile modifications provide the location of libgcc to the linker:
+ LSEARCH = "C:Program FilesCodeSourcerySourcery G++
Litelibgccarm-none-eabi4.2.1thumb"
! @$(LD) -T $(MEMMAP).ld -o $(PRJNAME).out $(OBJS) -lgcc -L$(LSEARCH)
|
这个模块依赖的一些东西没有编进内核。有可能是其他的一些模块。
|
内核版本不一致 这些数据结构在你目前的内核估计已经被修改掉了或者不再导出
尝试直接编译进内核,报错的话就说明这些数据结构真得不在了
尝试直接编译进内核,报错的话就说明这些数据结构真得不在了