Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: ARM

Re: [Xen-devel] Linking errors of Mini-OS for ARM32

 

 

Xen arm RSS feed   Index | Next | Previous | View Threaded


tim at xen

Jun 9, 2013, 7:19 AM

Post #1 of 6 (163 views)
Permalink
Re: [Xen-devel] Linking errors of Mini-OS for ARM32

At 14:48 +0100 on 09 Jun (1370789322), Julien Grall wrote:
> On Sun, Jun 9, 2013 at 1:42 PM, Chen Baozi <baozich [at] gmail> wrote:
> > 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?
>
> You need to provide an implementation for __aeabi_uldivmod.
> For this purpose, you can re-use xen/arch/arm/arm32/lib/lib1func.S

Please be careful of licensing if you take Xen code into MiniOS.

Tim.

_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-arm


baozich at gmail

Jun 9, 2013, 5:13 PM

Post #2 of 6 (146 views)
Permalink
Re: [Xen-devel] Linking errors of Mini-OS for ARM32 [In reply to]

On Sun, Jun 09, 2013 at 02:48:42PM +0100, Julien Grall wrote:
> On Sun, Jun 9, 2013 at 1:42 PM, Chen Baozi <baozich [at] gmail> wrote:
> > 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?
>
> You need to provide an implementation for __aeabi_uldivmod.
> For this purpose, you can re-use xen/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


_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-arm


baozich at gmail

Jun 9, 2013, 5:14 PM

Post #3 of 6 (146 views)
Permalink
Re: [Xen-devel] Linking errors of Mini-OS for ARM32 [In reply to]

On Sun, Jun 09, 2013 at 03:19:42PM +0100, Tim Deegan wrote:
> At 14:48 +0100 on 09 Jun (1370789322), Julien Grall wrote:
> > On Sun, Jun 9, 2013 at 1:42 PM, Chen Baozi <baozich [at] gmail> wrote:
> > > 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?
> >
> > You need to provide an implementation for __aeabi_uldivmod.
> > For this purpose, you can re-use xen/arch/arm/arm32/lib/lib1func.S
>
> Please be careful of licensing if you take Xen code into MiniOS.
Thanks for reminding.

Cheers,

Baozi

_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-arm


julien.grall at linaro

Jun 10, 2013, 3:06 AM

Post #4 of 6 (79 views)
Permalink
Re: [Xen-devel] Linking errors of Mini-OS for ARM32 [In reply to]

On 06/10/2013 01:13 AM, Chen Baozi wrote:

> On Sun, Jun 09, 2013 at 02:48:42PM +0100, Julien Grall wrote:
>> On Sun, Jun 9, 2013 at 1:42 PM, Chen Baozi <baozich [at] gmail> wrote:
>>> 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?
>>
>> You need to provide an implementation for __aeabi_uldivmod.
>> For this purpose, you can re-use xen/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?

__aeabi_uldivmod and co. are provided by libgcc.{so,a}. Mini-OS is not
linked against this library.

--
Julien

_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-arm


stefano.stabellini at eu

Jun 10, 2013, 6:44 AM

Post #5 of 6 (142 views)
Permalink
Re: [Xen-devel] Linking errors of Mini-OS for ARM32 [In reply to]

On Sun, 9 Jun 2013, Tim Deegan wrote:
> At 14:48 +0100 on 09 Jun (1370789322), Julien Grall wrote:
> > On Sun, Jun 9, 2013 at 1:42 PM, Chen Baozi <baozich [at] gmail> wrote:
> > > 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?
> >
> > You need to provide an implementation for __aeabi_uldivmod.
> > For this purpose, you can re-use xen/arch/arm/arm32/lib/lib1func.S
>
> Please 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?

_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-arm


stefano.stabellini at eu

Jul 12, 2013, 6:14 AM

Post #6 of 6 (79 views)
Permalink
Re: [Xen-devel] Linking errors of Mini-OS for ARM32 [In reply to]

On Mon, 10 Jun 2013, Julien Grall wrote:
> On 06/10/2013 01:13 AM, Chen Baozi wrote:
>
> > On Sun, Jun 09, 2013 at 02:48:42PM +0100, Julien Grall wrote:
> >> On Sun, Jun 9, 2013 at 1:42 PM, Chen Baozi <baozich [at] gmail> wrote:
> >>> 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?
> >>
> >> You need to provide an implementation for __aeabi_uldivmod.
> >> For this purpose, you can re-use xen/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?
>
> __aeabi_uldivmod and 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.

_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-arm

Xen arm RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.