LEON2 and C++ exception handling

Mike Looijmans mike.looijmans at topic.nl
Mon Aug 14 13:08:33 UTC 2017


On 14-08-17 09:35, Chris Johns wrote:
> On 14/8/17 4:04 pm, Mike Looijmans wrote:
>> On 12-08-17 03:29, Chris Johns wrote:
>>> On 11/8/17 10:14 pm, Mike Looijmans wrote:
>>>> Is there maybe some other
>>>> entry/register/variable that my boot code needs to pass to RTEMS?
>>>
>>> Exceptions need valid tables registered with the unwinder to work or you end up
>>> in the terminate call.
>>>
>>> The SPARC architecture uses what is normally named dwarf2 tables that GCC places
>>> in '.eh_frame' or '.gcc_except_table.*' sections. The tables linked into the
>>> executable are registered with the exception handler code in libgcc and for C++
>>> are processed using '__gcc_personality_v0' personality function. I cannot
>>> remember how they are registered by default.
>>>
>>> I hope this helps.
>>
>> Well, if I understand correctly, this just means that exception handling on
>> LEON2 is just not implemented in RTEMS.
>>
> 
> No, they should work. If you target's executable layout is not correct they will
> not work.

Ah, thanks for confirming that.

Bit of searching and comparing exectables reveiled that the ".eh_frame" 
segment was missing in the ROM images. Turned out to be a typo in the link script.

And indeed, it works properly now. Thank you for your help!


Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans at topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





More information about the users mailing list