<div dir="ltr"><div><div><div>Hi Evgeniy,<br><br></div>I have run in to the some unwind handling table issue recently. After some investigation, I believe that the correct behavior is to generate [cantunwind] with and without the -funwind-tables. Thus, I am afraid that -funwind-tables might not be a good solution for your use case. (i.e. your program might fall in an infinite loop during stack unwinding.)<br>
<br></div>I will send the details for discussion ASAP.<br><br></div><div>Sincerely,<br>Logan<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 13, 2014 at 10:03 PM, Evgeniy Stepanov <span dir="ltr"><<a href="mailto:eugenis@google.com" target="_blank">eugenis@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Feb 13, 2014 at 5:52 PM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:<br>
> On 13 February 2014 13:47, Evgeniy Stepanov <<a href="mailto:eugenis@google.com">eugenis@google.com</a>> wrote:<br>
>> Hm, I see that -funwind-tables on arm-linux-androideabi target<br>
>> replaces this "cantunwind" with a proper unwind table.<br>
>> Hence <a href="http://llvm-reviews.chandlerc.com/D2762" target="_blank">http://llvm-reviews.chandlerc.com/D2762</a>.<br>
><br>
> If Android is using EHABI (I think it is), the default now is to<br>
> output full tables all the time, everywhere. This will change to be<br>
> the same as x86 soon.<br>
<br>
</div>It does use EHABI, but at r201326:<br>
$ cat 1.cc<br>
int f() {}<br>
$ ./bin/clang++ -target arm-linux-androideabi 1.cc -c<br>
$ readelf -u 1.o<br>
0x0 <_Z1fv>: 0x1 [cantunwind]<br>
$ ./bin/clang++ -target arm-linux-androideabi 1.cc -c -funwind-tables<br>
$ readelf -u 1.o<br>
0x0 <_Z1fv>: 0x8000b0b0<br>
Compact model 0<br>
0x00 vsp = vsp + 4<br>
0xb0 finish<br>
0xb0 finish<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div>