<small id='SPpB8'></small><noframes id='SPpB8'>

      <tfoot id='SPpB8'></tfoot>
    1. <legend id='SPpB8'><style id='SPpB8'><dir id='SPpB8'><q id='SPpB8'></q></dir></style></legend>
        <bdo id='SPpB8'></bdo><ul id='SPpB8'></ul>

      <i id='SPpB8'><tr id='SPpB8'><dt id='SPpB8'><q id='SPpB8'><span id='SPpB8'><b id='SPpB8'><form id='SPpB8'><ins id='SPpB8'></ins><ul id='SPpB8'></ul><sub id='SPpB8'></sub></form><legend id='SPpB8'></legend><bdo id='SPpB8'><pre id='SPpB8'><center id='SPpB8'></center></pre></bdo></b><th id='SPpB8'></th></span></q></dt></tr></i><div id='SPpB8'><tfoot id='SPpB8'></tfoot><dl id='SPpB8'><fieldset id='SPpB8'></fieldset></dl></div>

        otool for armv7 的方法实现地址错误?

        时间:2023-06-11

              • <legend id='9vRLJ'><style id='9vRLJ'><dir id='9vRLJ'><q id='9vRLJ'></q></dir></style></legend>
                <i id='9vRLJ'><tr id='9vRLJ'><dt id='9vRLJ'><q id='9vRLJ'><span id='9vRLJ'><b id='9vRLJ'><form id='9vRLJ'><ins id='9vRLJ'></ins><ul id='9vRLJ'></ul><sub id='9vRLJ'></sub></form><legend id='9vRLJ'></legend><bdo id='9vRLJ'><pre id='9vRLJ'><center id='9vRLJ'></center></pre></bdo></b><th id='9vRLJ'></th></span></q></dt></tr></i><div id='9vRLJ'><tfoot id='9vRLJ'></tfoot><dl id='9vRLJ'><fieldset id='9vRLJ'></fieldset></dl></div>
                  <tbody id='9vRLJ'></tbody>

                <small id='9vRLJ'></small><noframes id='9vRLJ'>

              • <tfoot id='9vRLJ'></tfoot>
                • <bdo id='9vRLJ'></bdo><ul id='9vRLJ'></ul>
                  本文介绍了otool for armv7 的方法实现地址错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  'otool' 显示的方法的实现地址不断得到 1 个字节的偏移量.

                  I'm constantly getting 1 byte offset for implementation address of method shown by 'otool'.

                  例如,'otool -o' 给出 0xe99d5,但 'otool -tvV' 给出:

                  For an example 'otool -o' gives 0xe99d5 but 'otool -tvV' gives:

                  +[NSError(SomeCategory) someMethod]:
                  000e99d4            b590        push    {r4, r7, lr}
                  000e99d6        f6441184        movw    r1, 0x4984
                  000e99da            af01        add     r7, sp, #4
                  000e99dc        f2c0010a        movt    r1, 0xa
                  

                  所以方法从 0xe99d4 开始.0xe99d5 看起来不对,未对齐.我相信otool"工作正常,我不了解实施的某些方面.如何解释输出?

                  So method starts at 0xe99d4. 0xe99d5 looks wrong, not aligned. I believe that 'otool' works fine and I don't understand some aspects of implementation. How to interpret the output ?

                  推荐答案

                  现代 ARM 内核有两种类型的指令集.原始的一种称为 arm 模式,其中每条指令长四个字节,而较新的一种称为 thumb2 (您可以猜到它已经通过了一些迭代),其中指令可以是两条或者四个字节长(引入的原因是代码密度).

                  Modern ARM cores has two types of instruction sets. Original one is called arm mode where each instruction is four bytes long and newer one is called thumb2 (as you can guess it has already passed some iterations) where instructions can be two or four bytes long (the reason for the introduction is code density).

                  CPU 在进行分支时可以改变模式,通知 CPU 使用的指令集的方法是设置要跳转的指令地址中的最低有效位.如果为0指令将被解释为arm模式,如果为1则被解释为thumb模式.

                  CPU can change modes when it is making a branch and the way to notify CPU about instruction set used is by setting the least significant bit in address of the instruction to be jumped. If it is 0 instruction will be interpreted as arm mode, if it is 1 they will be interpreted as thumb mode.

                  所以您看到的是您的函数处于 thumb2 模式,我们可以通过看到它包含两个和四个字节长的指令来验证它.

                  So what you are seeing is your function is in thumb2 mode which we can verify by seeing it consist of two and four byte long instructions.

                  这篇关于otool for armv7 的方法实现地址错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 iOS 上默认是 char 签名还是 unsigned? 下一篇:适用于 iPhone 的 MySQL C API 库

                  相关文章

                  <tfoot id='2WLCD'></tfoot>

                    <bdo id='2WLCD'></bdo><ul id='2WLCD'></ul>
                • <small id='2WLCD'></small><noframes id='2WLCD'>

                    <i id='2WLCD'><tr id='2WLCD'><dt id='2WLCD'><q id='2WLCD'><span id='2WLCD'><b id='2WLCD'><form id='2WLCD'><ins id='2WLCD'></ins><ul id='2WLCD'></ul><sub id='2WLCD'></sub></form><legend id='2WLCD'></legend><bdo id='2WLCD'><pre id='2WLCD'><center id='2WLCD'></center></pre></bdo></b><th id='2WLCD'></th></span></q></dt></tr></i><div id='2WLCD'><tfoot id='2WLCD'></tfoot><dl id='2WLCD'><fieldset id='2WLCD'></fieldset></dl></div>
                  1. <legend id='2WLCD'><style id='2WLCD'><dir id='2WLCD'><q id='2WLCD'></q></dir></style></legend>