[PATCH] D62253: [objdump] Dump inline relocations if the relocated section is specified with --section

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 07:52:29 PDT 2019


jhenderson added inline comments.


================
Comment at: test/tools/llvm-objdump/X86/section-filter-relocs.test:15-22
 ## Show that only the specified relocation sections that patch the
 ## disassembled sections are dumped.
-# RUN: llvm-objdump -d -r %t.o --section=.text \
-# RUN:                         --section=.rela.text --section=.rela.text2 \
-# RUN:   | FileCheck %s --check-prefixes=DISASM,RELOC --implicit-check-not=.text2 \
+# RUN: llvm-objdump -d %t.o --section=.text \
+# RUN:   | FileCheck %s --check-prefixes=DISASM --implicit-check-not=.text2 \
 # RUN:           --implicit-check-not=R_X86_64
+#
+# RUN: llvm-objdump -d -r %t.o --section=.text \
----------------
With the behaviour change, I'm not sure you need all of this, because it's covered by the case on line 11. The purpose of this was mostly to show that -j limited which relocations were printed to the specified relocation sections. What do you think?


================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:932
       V.push_back(R);
-    // Sort relocations by address.
     llvm::sort(V, isRelocAddressLess);
   }
----------------
grimar wrote:
> This part contains unneseccary variable renamings and also a comment removal.
> I would keep the old style.
I'm actually okay with the RelSec -> Relocated name as it is easier to follow, and don't mind it changing.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62253





More information about the llvm-commits mailing list