Linking errors of Mini-OS for ARM32
Hi Ian,
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o -o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to __aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to __aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to __aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to __aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to __aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to __aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to __aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to __aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1
I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.
Any ideas?
BTW, after pass my first build, I would consider implementing support in the toolstack for generating a DTB for guest on ARM platform.
Baozi
Quoted 20 lines · Chen Baozi
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T
arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o-o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to__aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to__aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to__aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1
Quoted 5 lines
I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.Any ideas?
You need to provide an implementation for __aeabi_uldivmod. For this purpose, you can re-use xen/arch/arm/arm32/lib/lib1func.S
--
Grall Julien
Quoted 21 lines · Julien Grall
Quoted 20 lines · Chen Baozi
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T
arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o-o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to__aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to__aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to__aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1
Quoted 8 lines
Quoted 5 lines
I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.Any ideas?
You need to provide an implementation for
__aeabi_uldivmod. For this purpose, you can re-usexen/arch/arm/arm32/lib/lib1func.S
Please be careful of licensing if you take Xen code into MiniOS.
Tim.
Quoted 26 lines · Tim Deegan
Quoted 25 lines · Julien Grall
Quoted 24 lines · Chen Baozi
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T
arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o-o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to__aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to__aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to__aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Any ideas?
You need to provide an implementation for
__aeabi_uldivmod. For this purpose, you can re-usexen/arch/arm/arm32/lib/lib1func.SPlease be careful of licensing if you take Xen code into MiniOS.
Thanks for reminding.
Cheers,
Baozi
Quoted 26 lines · Tim Deegan
Quoted 25 lines · Julien Grall
Quoted 24 lines · Chen Baozi
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T
arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o-o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to__aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to__aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to__aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Any ideas?
You need to provide an implementation for
__aeabi_uldivmod. For this purpose, you can re-usexen/arch/arm/arm32/lib/lib1func.SPlease be careful of licensing if you take Xen code into MiniOS.
That's right, in fact Xen code is GPLv2 while MiniOS is BSD. So you need to find a BSD licensed implementation of __aeabi_uldivmod. Maybe NetBSD?
Quoted 21 lines · Julien Grall
Quoted 20 lines · Chen Baozi
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T
arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o-o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to__aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to__aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to__aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1
Quoted 8 lines
Quoted 5 lines
I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.Any ideas?
You need to provide an implementation for
__aeabi_uldivmod. For this purpose, you can re-usexen/arch/arm/arm32/lib/lib1func.S
Thanks a lot.
A further question. I'm a litte curious that whether __aeabi_uldivmod is missing because of a toolchain bug or some other reasons?
Cheers,
Baozi
Quoted 28 lines · Chen Baozi
Quoted 27 lines · Julien Grall
Quoted 25 lines · Chen Baozi
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T
arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o-o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to__aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to__aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to__aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.Any ideas?
Quoted 7 lines
Quoted 2 lines
You need to provide an implementation for
__aeabi_uldivmod. For this purpose, you can re-usexen/arch/arm/arm32/lib/lib1func.SThanks a lot.
A further question. I'm a litte curious that whether
__aeabi_uldivmodis missing because of a toolchain bug or some other reasons?
__aeabi_uldivmod and co. are provided by libgcc.{so,a}. Mini-OS is not linked against this library.
Signature · 1 line
Julien
Quoted 33 lines · Julien Grall
Quoted 31 lines · Chen Baozi
Quoted 29 lines · Julien Grall
Quoted 20 lines · Chen Baozi
Since finishing the very beginning setup assembly, I was turning to adding necessary headers and empty functions to build the binary. After introducing those bit operations, spinlocks etc., I thought I have a basic framework to pass the first build. However, when comming to the final linking stage, there are errors:
arm-linux-gnueabihf-ld -T
arch/arm/minios-arm32.lds/home/cbz/src/xen/extras/mini-os/mini-os.o-o
//home/cbz/src/xen/extras/mini-os/mini-os/home/cbz/src/xen/extras/mini-os/mini-os.o: In function `init_blkfront':/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod'/home/cbz/src/xen/extras/mini-os/blkfront.c:122: undefined reference to__aeabi_uldivmod' /home/cbz/src/xen/extras/mini-os/mini-os.o:/home/cbz/src/xen/extras/mini-os/blkfront.c:122: more undefined references to__aeabi_uldivmod' follow /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x0): undefined reference to__aeabi_unwind_cpp_pr0' /home/cbz/src/xen/extras/mini-os/mini-os.o:(.ARM.exidx+0x50): undefined reference to__aeabi_unwind_cpp_pr0'
make: *** [/home/cbz/src/xen/extras/mini-os/mini-os] Error 1Quoted 5 lines
I googled that error message. Some has mentioned that add "-fno-exceptions
-fno-unwind tables" could sovle the problem. I tried, but got the same
errors.Any ideas?
You need to provide an implementation for
__aeabi_uldivmod. For this purpose, you can re-usexen/arch/arm/arm32/lib/lib1func.S
Quoted 7 lines
Quoted 4 lines
Thanks a lot.
A further question. I'm a litte curious that whether
__aeabi_uldivmodis missing because of a toolchain bug or some other reasons?
__aeabi_uldivmodand co. are provided by libgcc.{so,a}. Mini-OS is not linked against this library.
Actually the implementation of __aeabi_uldivmod in xen/arch/arm/arm32/lib/lib1funcs.S is GPLv2. You cannot use it in Mini-OS that is BSD licensed. You need to find a BSD implementation of that function.