<div dir="ltr">Hi,<div><br></div><div style>I am trying to make the mode switch work on rtl for arm.</div><div style><br></div><div style><div style>The following code is disassembled using arm linux gcc.</div><div style><br>
</div><div style>elf object file:  compiled in thumb mode.</div><div>38:<span class="" style="white-space:pre">       </span>f7ff bffe <span class="" style="white-space:pre">        </span>b.w<span class="" style="white-space:pre">       </span>0 <rtems></div>
<div><span style="white-space:pre"> </span>38: R_ARM_THM_JUMP24<span class="" style="white-space:pre">    </span>rtems</div><div style>It invokes a function "rtems" which are in arm mode.</div><div><br></div><div style>
elf executable file:</div><div><div>8414:<span class="" style="white-space:pre">    </span>f000 b85c <span class="" style="white-space:pre">        </span>b.w<span class="" style="white-space:pre">       </span>84d0 <__rtems_from_thumb></div>
</div><div><br></div><div><div>000084d0 <__rtems_from_thumb>: //stub code</div><div>    84d0:<span class="" style="white-space:pre">    </span>4778      <span class="" style="white-space:pre">        </span>bx<span class="" style="white-space:pre">        </span>pc</div>
<div>    84d2:<span class="" style="white-space:pre">   </span>46c0      <span class="" style="white-space:pre">        </span>nop<span class="" style="white-space:pre">                       </span>; (mov r8, r8)</div><div>    84d4:<span class="" style="white-space:pre">    </span>eaffffc0 <span class="" style="white-space:pre"> </span>b<span class="" style="white-space:pre"> </span>83dc <rtems></div>
</div><div><br></div><div style>the arm linux gcc uses a stub code to handle the thumb to arm invoking.</div><div style>I also want to introduce this for arm rtl.But I do not have a good idea about how to manage the stub code. Each rap file may contain many such reloc entry, each such reloc entry needs a stub code.</div>
<div style>How to manage the stub codes? </div><div style><br></div><div style>Thanks in advance.</div><div style><br></div></div></div>