Hi AJ.  Exception support can still be turned on in C code when it's
supposed to interoperate with C++ code.  An example is the 64 bit
division routine in libgcc - it could potentially throw a division by
zero exception when called from C++ code even though the function is
written in C.

-- Michael

On Tue, Apr 19, 2011 at 10:38 AM, AJ ONeal <coola...@gmail.com> wrote:
> What is an "exception" in C?
> There is no CPP (.cpp or .cxx) code in any of these libraries.
>
> Interesting thing though:
> cmem has a userspace and kernelspace component.
> TI does really nasty stuff, like pull in .h files from the kernel and
> whatnot.
> I just tried again against the 2.6.38 kernel (was 2.6.36 this morning) and
> there is no error.
> http://lxr.free-electrons.com/ident?i=__aeabi_unwind_cpp_pr0
> Perhaps it's just something in my .config that turns that on or off in the
> kernel.
> AJ ONeal
>
>
> On Mon, Apr 18, 2011 at 3:06 PM, Michael Hope <michael.h...@linaro.org>
> wrote:
>>
>> On Tue, Apr 19, 2011 at 5:39 AM, AJ ONeal <coola...@gmail.com> wrote:
>> >
>> > I'm compiling an application built with TI's DVSDK 3 *[0].
>> >
>> >
>> >
>> >
>> > /home/user/ti/dvsdk/dvsdk_3_01_00_10/linuxutils_2_25_02_08/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV(cmem.o470MV):(.ARM.exidx+0x0):
>> > undefined reference to `__aeabi_unwind_cpp_pr0'
>> >
>> >
>> >
>> > arm-linux-gnueabi-gcc --version
>> > arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.5.2-5ubuntu2~ppa1) 4.5.2
>> > arm-linux-gnueabi-ld --version
>> > GNU ld (GNU Binutils for Ubuntu) 2.21.0.20110302
>> >
>> > More full output is here (but it isn't particularly helpful due to TI's
>> > RTSC
>> > make system's black-magic)
>> > https://gist.github.com/925674
>> > FYI: the MV in cmem.a470MV stands for MontaVista.
>> > This name is hard-coded somewhere even though it's not being linked
>> > against
>> > a MontaVista system.
>> > I believe the 470 means that it should work with ARMv4 through ARMv7,
>> > but
>> > I'm not positive.
>> >
>> > My googling suggest that this is a toolchain bug and that the best way
>> > around the issue is to create a file which defines the function as a
>> > void
>> > dummy and include it.
>> > http://www.codesourcery.com/archives/arm-gnu/msg03604.html
>> > http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/78649
>> >
>> > http://www.cs.fsu.edu/~baker/devices/lxr/http/ident?i=__aeabi_unwind_cpp_pr0
>> >
>> > I have a script that I'll post shortly with instructions as to how to
>> > setup
>> > TI's DVSDK with Linaro
>> > AJ ONeal
>> >
>> > [0] I'm not using the latest DVSDK version 4 because the paths and such
>> > are
>> > so hard-coded for the 2009q3 version of codesourcery on ubuntu 10.04 LTS
>> > that I don't know where to start fixing it.
>>
>> Hi AJ.  __aeabi_unwind_cpp_pr0 is part of the standard ARM exception
>> handling code and helps in unwinding the stack frame when an exception
>> occurs.  This suggests that the binary cmem.a470MV can throw
>> exceptions and therefore needs exception handling.
>>
>> I don't think this is a toolchain bug as this function is included in
>> libgcc_eh.a and is normally pulled in automatically.  Could you add
>> '-v' to your linker flags and send through the result?
>>
>> -- Michael
>
>

_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to