<div dir="ltr"><div style>Thanks.</div>I think if the rap file is compiled in thumb, this size of the rap file will be reduced.<div style>So i want to introduce it. If this is not needed, it would be easy to just handle arm to arm and thumb to thumb call.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/10 Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Peng Fan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I am trying to make the mode switch work on rtl for arm.<br>
<br>
</blockquote>
<br></div>
What does "mode switch" mean ?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
The following code is disassembled using arm linux gcc.<br>
<br>
elf object file:  compiled in thumb mode.<br>
38:f7ff bffe b.w0 <rtems><br>
38: R_ARM_THM_JUMP24rtems<br>
It invokes a function "rtems" which are in arm mode.<br>
<br>
elf executable file:<br></div>
8414:f000 b85c b.w84d0 <__rtems_from_thumb><div class="im"><br>
<br>
000084d0 <__rtems_from_thumb>: //stub code<br>
     84d0:4778 bxpc<br>
     84d2:46c0 nop; (mov r8, r8)<br></div>
     84d4:eaffffc0 b83dc <rtems><div class="im"><br>
<br>
the arm linux gcc uses a stub code to handle the thumb to arm invoking.<br>
</div></blockquote>
<br>
Why would we want this ? I would assume RTL loaded code must be the same as the base kernel code.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I also want to introduce this for arm rtl.But I do not have a good idea<br>
about how to manage the stub code. Each rap file may contain many such<br>
reloc entry, each such reloc entry needs a stub code.<br>
How to manage the stub codes?<br>
</blockquote>
<br></div>
RTEMS does not have the requirement to support multiple code "modes" at runtime and Linux does. For embedded systems it is sensible to enforce one code type.<span class="HOEnZb"><font color="#888888"><br>
<br>
Chris<br>
</font></span></blockquote></div><br></div>