[PATCH] D77580: [llvm-objdump] Fix incomplete relocation output for -D -r mode

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 11:23:18 PDT 2020


jasonliu marked 2 inline comments as done.
jasonliu added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1589
             // Stop when RelCur's offset is past the current instruction.
             if (Offset >= Index + Size)
               break;
----------------
hubert.reinterpretcast wrote:
> hubert.reinterpretcast wrote:
> > I think XCOFF32 is working because the pointer length is the same as the instruction length?
> This was mainly a comment about how the output would be displayed. The status quo (relocation prints "in the middle") felt weird to me, but I have now found that it matches the binutils `objdump` output.
> ```
> 00000000000000c8 <main>:
>   c8:   00 00 00 00     .long 0x0
>                         c8: R_POS_64    .main
>   cc:   00 00 00 00     .long 0x0
> ```
> 
> Should we add a comment that this checks only the start of the relocation (and not its end) on purpose?
Thanks. Comment added. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77580/new/

https://reviews.llvm.org/D77580





More information about the llvm-commits mailing list