[llvm-objdump] Dump inline relocations if the relocated section is specified with...
authorFangrui Song <maskray@google.com>
Wed, 22 May 2019 15:12:51 +0000 (15:12 +0000)
committerFangrui Song <maskray@google.com>
Wed, 22 May 2019 15:12:51 +0000 (15:12 +0000)
commitc289d218b9fa9c78e7ae631208a8b06663dd803d
tree9a5e24805ede962f9ddc3ff9fcd34e93b88d8b49
parent74b791b4f721ff17ffbf9322aa6f47e2f3cca0dc
[llvm-objdump] Dump inline relocations if the relocated section is specified with --section

This fixes PR41886: llvm-objdump -d -r -j .text doesn't show inline relocations of .text

While here, switch to stable_sort() because we don't want to change the order of relocations applied to the same location. gABI says consecutive relocation records are composed together and their order matters. In practise it is difficult to see relocations applied to the same location not consecutive, we just have to keep the relative order of relocations with the same offset.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D62253

llvm-svn: 361395
llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test
llvm/tools/llvm-objdump/llvm-objdump.cpp