From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Baozi Subject: Re: Linking errors of Mini-OS for ARM32 Date: Mon, 10 Jun 2013 08:13:15 +0800 Message-ID: <20130610001315.GA1714@cbz-workstation> References: <20130609124213.GA19123@cbz-workstation> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-arm@lists.xen.org, ian.campbell@citrix.com, "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Sun, Jun 09, 2013 at 02:48:42PM +0100, Julien Grall wrote: > On Sun, Jun 9, 2013 at 1:42 PM, Chen Baozi 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