[llvm-commits] [llvm] r95723 - in /llvm/trunk/examples: CMakeLists.txt ExceptionDemo/ ExceptionDemo/CMakeLists.txt ExceptionDemo/ExceptionDemo.cpp ExceptionDemo/Makefile Makefile
Garrison Venn
gvenn.cfe.dev at gmail.com
Tue Feb 23 08:32:31 PST 2010
I temporarily fixed this by preventing a build on non x86 and x86_64 architectures. Your ARM ABI
reference seems doable but I would have to look at it in greater detail, unless of course you
already understand the direction needed. :-)
Thanks again!
Garrison
On Feb 23, 2010, at 8:20, Xerxes Rånby wrote:
> On 2010-02-23 13:41, Xerxes Rånby wrote:
>> On 2010-02-10 00:22, Garrison Venn wrote:
>>
>>> Author: gvenn
>>> Date: Tue Feb 9 17:22:43 2010
>>> New Revision: 95723
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=95723&view=rev
>>> Log:
>>> Adds a JIT based exception handling example to the examples directory.
>>> Both zero cost example domain specific, and C++ foreign exception handling are
>>> shown. The example's documentation fully explains how to run the example.
>>>
>>> Notes:
>>>
>>> 1) The code uses an extremely simple type info model.
>>> 2) Only a single landing pad is used per unwind edge
>>> (one call to llvm.eh.selector)
>>> 3) llvm.eh.selector support for filter arguments is not given.
>>> 4) llvm.eh.typeid.for is not used.
>>> 5) Forced unwind behavior is not supported.
>>> 6) Very little if any error handling is given.
>>> 7) __attribute__((__aligned__)) is used.
>>> 8) The code uses parts from the llvm compiler-rt project and
>>> the llvm Kaleidoscope example.
>>> 9) The code has not been ported or tested on WINDOWS.
>>> 10) The code was not tested with a cmake build.
>>> 11) The code was tested for a debug build on 32bit X86 CentOS LINUX,
>>> and both a debug and release build on OS X 10.6.2 (64bit).
>>>
>>>
>> The build fails when building this example using LLVM ARM Linux using
>> GCC 4.3.3 on Ubuntu Jaunty,
>>
>> make[1]: Entering directory
>> `/media/disk/llvm-configure/examples/ExceptionDemo'
>> llvm[1]: Compiling ExceptionDemo.cpp for Release build
>> llvm[1]: Linking Release executable ExceptionDemo (without symbols)
>> /media/disk/llvm-configure/examples/ExceptionDemo/Release/ExceptionDemo.o:
>> In function `ourPersonality':
>> ExceptionDemo.cpp:(.text+0x60c): undefined reference to `_Unwind_GetIP'
>> ExceptionDemo.cpp:(.text+0x7f8): undefined reference to `_Unwind_SetGR'
>> ExceptionDemo.cpp:(.text+0x818): undefined reference to `_Unwind_SetGR'
>> ExceptionDemo.cpp:(.text+0x828): undefined reference to `_Unwind_SetIP'
>> ExceptionDemo.cpp:(.text+0x870): undefined reference to `_Unwind_SetGR'
>> collect2: ld returned 1 exit status
>> make[1]: *** [/media/disk/llvm-configure/Release/examples/ExceptionDemo]
>> Error 1
>> make[1]: Leaving directory
>>
>
> For what i can find, it looks like
>
> _Unwind_GetIP
>
> and
>
> _Unwind_SetGR
>
> are not defined in the Exception Handling ABI for the ARM® Architecture
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
>
> Hope this heps fixing the example implementation for ARM.
> Cheers
> Xerxes
>
>> The llvm-arm-linux buildbot have disabled builds of the examples so
>> thats why we are not catching this using the buildbot.
>>
>> The following exception symbols exist when building on ARM:
>> buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$ nm -a libgcc_eh.a
>>
>> unwind-arm.o:
>> 00000000 n .ARM.attributes
>> 00000000 r .ARM.exidx
>> 00000000 r .ARM.extab
>> 00000000 b .bss
>> 00000000 n .comment
>> 00000000 d .data
>> 00000000 n .note.GNU-stack
>> 00000000 t .text
>> U _GLOBAL_OFFSET_TABLE_
>> 000000b0 T _Unwind_Complete
>> 000000b4 T _Unwind_DeleteException
>> 000000a8 T _Unwind_GetCFA
>> 00000000 T _Unwind_VRS_Get
>> 00000b8c T _Unwind_VRS_Pop
>> 00000054 T _Unwind_VRS_Set
>> 000004e0 T __aeabi_unwind_cpp_pr0
>> 000004d8 W __aeabi_unwind_cpp_pr1
>> 000004d0 W __aeabi_unwind_cpp_pr2
>> w __cxa_begin_cleanup
>> w __cxa_call_unexpected
>> w __cxa_type_match
>> U __exidx_end
>> U __exidx_start
>> 000007e0 T __gnu_Unwind_Backtrace
>> w __gnu_Unwind_Find_exidx
>> 000009dc T __gnu_Unwind_ForcedUnwind
>> 00000a5c T __gnu_Unwind_RaiseException
>> U __gnu_Unwind_Restore_VFP
>> U __gnu_Unwind_Restore_VFP_D
>> U __gnu_Unwind_Restore_VFP_D_16_to_31
>> U __gnu_Unwind_Restore_WMMXC
>> U __gnu_Unwind_Restore_WMMXD
>> 00000b20 T __gnu_Unwind_Resume
>> 00000b00 T __gnu_Unwind_Resume_or_Rethrow
>> U __gnu_Unwind_Save_VFP
>> U __gnu_Unwind_Save_VFP_D
>> U __gnu_Unwind_Save_VFP_D_16_to_31
>> U __gnu_Unwind_Save_WMMXC
>> U __gnu_Unwind_Save_WMMXD
>> U __gnu_unwind_execute
>> 000000dc t __gnu_unwind_pr_common
>> U abort
>> 000004e8 t get_eit_entry
>> U memcpy
>> U restore_core_regs
>> 00000754 t restore_non_core_regs
>> 00000a00 t unwind_phase2
>> 0000089c t unwind_phase2_forced
>>
>> libunwind.o:
>> 00000000 n .ARM.attributes
>> 00000000 b .bss
>> 00000000 d .data
>> 00000000 n .note.GNU-stack
>> 00000000 t .text
>> 00000184 T _Unwind_Backtrace
>> 00000160 T _Unwind_ForcedUnwind
>> 000000f4 T _Unwind_RaiseException
>> 00000118 T _Unwind_Resume
>> 0000013c T _Unwind_Resume_or_Rethrow
>> 00000184 T ___Unwind_Backtrace
>> 00000160 T ___Unwind_ForcedUnwind
>> 000000f4 T ___Unwind_RaiseException
>> 00000118 T ___Unwind_Resume
>> 0000013c T ___Unwind_Resume_or_Rethrow
>> U __gnu_Unwind_Backtrace
>> U __gnu_Unwind_ForcedUnwind
>> U __gnu_Unwind_RaiseException
>> 00000014 T __gnu_Unwind_Restore_VFP
>> 00000024 T __gnu_Unwind_Restore_VFP_D
>> 00000034 T __gnu_Unwind_Restore_VFP_D_16_to_31
>> 000000cc T __gnu_Unwind_Restore_WMMXC
>> 00000044 T __gnu_Unwind_Restore_WMMXD
>> U __gnu_Unwind_Resume
>> U __gnu_Unwind_Resume_or_Rethrow
>> 0000001c T __gnu_Unwind_Save_VFP
>> 0000002c T __gnu_Unwind_Save_VFP_D
>> 0000003c T __gnu_Unwind_Save_VFP_D_16_to_31
>> 000000e0 T __gnu_Unwind_Save_WMMXC
>> 00000088 T __gnu_Unwind_Save_WMMXD
>> 00000000 T __restore_core_regs
>> 00000000 T restore_core_regs
>>
>> pr-support.o:
>> 00000000 n .ARM.attributes
>> 00000000 r .ARM.exidx
>> 00000000 r .ARM.extab
>> 00000000 b .bss
>> 00000000 n .comment
>> 00000000 d .data
>> 00000000 n .note.GNU-stack
>> 00000000 t .text
>> 00000068 T _Unwind_GetDataRelBase
>> 00000074 T _Unwind_GetLanguageSpecificData
>> 000000b8 T _Unwind_GetRegionStart
>> 0000005c T _Unwind_GetTextRelBase
>> U _Unwind_VRS_Get
>> U _Unwind_VRS_Pop
>> U _Unwind_VRS_Set
>> U __aeabi_unwind_cpp_pr0
>> 000000e8 T __gnu_unwind_execute
>> 00000768 T __gnu_unwind_frame
>> U abort
>> 00000000 t next_unwind_byte
>>
>> unwind-c.o:
>> 00000000 n .ARM.attributes
>> 00000000 r .ARM.exidx
>> 00000000 r .ARM.extab
>> 00000000 b .bss
>> 00000000 n .comment
>> 00000000 d .data
>> 00000000 n .note.GNU-stack
>> 00000000 t .text
>> U _Unwind_GetDataRelBase
>> U _Unwind_GetLanguageSpecificData
>> U _Unwind_GetRegionStart
>> U _Unwind_GetTextRelBase
>> U _Unwind_VRS_Get
>> U _Unwind_VRS_Set
>> U __aeabi_unwind_cpp_pr0
>> 00000000 T __gcc_personality_v0
>> U __gnu_unwind_frame
>> U abort
>>
>> emutls.o:
>> 00000000 n .ARM.attributes
>> 00000000 r .ARM.exidx
>> 00000000 r .ARM.extab
>> 00000000 b .bss
>> 00000000 n .comment
>> 00000000 d .data
>> 00000000 n .note.GNU-stack
>> 00000000 t .text
>> U _GLOBAL_OFFSET_TABLE_
>> U __aeabi_unwind_cpp_pr0
>> 0000012c T __emutls_get_address
>> 00000000 T __emutls_register_common
>> U abort
>> U calloc
>> 00000084 t emutls_alloc
>> 000002b8 t emutls_destroy
>> 00000040 t emutls_init
>> 0000001c b emutls_key
>> 00000000 b emutls_mutex
>> 00000020 b emutls_size
>> U free
>> U malloc
>> U memcpy
>> U memset
>> 00000018 b once.6753
>> w pthread_cancel
>> w pthread_getspecific
>> w pthread_key_create
>> w pthread_mutex_lock
>> w pthread_mutex_unlock
>> w pthread_once
>> w pthread_setspecific
>> U realloc
>> buildbot at sheeva:/usr/lib/gcc/arm-linux-gnueabi/4.3.3$
>>
>> Cheers, and have a great day!
>> Xerxes
>>
>
More information about the llvm-commits
mailing list