mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
@ 2015-01-08 13:16 Hänel-Baas, Alexander
  2015-01-08 13:23 ` Marc Kleine-Budde
  0 siblings, 1 reply; 10+ messages in thread
From: Hänel-Baas, Alexander @ 2015-01-08 13:16 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 6754 bytes --]

Hi

i try to compile my own kernel module out-of-tree.
At compile time I get the warning: WARNING: "__aeabi_l2d" [my.ko] undefined.
And right I can't load the module -> Unknown symbol __aeabi_d2lz (err 0)

User space programs or other kernel modules are already compile and works well.

Background:
I have a project that was compiled under ptxdist 2012.12.1 for x86 target.
Now i changed the target from x86 to i.mx6 so I had changed the toolchain from OSELAS.Toolchain-2012.12.1 i586-unknown-linux-gnu
to OSELAS.Toolchain-2012.12.1 arm-cortexa9-linux-gnueabi.

After this change I clean and recompile the project and all compiled binarys and modules are ok.
Only this kernel module I can't compile.
I used float operation in this module... -> eabi???

My question are:
Can I use float operation in k-modules under arm?
And what is going wrong?

And here the detailed information:
Compile step
arm-cortexa9-linux-gnueabi-gcc -Wp,-MD,/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/.shmModule.o.d  -nostdinc -isystem /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa9-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-cortexa9-linux-gnueabi/4.7.3/include -I/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArm.Bsp.V1/platform-SM_ARM/build-target/linux-3.14/arch/arm/include -Iarch/arm/include/generated  -Iinclude -I/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArm.Bsp.V1/platform-SM_ARM/build-target/linux-3.14/arch/arm/include/uapi -Iarch/arm/include/generated/uapi -I/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArm.Bsp.V1/platform-SM_ARM/build-target/linux-3.14/include/uapi -Iinclude/generated/uapi -include /opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArm.Bsp.V1/platform-SM_ARM/build-target/linux-3.14/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -marm -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -I. -I/opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArm.Bsp.V1/platform-SM_ARM/sysroot-target/usr/xenomai/include -D_FORTIFY_SOURCE=0 -ffast-math -DG3RTAPI_XENOMAI -DG3SHM_XENOMAI -I/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../export -I/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/header -D"MODULE_VERSION_STR=KBUILD_STR(3.1.0)" -D"KERNEL_VERSION_U32=200192" -D"KERNEL_VERSION_STR=KBUILD_STR(3.14.0)" -I/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../include  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(shmModule)"  -D"KBUILD_MODNAME=KBUILD_STR(../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm)" -c -o

The module needs 5 source files
arm-cortexa9-linux-gnueabi-gcc -Wp,-MD  /internal/src/.shmCore.o.d  (same options)
arm-cortexa9-linux-gnueabi-gcc -Wp,-MD, /internal/src/.shmAreaImpl.o.d (same options)
arm-cortexa9-linux-gnueabi-gcc -Wp,-MD, /internal/src/shmBlockImpl.o (same options)
arm-cortexa9-linux-gnueabi-gcc -Wp,-MD, /internal/src/shmRtapi_xenomai.o (same options)

link step to module
arm-cortexa9-linux-gnueabi-ld -EL  /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa9-linux-gnueabi/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-cortexa9-linux-gnueabi/4.7.3/libgcc.a   -r -o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/shmModule.o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/shmLibInit.o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/shmCore.o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/shmAreaImpl.o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/shmBlockImpl.o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/shmMu.o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../internal/src/shmRtapi_xenomai.o
(cat /dev/null;   echo kernel//opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko;) > /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/modules.order

Install the module
make -f /opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArm.Bsp.V1/platform-SM_ARM/build-target/linux-3.14/scripts/Makefile.modpost
find /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -m  -i /opt/g3DevelBase/g3Toolchain/g3Bsp/sd3XenoArm.Bsp.V1/platform-SM_ARM/build-target/linux-3.14/Module.symvers -I /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/Module.symvers  -o /opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/Module.symvers -S -w  -s -T -
WARNING: "__aeabi_l2d" [/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko] undefined!
WARNING: "__aeabi_i2d" [/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko] undefined!
WARNING: "__aeabi_dcmpgt" [/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko] undefined!
WARNING: "__aeabi_dadd" [/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko] undefined!
WARNING: "__aeabi_dmul" [/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko] undefined!
WARNING: "__aeabi_dcmplt" [/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko] undefined!
WARNING: "__aeabi_d2lz" [/opt/g3DevelBase/g3Projects/SD3Xeno/usr/src/TargetWare/g3tShm/module/../../../../../build/sd3XenoArm.V1/TargetWare/g3kshm/g3k_shm.ko] undefined!

Best regards
Alexander

[-- Attachment #1.2: Type: text/html, Size: 15663 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-08 13:16 [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined Hänel-Baas, Alexander
@ 2015-01-08 13:23 ` Marc Kleine-Budde
  2015-01-08 13:26   ` Hänel-Baas, Alexander
  0 siblings, 1 reply; 10+ messages in thread
From: Marc Kleine-Budde @ 2015-01-08 13:23 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 488 bytes --]

On 01/08/2015 02:16 PM, Hänel-Baas, Alexander wrote:
> My question are:
> 
> Can I use float operation in k-modules under arm?

You cannot use float in the kernel, regardless of the architecture.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-08 13:23 ` Marc Kleine-Budde
@ 2015-01-08 13:26   ` Hänel-Baas, Alexander
  2015-01-08 13:28     ` Marc Kleine-Budde
  0 siblings, 1 reply; 10+ messages in thread
From: Hänel-Baas, Alexander @ 2015-01-08 13:26 UTC (permalink / raw)
  To: ptxdist

Hi Marc

Thank you for your replay.

But the module compiles already under x86!

Alex


-----Ursprüngliche Nachricht-----
Von: ptxdist-bounces@pengutronix.de [mailto:ptxdist-bounces@pengutronix.de] Im Auftrag von Marc Kleine-Budde
Gesendet: Donnerstag, 8. Januar 2015 14:23
An: ptxdist@pengutronix.de
Betreff: Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined

On 01/08/2015 02:16 PM, Hänel-Baas, Alexander wrote:
> My question are:
> 
> Can I use float operation in k-modules under arm?

You cannot use float in the kernel, regardless of the architecture.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-08 13:26   ` Hänel-Baas, Alexander
@ 2015-01-08 13:28     ` Marc Kleine-Budde
  2015-01-08 13:33       ` Hänel-Baas, Alexander
  0 siblings, 1 reply; 10+ messages in thread
From: Marc Kleine-Budde @ 2015-01-08 13:28 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 570 bytes --]

On 01/08/2015 02:26 PM, Hänel-Baas, Alexander wrote:
>>> Can I use float operation in k-modules under arm?
>> You cannot use float in the kernel, regardless of the architecture.
> But the module compiles already under x86!

Maybe it does compile, but it will not work properly.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-08 13:28     ` Marc Kleine-Budde
@ 2015-01-08 13:33       ` Hänel-Baas, Alexander
  2015-01-08 13:45         ` Marc Kleine-Budde
  0 siblings, 1 reply; 10+ messages in thread
From: Hänel-Baas, Alexander @ 2015-01-08 13:33 UTC (permalink / raw)
  To: ptxdist

Okay, 
do you mean the float operation is my problem?

Alex

-----Ursprüngliche Nachricht-----
Von: ptxdist-bounces@pengutronix.de [mailto:ptxdist-bounces@pengutronix.de] Im Auftrag von Marc Kleine-Budde
Gesendet: Donnerstag, 8. Januar 2015 14:29
An: ptxdist@pengutronix.de
Betreff: Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined

On 01/08/2015 02:26 PM, Hänel-Baas, Alexander wrote:
>>> Can I use float operation in k-modules under arm?
>> You cannot use float in the kernel, regardless of the architecture.
> But the module compiles already under x86!

Maybe it does compile, but it will not work properly.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-08 13:33       ` Hänel-Baas, Alexander
@ 2015-01-08 13:45         ` Marc Kleine-Budde
  2015-01-08 14:25           ` Hänel-Baas, Alexander
  2015-01-12 14:45           ` Hänel-Baas, Alexander
  0 siblings, 2 replies; 10+ messages in thread
From: Marc Kleine-Budde @ 2015-01-08 13:45 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 469 bytes --]

On 01/08/2015 02:33 PM, Hänel-Baas, Alexander wrote:
> Okay, 
> do you mean the float operation is my problem?

You cannot use float in the kernel, regardless of the architecture.

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-08 13:45         ` Marc Kleine-Budde
@ 2015-01-08 14:25           ` Hänel-Baas, Alexander
  2015-01-12 14:45           ` Hänel-Baas, Alexander
  1 sibling, 0 replies; 10+ messages in thread
From: Hänel-Baas, Alexander @ 2015-01-08 14:25 UTC (permalink / raw)
  To: ptxdist

Ok i changed double to long and now my module is already linked and loading.

Thank you very much for this tip

Alexander


-----Ursprüngliche Nachricht-----
Von: ptxdist-bounces@pengutronix.de [mailto:ptxdist-bounces@pengutronix.de] Im Auftrag von Marc Kleine-Budde
Gesendet: Donnerstag, 8. Januar 2015 14:46
An: ptxdist@pengutronix.de
Betreff: Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined

On 01/08/2015 02:33 PM, Hänel-Baas, Alexander wrote:
> Okay, 
> do you mean the float operation is my problem?

You cannot use float in the kernel, regardless of the architecture.

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-08 13:45         ` Marc Kleine-Budde
  2015-01-08 14:25           ` Hänel-Baas, Alexander
@ 2015-01-12 14:45           ` Hänel-Baas, Alexander
  2015-01-12 15:04             ` Marc Kleine-Budde
  1 sibling, 1 reply; 10+ messages in thread
From: Hänel-Baas, Alexander @ 2015-01-12 14:45 UTC (permalink / raw)
  To: ptxdist

Hi 

I have found my problem: there was a pragma pack(push(1)) without a corresponding pack().

No it compiles fine.

Sorry for this post.

Regards 
Alex
-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-12 14:45           ` Hänel-Baas, Alexander
@ 2015-01-12 15:04             ` Marc Kleine-Budde
  2015-01-12 15:50               ` Hänel-Baas, Alexander
  0 siblings, 1 reply; 10+ messages in thread
From: Marc Kleine-Budde @ 2015-01-12 15:04 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 620 bytes --]

On 01/12/2015 03:45 PM, Hänel-Baas, Alexander wrote:
> I have found my problem: there was a pragma pack(push(1)) without a
> corresponding pack().

This looks wrong in the kernel. Make use of __packed:

struct foo {
 	u8 bar;
	u16 baz;
 	u8 qux;
 } __packed;

P.S.: Using floating point in the kernel still doesn't work.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined
  2015-01-12 15:04             ` Marc Kleine-Budde
@ 2015-01-12 15:50               ` Hänel-Baas, Alexander
  0 siblings, 0 replies; 10+ messages in thread
From: Hänel-Baas, Alexander @ 2015-01-12 15:50 UTC (permalink / raw)
  To: ptxdist

Ups
the subject was wrong...

[subject] kernelmodul ->__aeabi_l2d undefined
Marc : you are right , I changed double to long and it works.

[subject] qt + arm-cortexa9-linux-gnueabi -> error: output number 2 not directly addressable
Non-balanced #pragma pack() was the problem.

Many thanks for your reply
Alex

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-01-12 15:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-08 13:16 [ptxdist] arm-cortexa9 kernelmodul ->__aeabi_l2d undefined Hänel-Baas, Alexander
2015-01-08 13:23 ` Marc Kleine-Budde
2015-01-08 13:26   ` Hänel-Baas, Alexander
2015-01-08 13:28     ` Marc Kleine-Budde
2015-01-08 13:33       ` Hänel-Baas, Alexander
2015-01-08 13:45         ` Marc Kleine-Budde
2015-01-08 14:25           ` Hänel-Baas, Alexander
2015-01-12 14:45           ` Hänel-Baas, Alexander
2015-01-12 15:04             ` Marc Kleine-Budde
2015-01-12 15:50               ` Hänel-Baas, Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox