[LLVMdev] llvm-objdump disassembling jmp

Stephen Checkoway s at pahtak.org
Thu Oct 17 07:55:33 PDT 2013


In creating a test case for a bug fix in llvm-objdump, I noticed that it differs in its output of pc-relative immediates from objdump:

[secdev:/tmp] s$ cat a.s
main:
        jmp .LBL0
.LBL0:
        ret
[secdev:/tmp] s$ llvm-mc -filetype=obj a.s > a.o
[secdev:/tmp] s$ objdump -d a.o |tail -n 2
   0:   eb 00                   jmp    2 <main+0x2>
   2:   c3                      retq
[secdev:/tmp] s$ llvm-objdump -d a.o |tail -n 2
       0:       eb 00                                           jmp     0
       2:       c3                                              ret

Is this intended behavior?

As an aside, obj2yaml can't handle this object file:
[secdev:/tmp] s$ ~/build-master/bin/obj2yaml a.o
LLVM ERROR: The end of the file was unexpectedly encountered

-- 
Stephen Checkoway









More information about the llvm-dev mailing list