[PATCH] D56726: Include section start address when dumping hexadecimal output of a section, -x option.q

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 16 01:37:30 PST 2019


jhenderson accepted this revision.
jhenderson added a comment.

LGTM, with a couple of minor nits in the test. I assume `Section.getAddress()` returns 0 for sections in an ET_REL file?

I wonder if there could be some use-case for the old behaviour, i.e. to know the offset of data within a section?



================
Comment at: test/tools/llvm-readobj/hexdump.test:1
+// Check dumping of the hexadecimal bytes of a section
+RUN: llvm-readobj -x .text %p/../../Object/Inputs/hello-world.elf-x86-64 | FileCheck %s
----------------
Nit: full stop.


================
Comment at: test/tools/llvm-readobj/hexdump.test:5
+CHECK: Hex dump of section '.text':
+CHECK-NEXT: 0x00400460
+
----------------
Start this with {{^}}, to avoid it matching anything else on the line by accident.


================
Comment at: test/tools/llvm-readobj/hexdump.test:6
+CHECK-NEXT: 0x00400460
+
----------------
Nit: unnecessary trailing blank line.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56726





More information about the llvm-commits mailing list