为什么 objdump 在函数结束时不停止?

问题描述 投票:0回答:0

我正在尝试从 (ARM)ELF 文件开始生成被调用函数的调用图。目前我调用

objdump
,解析调用指令的输出,然后递归地重复。

但是,我注意到一个函数输出了两次:在我的最终反汇编中(我出于调试目的而跟踪)我看到了

[alessandro@commodoroII ~]$ arm-none-eabi-objdump --disassemble=__aeabi_dsub /home/alessandro/tesi/validation_working_area/taffo_benchmarks/bench_cholesky_core2_1_100_100.elf

/home/alessandro/tesi/validation_working_area/taffo_benchmarks/bench_cholesky_core2_1_100_100.elf:     file format elf32-littlearm


Disassembly of section .text:

08000688 <__aeabi_dsub>:
 8000688:       f083 4300       eor.w   r3, r3, #2147483648     @ 0x80000000

0800068c <__adddf3>:
 800068c:       b530            push    {r4, r5, lr}
 800068e:       ea4f 0441       mov.w   r4, r1, lsl #1
 8000692:       ea4f 0543       mov.w   r5, r3, lsl #1
 8000696:       ea94 0f05       teq     r4, r5
 800069a:       bf08            it      eq
 800069c:       ea90 0f02       teqeq   r0, r2
 80006a0:       bf1f            itttt   ne
 80006a2:       ea54 0c00       orrsne.w        ip, r4, r0
 80006a6:       ea55 0c02       orrsne.w        ip, r5, r2
 80006aa:       ea7f 5c64       mvnsne.w        ip, r4, asr #21
 80006ae:       ea7f 5c65       mvnsne.w        ip, r5, asr #21
 80006b2:       f000 80e2       beq.w   800087a <__adddf3+0x1ee>
 80006b6:       ea4f 5454       mov.w   r4, r4, lsr #21
 80006ba:       ebd4 5555       rsbs    r5, r4, r5, lsr #21
 80006be:       bfb8            it      lt
 80006c0:       426d            neglt   r5, r5
 80006c2:       dd0c            ble.n   80006de <__adddf3+0x52>
 80006c4:       442c            add     r4, r5
 80006c6:       ea80 0202       eor.w   r2, r0, r2
 80006ca:       ea81 0303       eor.w   r3, r1, r3
 80006ce:       ea82 0000       eor.w   r0, r2, r0
 80006d2:       ea83 0101       eor.w   r1, r3, r1
 80006d6:       ea80 0202       eor.w   r2, r0, r2
 80006da:       ea81 0303       eor.w   r3, r1, r3
 80006de:       2d36            cmp     r5, #54 @ 0x36
 80006e0:       bf88            it      hi
 80006e2:       bd30            pophi   {r4, r5, pc}
 80006e4:       f011 4f00       tst.w   r1, #2147483648 @ 0x80000000
 80006e8:       ea4f 3101       mov.w   r1, r1, lsl #12
 80006ec:       f44f 1c80       mov.w   ip, #1048576    @ 0x100000
 80006f0:       ea4c 3111       orr.w   r1, ip, r1, lsr #12
 80006f4:       d002            beq.n   80006fc <__adddf3+0x70>
 80006f6:       4240            negs    r0, r0
 80006f8:       eb61 0141       sbc.w   r1, r1, r1, lsl #1
 80006fc:       f013 4f00       tst.w   r3, #2147483648 @ 0x80000000
 8000700:       ea4f 3303       mov.w   r3, r3, lsl #12
 8000704:       ea4c 3313       orr.w   r3, ip, r3, lsr #12
 8000708:       d002            beq.n   8000710 <__adddf3+0x84>
 800070a:       4252            negs    r2, r2
 800070c:       eb63 0343       sbc.w   r3, r3, r3, lsl #1
 8000710:       ea94 0f05       teq     r4, r5
 8000714:       f000 80a7       beq.w   8000866 <__adddf3+0x1da>
 8000718:       f1a4 0401       sub.w   r4, r4, #1
 800071c:       f1d5 0e20       rsbs    lr, r5, #32
 8000720:       db0d            blt.n   800073e <__adddf3+0xb2>
 8000722:       fa02 fc0e       lsl.w   ip, r2, lr
 8000726:       fa22 f205       lsr.w   r2, r2, r5
 800072a:       1880            adds    r0, r0, r2
 800072c:       f141 0100       adc.w   r1, r1, #0
 8000730:       fa03 f20e       lsl.w   r2, r3, lr
 8000734:       1880            adds    r0, r0, r2
 8000736:       fa43 f305       asr.w   r3, r3, r5
 800073a:       4159            adcs    r1, r3
 800073c:       e00e            b.n     800075c <__adddf3+0xd0>
 800073e:       f1a5 0520       sub.w   r5, r5, #32
 8000742:       f10e 0e20       add.w   lr, lr, #32
 8000746:       2a01            cmp     r2, #1
 8000748:       fa03 fc0e       lsl.w   ip, r3, lr
 800074c:       bf28            it      cs
 800074e:       f04c 0c02       orrcs.w ip, ip, #2
 8000752:       fa43 f305       asr.w   r3, r3, r5
 8000756:       18c0            adds    r0, r0, r3
 8000758:       eb51 71e3       adcs.w  r1, r1, r3, asr #31
 800075c:       f001 4500       and.w   r5, r1, #2147483648     @ 0x80000000
 8000760:       d507            bpl.n   8000772 <__adddf3+0xe6>
 8000762:       f04f 0e00       mov.w   lr, #0
 8000766:       f1dc 0c00       rsbs    ip, ip, #0
 800076a:       eb7e 0000       sbcs.w  r0, lr, r0
 800076e:       eb6e 0101       sbc.w   r1, lr, r1
 8000772:       f5b1 1f80       cmp.w   r1, #1048576    @ 0x100000
 8000776:       d31b            bcc.n   80007b0 <__adddf3+0x124>
 8000778:       f5b1 1f00       cmp.w   r1, #2097152    @ 0x200000
 800077c:       d30c            bcc.n   8000798 <__adddf3+0x10c>
 800077e:       0849            lsrs    r1, r1, #1
 8000780:       ea5f 0030       movs.w  r0, r0, rrx
 8000784:       ea4f 0c3c       mov.w   ip, ip, rrx
 8000788:       f104 0401       add.w   r4, r4, #1
 800078c:       ea4f 5244       mov.w   r2, r4, lsl #21
 8000790:       f512 0f80       cmn.w   r2, #4194304    @ 0x400000
 8000794:       f080 809a       bcs.w   80008cc <__adddf3+0x240>
 8000798:       f1bc 4f00       cmp.w   ip, #2147483648 @ 0x80000000
 800079c:       bf08            it      eq
 800079e:       ea5f 0c50       movseq.w        ip, r0, lsr #1
 80007a2:       f150 0000       adcs.w  r0, r0, #0
 80007a6:       eb41 5104       adc.w   r1, r1, r4, lsl #20
 80007aa:       ea41 0105       orr.w   r1, r1, r5
 80007ae:       bd30            pop     {r4, r5, pc}
 80007b0:       ea5f 0c4c       movs.w  ip, ip, lsl #1
 80007b4:       4140            adcs    r0, r0
 80007b6:       eb41 0101       adc.w   r1, r1, r1
 80007ba:       3c01            subs    r4, #1
 80007bc:       bf28            it      cs
 80007be:       f5b1 1f80       cmpcs.w r1, #1048576    @ 0x100000
 80007c2:       d2e9            bcs.n   8000798 <__adddf3+0x10c>
 80007c4:       f091 0f00       teq     r1, #0
 80007c8:       bf04            itt     eq
 80007ca:       4601            moveq   r1, r0
 80007cc:       2000            moveq   r0, #0
 80007ce:       fab1 f381       clz     r3, r1
 80007d2:       bf08            it      eq
 80007d4:       3320            addeq   r3, #32
 80007d6:       f1a3 030b       sub.w   r3, r3, #11
 80007da:       f1b3 0220       subs.w  r2, r3, #32
 80007de:       da0c            bge.n   80007fa <__adddf3+0x16e>
 80007e0:       320c            adds    r2, #12
 80007e2:       dd08            ble.n   80007f6 <__adddf3+0x16a>
 80007e4:       f102 0c14       add.w   ip, r2, #20
 80007e8:       f1c2 020c       rsb     r2, r2, #12
 80007ec:       fa01 f00c       lsl.w   r0, r1, ip
 80007f0:       fa21 f102       lsr.w   r1, r1, r2
 80007f4:       e00c            b.n     8000810 <__adddf3+0x184>
 80007f6:       f102 0214       add.w   r2, r2, #20
 80007fa:       bfd8            it      le
 80007fc:       f1c2 0c20       rsble   ip, r2, #32
 8000800:       fa01 f102       lsl.w   r1, r1, r2
 8000804:       fa20 fc0c       lsr.w   ip, r0, ip
 8000808:       bfdc            itt     le
 800080a:       ea41 010c       orrle.w r1, r1, ip
 800080e:       4090            lslle   r0, r2
 8000810:       1ae4            subs    r4, r4, r3
 8000812:       bfa2            ittt    ge
 8000814:       eb01 5104       addge.w r1, r1, r4, lsl #20
 8000818:       4329            orrge   r1, r5
 800081a:       bd30            popge   {r4, r5, pc}
 800081c:       ea6f 0404       mvn.w   r4, r4
 8000820:       3c1f            subs    r4, #31
 8000822:       da1c            bge.n   800085e <__adddf3+0x1d2>
 8000824:       340c            adds    r4, #12
 8000826:       dc0e            bgt.n   8000846 <__adddf3+0x1ba>
 8000828:       f104 0414       add.w   r4, r4, #20
 800082c:       f1c4 0220       rsb     r2, r4, #32
 8000830:       fa20 f004       lsr.w   r0, r0, r4
 8000834:       fa01 f302       lsl.w   r3, r1, r2
 8000838:       ea40 0003       orr.w   r0, r0, r3
 800083c:       fa21 f304       lsr.w   r3, r1, r4
 8000840:       ea45 0103       orr.w   r1, r5, r3
 8000844:       bd30            pop     {r4, r5, pc}
 8000846:       f1c4 040c       rsb     r4, r4, #12
 800084a:       f1c4 0220       rsb     r2, r4, #32
 800084e:       fa20 f002       lsr.w   r0, r0, r2
 8000852:       fa01 f304       lsl.w   r3, r1, r4
 8000856:       ea40 0003       orr.w   r0, r0, r3
 800085a:       4629            mov     r1, r5
 800085c:       bd30            pop     {r4, r5, pc}
 800085e:       fa21 f004       lsr.w   r0, r1, r4
 8000862:       4629            mov     r1, r5
 8000864:       bd30            pop     {r4, r5, pc}
 8000866:       f094 0f00       teq     r4, #0
 800086a:       f483 1380       eor.w   r3, r3, #1048576        @ 0x100000
 800086e:       bf06            itte    eq
 8000870:       f481 1180       eoreq.w r1, r1, #1048576        @ 0x100000
 8000874:       3401            addeq   r4, #1
 8000876:       3d01            subne   r5, #1
 8000878:       e74e            b.n     8000718 <__adddf3+0x8c>
 800087a:       ea7f 5c64       mvns.w  ip, r4, asr #21
 800087e:       bf18            it      ne
 8000880:       ea7f 5c65       mvnsne.w        ip, r5, asr #21
 8000884:       d029            beq.n   80008da <__adddf3+0x24e>
 8000886:       ea94 0f05       teq     r4, r5
 800088a:       bf08            it      eq
 800088c:       ea90 0f02       teqeq   r0, r2
 8000890:       d005            beq.n   800089e <__adddf3+0x212>
 8000892:       ea54 0c00       orrs.w  ip, r4, r0
 8000896:       bf04            itt     eq
 8000898:       4619            moveq   r1, r3
 800089a:       4610            moveq   r0, r2
 800089c:       bd30            pop     {r4, r5, pc}
 800089e:       ea91 0f03       teq     r1, r3
 80008a2:       bf1e            ittt    ne
 80008a4:       2100            movne   r1, #0
 80008a6:       2000            movne   r0, #0
 80008a8:       bd30            popne   {r4, r5, pc}
 80008aa:       ea5f 5c54       movs.w  ip, r4, lsr #21
 80008ae:       d105            bne.n   80008bc <__adddf3+0x230>
 80008b0:       0040            lsls    r0, r0, #1
 80008b2:       4149            adcs    r1, r1
 80008b4:       bf28            it      cs
 80008b6:       f041 4100       orrcs.w r1, r1, #2147483648     @ 0x80000000
 80008ba:       bd30            pop     {r4, r5, pc}
 80008bc:       f514 0480       adds.w  r4, r4, #4194304        @ 0x400000
 80008c0:       bf3c            itt     cc
 80008c2:       f501 1180       addcc.w r1, r1, #1048576        @ 0x100000
 80008c6:       bd30            popcc   {r4, r5, pc}
 80008c8:       f001 4500       and.w   r5, r1, #2147483648     @ 0x80000000
 80008cc:       f045 41fe       orr.w   r1, r5, #2130706432     @ 0x7f000000
 80008d0:       f441 0170       orr.w   r1, r1, #15728640       @ 0xf00000
 80008d4:       f04f 0000       mov.w   r0, #0
 80008d8:       bd30            pop     {r4, r5, pc}
 80008da:       ea7f 5c64       mvns.w  ip, r4, asr #21
 80008de:       bf1a            itte    ne
 80008e0:       4619            movne   r1, r3
 80008e2:       4610            movne   r0, r2
 80008e4:       ea7f 5c65       mvnseq.w        ip, r5, asr #21
 80008e8:       bf1c            itt     ne
 80008ea:       460b            movne   r3, r1
 80008ec:       4602            movne   r2, r0
 80008ee:       ea50 3401       orrs.w  r4, r0, r1, lsl #12
 80008f2:       bf06            itte    eq
 80008f4:       ea52 3503       orrseq.w        r5, r2, r3, lsl #12
 80008f8:       ea91 0f03       teqeq   r1, r3
 80008fc:       f441 2100       orrne.w r1, r1, #524288 @ 0x80000
 8000900:       bd30            pop     {r4, r5, pc}

如您所见,

objdump
认为函数
__aeabi_dsub
__adddf3
启动时不会结束,并且(错误地)将后者包含在反汇编中。基本上,我最终会包含两次
__adddf3

  1. 为什么
    objdump
    会这样做?
  2. 如何让它停在函数标签边界处?文档不是很清楚。

谢谢!


编辑:我的意思是我希望

objdump
停在下一个标签,根据 Michael Kerrisk 的手册页

这应该是默认行为
       -d
       --disassemble
       --disassemble=symbol
           Display the assembler mnemonics for the machine instructions
           from the input file.  This option only disassembles those
           sections which are expected to contain instructions.  If the
           optional symbol argument is given, then display the assembler
           mnemonics starting at symbol.  If symbol is a function name
           then disassembly will stop at the end of the function,
           otherwise it will stop when the next symbol is encountered.
           If there are no matches for symbol then nothing will be
           displayed.

不管标签是否对应于实际的函数,为了我正在做的分析的目的,我有兴趣跟踪这些代码片段的调用关系,假设它们表现为函数。

编辑2:用GDB反汇编,我明白了:

[alessandro@commodoroII src]$ arm-none-eabi-gdb -batch -ex 'file /home/alessandro/tesi/validation_working_area/taffo_benchmarks/bench_cholesky_core2_1_100_100.elf' -ex 'disassemble __aeabi_dsub'
Dump of assembler code for function __aeabi_dsub:
   0x08000689 <-1>:     eor.w   r3, r3, #2147483648     @ 0x80000000
   0x0800068d <-1>:     push    {r4, r5, lr}
   0x0800068f <+1>:     mov.w   r4, r1, lsl #1
   0x08000693 <+5>:     mov.w   r5, r3, lsl #1
   0x08000697 <+9>:     teq     r4, r5
   0x0800069b <+13>:    it      eq
   0x0800069d <+15>:    teqeq   r0, r2
   0x080006a1 <+19>:    itttt   ne
   0x080006a3 <+21>:    orrsne.w        r12, r4, r0
   0x080006a7 <+25>:    orrsne.w        r12, r5, r2
   0x080006ab <+29>:    mvnsne.w        r12, r4, asr #21
   0x080006af <+33>:    mvnsne.w        r12, r5, asr #21
   0x080006b3 <+37>:    beq.w   0x800087a <__aeabi_dadd+493>
   0x080006b7 <+41>:    mov.w   r4, r4, lsr #21
   0x080006bb <+45>:    rsbs    r5, r4, r5, lsr #21
   0x080006bf <+49>:    it      lt
   0x080006c1 <+51>:    neglt   r5, r5
   0x080006c3 <+53>:    ble.n   0x80006de <__aeabi_dadd+81>
   0x080006c5 <+55>:    add     r4, r5
   0x080006c7 <+57>:    eor.w   r2, r0, r2
   0x080006cb <+61>:    eor.w   r3, r1, r3
   0x080006cf <+65>:    eor.w   r0, r2, r0
   0x080006d3 <+69>:    eor.w   r1, r3, r1
   0x080006d7 <+73>:    eor.w   r2, r0, r2
   0x080006db <+77>:    eor.w   r3, r1, r3
   0x080006df <+81>:    cmp     r5, #54 @ 0x36
   0x080006e1 <+83>:    it      hi
   0x080006e3 <+85>:    pophi   {r4, r5, pc}
   0x080006e5 <+87>:    tst.w   r1, #2147483648 @ 0x80000000
   0x080006e9 <+91>:    mov.w   r1, r1, lsl #12
   0x080006ed <+95>:    mov.w   r12, #1048576   @ 0x100000
   0x080006f1 <+99>:    orr.w   r1, r12, r1, lsr #12
   0x080006f5 <+103>:   beq.n   0x80006fc <__aeabi_dadd+111>
   0x080006f7 <+105>:   negs    r0, r0
   0x080006f9 <+107>:   sbc.w   r1, r1, r1, lsl #1
   0x080006fd <+111>:   tst.w   r3, #2147483648 @ 0x80000000
   0x08000701 <+115>:   mov.w   r3, r3, lsl #12
   0x08000705 <+119>:   orr.w   r3, r12, r3, lsr #12
   0x08000709 <+123>:   beq.n   0x8000710 <__aeabi_dadd+131>
   0x0800070b <+125>:   negs    r2, r2
   0x0800070d <+127>:   sbc.w   r3, r3, r3, lsl #1
   0x08000711 <+131>:   teq     r4, r5
   0x08000715 <+135>:   beq.w   0x8000866 <__aeabi_dadd+473>
   0x08000719 <+139>:   sub.w   r4, r4, #1
   0x0800071d <+143>:   rsbs    lr, r5, #32
   0x08000721 <+147>:   blt.n   0x800073e <__aeabi_dadd+177>
   0x08000723 <+149>:   lsl.w   r12, r2, lr
   0x08000727 <+153>:   lsr.w   r2, r2, r5
   0x0800072b <+157>:   adds    r0, r0, r2
   0x0800072d <+159>:   adc.w   r1, r1, #0
   0x08000731 <+163>:   lsl.w   r2, r3, lr
   0x08000735 <+167>:   adds    r0, r0, r2
   0x08000737 <+169>:   asr.w   r3, r3, r5
   0x0800073b <+173>:   adcs    r1, r3
   0x0800073d <+175>:   b.n     0x800075c <__aeabi_dadd+207>
   0x0800073f <+177>:   sub.w   r5, r5, #32
   0x08000743 <+181>:   add.w   lr, lr, #32
   0x08000747 <+185>:   cmp     r2, #1
   0x08000749 <+187>:   lsl.w   r12, r3, lr
   0x0800074d <+191>:   it      cs
   0x0800074f <+193>:   orrcs.w r12, r12, #2
   0x08000753 <+197>:   asr.w   r3, r3, r5
   0x08000757 <+201>:   adds    r0, r0, r3
   0x08000759 <+203>:   adcs.w  r1, r1, r3, asr #31
   0x0800075d <+207>:   and.w   r5, r1, #2147483648     @ 0x80000000
   0x08000761 <+211>:   bpl.n   0x8000772 <__aeabi_dadd+229>
   0x08000763 <+213>:   mov.w   lr, #0
   0x08000767 <+217>:   rsbs    r12, r12, #0
   0x0800076b <+221>:   sbcs.w  r0, lr, r0
   0x0800076f <+225>:   sbc.w   r1, lr, r1
   0x08000773 <+229>:   cmp.w   r1, #1048576    @ 0x100000
   0x08000777 <+233>:   bcc.n   0x80007b0 <__aeabi_dadd+291>
   0x08000779 <+235>:   cmp.w   r1, #2097152    @ 0x200000
   0x0800077d <+239>:   bcc.n   0x8000798 <__aeabi_dadd+267>
   0x0800077f <+241>:   lsrs    r1, r1, #1
   0x08000781 <+243>:   movs.w  r0, r0, rrx
   0x08000785 <+247>:   mov.w   r12, r12, rrx
   0x08000789 <+251>:   add.w   r4, r4, #1
   0x0800078d <+255>:   mov.w   r2, r4, lsl #21
   0x08000791 <+259>:   cmn.w   r2, #4194304    @ 0x400000
   0x08000795 <+263>:   bcs.w   0x80008cc <__aeabi_dadd+575>
   0x08000799 <+267>:   cmp.w   r12, #2147483648        @ 0x80000000
   0x0800079d <+271>:   it      eq
   0x0800079f <+273>:   movseq.w        r12, r0, lsr #1
   0x080007a3 <+277>:   adcs.w  r0, r0, #0
   0x080007a7 <+281>:   adc.w   r1, r1, r4, lsl #20
   0x080007ab <+285>:   orr.w   r1, r1, r5
   0x080007af <+289>:   pop     {r4, r5, pc}
   0x080007b1 <+291>:   movs.w  r12, r12, lsl #1
   0x080007b5 <+295>:   adcs    r0, r0
   0x080007b7 <+297>:   adc.w   r1, r1, r1
   0x080007bb <+301>:   subs    r4, #1
   0x080007bd <+303>:   it      cs
   0x080007bf <+305>:   cmpcs.w r1, #1048576    @ 0x100000
   0x080007c3 <+309>:   bcs.n   0x8000798 <__aeabi_dadd+267>
   0x080007c5 <+311>:   teq     r1, #0
   0x080007c9 <+315>:   itt     eq
   0x080007cb <+317>:   moveq   r1, r0
   0x080007cd <+319>:   moveq   r0, #0
   0x080007cf <+321>:   clz     r3, r1
   0x080007d3 <+325>:   it      eq
   0x080007d5 <+327>:   addeq   r3, #32
   0x080007d7 <+329>:   sub.w   r3, r3, #11
   0x080007db <+333>:   subs.w  r2, r3, #32
   0x080007df <+337>:   bge.n   0x80007fa <__aeabi_dadd+365>
   0x080007e1 <+339>:   adds    r2, #12
   0x080007e3 <+341>:   ble.n   0x80007f6 <__aeabi_dadd+361>
   0x080007e5 <+343>:   add.w   r12, r2, #20
   0x080007e9 <+347>:   rsb     r2, r2, #12
   0x080007ed <+351>:   lsl.w   r0, r1, r12
   0x080007f1 <+355>:   lsr.w   r1, r1, r2
   0x080007f5 <+359>:   b.n     0x8000810 <__aeabi_dadd+387>
   0x080007f7 <+361>:   add.w   r2, r2, #20
   0x080007fb <+365>:   it      le
   0x080007fd <+367>:   rsble   r12, r2, #32
   0x08000801 <+371>:   lsl.w   r1, r1, r2
   0x08000805 <+375>:   lsr.w   r12, r0, r12
   0x08000809 <+379>:   itt     le
   0x0800080b <+381>:   orrle.w r1, r1, r12
   0x0800080f <+385>:   lslle   r0, r2
   0x08000811 <+387>:   subs    r4, r4, r3
   0x08000813 <+389>:   ittt    ge
   0x08000815 <+391>:   addge.w r1, r1, r4, lsl #20
   0x08000819 <+395>:   orrge   r1, r5
   0x0800081b <+397>:   popge   {r4, r5, pc}
   0x0800081d <+399>:   mvn.w   r4, r4
   0x08000821 <+403>:   subs    r4, #31
   0x08000823 <+405>:   bge.n   0x800085e <__aeabi_dadd+465>
   0x08000825 <+407>:   adds    r4, #12
   0x08000827 <+409>:   bgt.n   0x8000846 <__aeabi_dadd+441>
   0x08000829 <+411>:   add.w   r4, r4, #20
   0x0800082d <+415>:   rsb     r2, r4, #32
   0x08000831 <+419>:   lsr.w   r0, r0, r4
   0x08000835 <+423>:   lsl.w   r3, r1, r2
   0x08000839 <+427>:   orr.w   r0, r0, r3
   0x0800083d <+431>:   lsr.w   r3, r1, r4
   0x08000841 <+435>:   orr.w   r1, r5, r3
   0x08000845 <+439>:   pop     {r4, r5, pc}
   0x08000847 <+441>:   rsb     r4, r4, #12
   0x0800084b <+445>:   rsb     r2, r4, #32
   0x0800084f <+449>:   lsr.w   r0, r0, r2
   0x08000853 <+453>:   lsl.w   r3, r1, r4
   0x08000857 <+457>:   orr.w   r0, r0, r3
   0x0800085b <+461>:   mov     r1, r5
   0x0800085d <+463>:   pop     {r4, r5, pc}
   0x0800085f <+465>:   lsr.w   r0, r1, r4
   0x08000863 <+469>:   mov     r1, r5
   0x08000865 <+471>:   pop     {r4, r5, pc}
   0x08000867 <+473>:   teq     r4, #0
   0x0800086b <+477>:   eor.w   r3, r3, #1048576        @ 0x100000
   0x0800086f <+481>:   itte    eq
   0x08000871 <+483>:   eoreq.w r1, r1, #1048576        @ 0x100000
   0x08000875 <+487>:   addeq   r4, #1
   0x08000877 <+489>:   subne   r5, #1
   0x08000879 <+491>:   b.n     0x8000718 <__aeabi_dadd+139>
   0x0800087b <+493>:   mvns.w  r12, r4, asr #21
   0x0800087f <+497>:   it      ne
   0x08000881 <+499>:   mvnsne.w        r12, r5, asr #21
   0x08000885 <+503>:   beq.n   0x80008da <__aeabi_dadd+589>
   0x08000887 <+505>:   teq     r4, r5
   0x0800088b <+509>:   it      eq
   0x0800088d <+511>:   teqeq   r0, r2
   0x08000891 <+515>:   beq.n   0x800089e <__aeabi_dadd+529>
   0x08000893 <+517>:   orrs.w  r12, r4, r0
   0x08000897 <+521>:   itt     eq
   0x08000899 <+523>:   moveq   r1, r3
   0x0800089b <+525>:   moveq   r0, r2
   0x0800089d <+527>:   pop     {r4, r5, pc}
   0x0800089f <+529>:   teq     r1, r3
   0x080008a3 <+533>:   ittt    ne
   0x080008a5 <+535>:   movne   r1, #0
   0x080008a7 <+537>:   movne   r0, #0
   0x080008a9 <+539>:   popne   {r4, r5, pc}
   0x080008ab <+541>:   movs.w  r12, r4, lsr #21
   0x080008af <+545>:   bne.n   0x80008bc <__aeabi_dadd+559>
   0x080008b1 <+547>:   lsls    r0, r0, #1
   0x080008b3 <+549>:   adcs    r1, r1
   0x080008b5 <+551>:   it      cs
   0x080008b7 <+553>:   orrcs.w r1, r1, #2147483648     @ 0x80000000
   0x080008bb <+557>:   pop     {r4, r5, pc}
   0x080008bd <+559>:   adds.w  r4, r4, #4194304        @ 0x400000
   0x080008c1 <+563>:   itt     cc
   0x080008c3 <+565>:   addcc.w r1, r1, #1048576        @ 0x100000
   0x080008c7 <+569>:   popcc   {r4, r5, pc}
   0x080008c9 <+571>:   and.w   r5, r1, #2147483648     @ 0x80000000
   0x080008cd <+575>:   orr.w   r1, r5, #2130706432     @ 0x7f000000
   0x080008d1 <+579>:   orr.w   r1, r1, #15728640       @ 0xf00000
   0x080008d5 <+583>:   mov.w   r0, #0
   0x080008d9 <+587>:   pop     {r4, r5, pc}
   0x080008db <+589>:   mvns.w  r12, r4, asr #21
   0x080008df <+593>:   itte    ne
   0x080008e1 <+595>:   movne   r1, r3
   0x080008e3 <+597>:   movne   r0, r2
   0x080008e5 <+599>:   mvnseq.w        r12, r5, asr #21
   0x080008e9 <+603>:   itt     ne
   0x080008eb <+605>:   movne   r3, r1
   0x080008ed <+607>:   movne   r2, r0
   0x080008ef <+609>:   orrs.w  r4, r0, r1, lsl #12
   0x080008f3 <+613>:   itte    eq
   0x080008f5 <+615>:   orrseq.w        r5, r2, r3, lsl #12
   0x080008f9 <+619>:   teqeq   r1, r3
   0x080008fd <+623>:   orrne.w r1, r1, #524288 @ 0x80000
   0x08000901 <+627>:   pop     {r4, r5, pc}
End of assembler dump.

其中列出的第一条指令与符号 (?) 的偏移量为负值

arm disassembly objdump
© www.soinside.com 2019 - 2024. All rights reserved.