Sure. I tried your way, it is OK for me.
Thanks.
Best Regards,
Frank
--
At 2012-02-14 20:44:03,"Jenny Smith" <smithjenny183@xxxxxxxxx> wrote:
>For me the only way to get it working was to explicitly add
>-fno-exceptions to the arm Rules.mk and then compiling and running Xen
>worked.
>
>diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
>index 336e209..77250e5 100644
>--- a/xen/arch/arm/Rules.mk
>+++ b/xen/arch/arm/Rules.mk
>@@ -12,6 +12,7 @@ CFLAGS += -I$(BASEDIR)/include
>
> # Prevent floating-point variables from creeping into Xen.
> CFLAGS += -msoft-float
>+CFLAGS += -fno-exceptions -fno-unwind-tables
>
> $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
> $(call cc-option-add,CFLAGS,CC,-Wnested-externs)
>
>
>Jenny
>
>
>
>On Tue, Feb 7, 2012 at 1:19 PM, Tim Deegan <tim@xxxxxxx> wrote:
>> At 20:31 +0800 on 07 Feb (1328646671), Frank, Chen wrote:
>>> Hi all,
>>>
>>>
>>> I succeed in compiling the unstable source for arm at sstabellini/xen-unstable.git/.git with a little modification of xen/arch/arm/Makefile by the latest arm-none-linux-gnueabi- compiler from code sourcery.
>>>
>>>
>>> - The URL for the latest cross compiler:
>>> https://sourcery.mentor.com/sgpp/lite/arm/portal/package9728/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
>>>
>>>
>>> - Compiling command : XEN_TARGET_ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi make xen
>>>
>>> - The patch is the following:
>>> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
>>> index 9bc2fc8..244a19f 100644
>>> --- a/xen/arch/arm/Makefile
>>> +++ b/xen/arch/arm/Makefile
>>> @@ -51,15 +51,15 @@ $(BASEDIR)/common/symbols-dummy.o:
>>> $(MAKE) -f $(BASEDIR)/Rules.mk -C $(BASEDIR)/common symbols-dummy.o
>>>
>>> $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
>>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>> $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
>>> $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
>>> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
>>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>> $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
>>> $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
>>> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
>>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>> $(@D)/.$(@F).1.o -o $@
>>> rm -f $(@D)/.$(@F).[0-9]*
>>
>> That may link successfully but I'd be surprised if it runs. You're
>> building a relocatable object instead of an executable binary. If you
>> check your output file you'll probably find that it's still got an
>> unresolved symbol '__aeabi_unwind_cpp_pr1' in it.
>>
>> The real problem is that whatever compiler you're using is expecting
>> this __aeabi_unwind_cpp_pr1() helper function to exist and it doesn't.
>>
>> IIUC, __aeabi_unwind_cpp_pr1() is part ofthe C++ exception-handling
>> code, so it's surprising to see it linked from Xen code! You coud try
>> adding -fno-exceptions to the CFLAGS in config/arm.mk
>>
>> For the record, GCC 4.6.2 arm-linux-gnueabihf compiles Xen without this
>> error for me.
>>
>> Tim.
>>
>>>
>>>
>>> - Without applying this patch, the compiling will output the following error.
>>> ---
>>> make[4]: Leaving directory `/home/frank/workspace/xen/src/xen-arm-v6/xen/common'
>>> arm-none-linux-gnueabi-ld -marmelf_linux_eabi -T xen.lds -N prelink.o \
>>> /home/frank/workspace/xen/src/xen-arm-v6/xen/common/symbols-dummy.o -o /home/frank/workspace/xen/src/xen-arm-v6/xen/.xen-syms.0
>>> prelink.o:(.ARM.exidx.init.text+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
>>
>> _______________________________________________
>> Xen-arm mailing list
>> Xen-arm@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/mailman/listinfo/xen-arm