[PATCH] D57365: [llvm-readobj] Add a flag to dump just the section-to-segment mapping.
Matt Davis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 18:18:41 PST 2019
mattd updated this revision to Diff 184227.
mattd marked an inline comment as done.
mattd added a comment.
Thanks for the feedback, and my apologies for not originally providing as thorough of
testing as I should have.
This updated patch introduces the `-section-mapping` flag which can safely
operate (e.g., no duplicate mappings displayed) with `-program-headers`.
I've modified the tests to ELF64 in `llvm/test/tools/llvm-readobj/gnu-phdrs.test`
such that they are specialized on both the program headers and the section mapping.
This allows us to reuse some of the existing test output. I realize that the order of the prefixes is not
respected when using FileCheck's -check-prefixes; however, the
initial ELF test does recognize order as it only has one FileCheck prefix.
Added tests:
1 Check that `llvm-readobj -program-headers` generates the same output as
`llvm-readelf -program-headers`. Similar, `-section-mapping -program-headers` also
produces the same output as `-program-headers`
2 Check that `-section-mapping` and `-program-headers` observes the correct
order (display the headers followed by the section mapping).
3 Check that specifying `-section-mapping` only produces the mapping.
4 Check that specifying `-section-mapping=false -program-headers ` only
produces the headers.
5 Check that only a single copy of the mapping table is produced when
combining `-section-mapping` and `-program-headers` options.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57365/new/
https://reviews.llvm.org/D57365
Files:
llvm/test/tools/llvm-readobj/gnu-phdrs.test
llvm/tools/llvm-readobj/ELFDumper.cpp
llvm/tools/llvm-readobj/ObjDumper.h
llvm/tools/llvm-readobj/llvm-readobj.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57365.184227.patch
Type: text/x-patch
Size: 12885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190130/b79ac94d/attachment.bin>
More information about the llvm-commits
mailing list