[PATCH] D77580: [llvm-objdump] Fix incomplete relocation output for -D -r mode
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 08:39:48 PDT 2020
hubert.reinterpretcast 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:
> 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?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77580/new/
https://reviews.llvm.org/D77580
More information about the llvm-commits
mailing list