#
312c4a6e |
| 17-Oct-2019 |
Hans Wennborg <hans@hanshq.net> |
Revert r374931 "[llvm-objdump] Use a counter for llvm-objdump -h instead of the section index."
This broke llvm-objdump in 32-bit builds, see e.g. http://lab.llvm.org:8011/builders/clang-cmake-armv7
Revert r374931 "[llvm-objdump] Use a counter for llvm-objdump -h instead of the section index."
This broke llvm-objdump in 32-bit builds, see e.g. http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10925
> Summary: > When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF). > > While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped. > > Reviewers: grimar, jhenderson, espindola > > Reviewed By: grimar > > Subscribers: emaste, sbc100, arichardson, aheejin, arphaman, seiya, llvm-commits, MaskRay > > Tags: #llvm > > Differential Revision: https://reviews.llvm.org/D68848
llvm-svn: 375088
show more ...
|
#
eb501b1f |
| 15-Oct-2019 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
Summary: When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g
[llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
Summary: When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF).
While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped.
Reviewers: grimar, jhenderson, espindola
Reviewed By: grimar
Subscribers: emaste, sbc100, arichardson, aheejin, arphaman, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68848
llvm-svn: 374931
show more ...
|
#
c526ff8a |
| 14-Oct-2019 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objdump] Adjust spacing and field width for --section-headers
Summary: - Expand the "Name" column past 13 characters when any of the section names are longer. Current behavior is a staggard ou
[llvm-objdump] Adjust spacing and field width for --section-headers
Summary: - Expand the "Name" column past 13 characters when any of the section names are longer. Current behavior is a staggard output instead of a nice table if a single name is longer. - Only print the required number of hex chars for addresses (i.e. 8 characters for 32-bit, 16 characters for 64-bit) - Fix trailing spaces
Reviewers: grimar, jhenderson, espindola
Reviewed By: grimar
Subscribers: emaste, sbc100, arichardson, aheejin, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68730
llvm-svn: 374795
show more ...
|
#
9d4a6b1b |
| 03-Oct-2019 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary: rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some mor
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary: rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump: * Archive headers * File headers * Section headers * Symbol table * Dwarf debugging * Relocations (if `--disassemble` is not used) * Section contents * Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6 |
|
#
d7069083 |
| 13-Sep-2019 |
George Rimar <grimar@accesssoftek.com> |
[llvm-objdump] Fix llvm-objdump --all-headers output order
Patch by Justice Adams!
Made llvm-objdump --all-headers output match the order of GNU objdump for compatibility reasons.
Old order of the
[llvm-objdump] Fix llvm-objdump --all-headers output order
Patch by Justice Adams!
Made llvm-objdump --all-headers output match the order of GNU objdump for compatibility reasons.
Old order of the headers output: * file header * section header table * symbol table * program header table * dynamic section
New order of the headers output (GNU compatible): * file header information * program header table * dynamic section * section header table * symbol table
(Relevant BugZilla Bug: https://bugs.llvm.org/show_bug.cgi?id=41830)
Differential revision: https://reviews.llvm.org/D67357
llvm-svn: 371826
show more ...
|
Revision tags: llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3 |
|
#
dd591bde |
| 27-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
[llvm-objdump] - Remove one overload of reportError. NFCI.
There is a problem with reportError we have. Declaration says we have ArchiveName that follows the FileName:
reportError(Error E, StringRe
[llvm-objdump] - Remove one overload of reportError. NFCI.
There is a problem with reportError we have. Declaration says we have ArchiveName that follows the FileName:
reportError(Error E, StringRef FileName, StringRef ArchiveName,...
Though implementation have them reversed. I cleaned it up and removed an excessive reportError(Error E, StringRef File) version.
Rebased on top of D66418.
Differential revision: https://reviews.llvm.org/D66517
llvm-svn: 370034
show more ...
|
#
f0f38d9b |
| 21-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
[llvm-objdump] - Cleanup the error reporting.
The error reporting function are not consistent.
Before this change:
* They had inconsistent naming (e.g. 'error' vs 'report_error'). * Some of them r
[llvm-objdump] - Cleanup the error reporting.
The error reporting function are not consistent.
Before this change:
* They had inconsistent naming (e.g. 'error' vs 'report_error'). * Some of them reported the object name, others - dont. * Some of them accepted the case when there was no error. (i.e. error code or Error had a success value).
This patch tries to cleanup it a bit.
It also renames report_error -> reportError, report_warning -> reportWarning and removes a full stop from messages.
Differential revision: https://reviews.llvm.org/D66418
llvm-svn: 369515
show more ...
|
#
b232d564 |
| 20-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
[llvm-objdump] - Remove one of `report_error` functions and improve the error reporting.
One of the report_error functions was taking object::Archive::Child as an argument. It feels excessive, this
[llvm-objdump] - Remove one of `report_error` functions and improve the error reporting.
One of the report_error functions was taking object::Archive::Child as an argument. It feels excessive, this patch removes it and introduce a helper function instead. Also I fixed a "TODO" in this patch what improved the message printed.
Differential revision: https://reviews.llvm.org/D66468
llvm-svn: 369382
show more ...
|
#
9abf668c |
| 15-Aug-2019 |
Michael Pozulp <pozulp.llvm@gmail.com> |
[llvm-objdump] Add warning messages if disassembly + source for problematic inputs
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905
Reviewers: jhenderson, rupprecht, grimar
Reviewed
[llvm-objdump] Add warning messages if disassembly + source for problematic inputs
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905
Reviewers: jhenderson, rupprecht, grimar
Reviewed By: jhenderson, grimar
Subscribers: RKSimon, MaskRay, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62462
llvm-svn: 368963
show more ...
|
#
bcc00e1a |
| 14-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
Changes: no changes. A fix for the clang code will be landed right on top.
Original commit message:
SectionRef
Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
Changes: no changes. A fix for the clang code will be landed right on top.
Original commit message:
SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits.
For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.)
This patch makes a change for all users to switch to Expected<> version.
Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them).
Differential revision: https://reviews.llvm.org/D66089
llvm-svn: 368826
show more ...
|
#
468919e1 |
| 14-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
Revert r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>"
It broke clang BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16455
llvm-svn: 368813
|
#
a0c6a357 |
| 14-Aug-2019 |
George Rimar <grimar@accesssoftek.com> |
[llvm/Object] - Convert SectionRef::getName() to return Expected<>
SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits.
For example, it forces user
[llvm/Object] - Convert SectionRef::getName() to return Expected<>
SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits.
For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.)
This patch makes a change for all users to switch to Expected<> version.
Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them).
Differential revision: https://reviews.llvm.org/D66089
llvm-svn: 368812
show more ...
|
Revision tags: llvmorg-9.0.0-rc2 |
|
#
3046ef5c |
| 05-Aug-2019 |
Michael Pozulp <pozulp.llvm@gmail.com> |
Revert "[llvm-objdump] Re-commit r367284."
This reverts r367776 (git commit d34099926e909390cb0254bebb4b7f5cf15467c7). My changes to llvm-objdump tests caused them to fail on windows: http://lab.llv
Revert "[llvm-objdump] Re-commit r367284."
This reverts r367776 (git commit d34099926e909390cb0254bebb4b7f5cf15467c7). My changes to llvm-objdump tests caused them to fail on windows: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/27368
llvm-svn: 367816
show more ...
|
#
d3409992 |
| 04-Aug-2019 |
Michael Pozulp <pozulp.llvm@gmail.com> |
[llvm-objdump] Re-commit r367284.
Add warning messages if disassembly + source for problematic inputs
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905
Reviewers: jhenderson, rupprech
[llvm-objdump] Re-commit r367284.
Add warning messages if disassembly + source for problematic inputs
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905
Reviewers: jhenderson, rupprecht, grimar
Reviewed By: jhenderson, grimar
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62462
llvm-svn: 367776
show more ...
|
#
074db9b8 |
| 30-Jul-2019 |
Michael Pozulp <pozulp.llvm@gmail.com> |
Revert "[llvm-objdump] Add warning messages if disassembly + source for problematic inputs"
This reverts r367284 (git commit b1cbe51bdf44098c74f5c74b7bcd8c041a7c6772). My changes to LLVMSymbolizer c
Revert "[llvm-objdump] Add warning messages if disassembly + source for problematic inputs"
This reverts r367284 (git commit b1cbe51bdf44098c74f5c74b7bcd8c041a7c6772). My changes to LLVMSymbolizer caused a test to fail: http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29488
llvm-svn: 367286
show more ...
|
#
b1cbe51b |
| 30-Jul-2019 |
Michael Pozulp <pozulp.llvm@gmail.com> |
[llvm-objdump] Add warning messages if disassembly + source for problematic inputs
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905
Reviewers: jhenderson, rupprecht, grimar
Reviewed
[llvm-objdump] Add warning messages if disassembly + source for problematic inputs
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905
Reviewers: jhenderson, rupprecht, grimar
Reviewed By: jhenderson, grimar
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62462
llvm-svn: 367284
show more ...
|
Revision tags: llvmorg-9.0.0-rc1 |
|
#
d5177643 |
| 25-Jul-2019 |
Seiya Nuta <nuta@seiya.me> |
[llvm-objdump][NFC] Make the PrettyPrinter::printInst() output buffered
Summary: Every time PrettyPrinter::printInst is called, stdout is flushed and it makes llvm-objdump slow. This patches adds a
[llvm-objdump][NFC] Make the PrettyPrinter::printInst() output buffered
Summary: Every time PrettyPrinter::printInst is called, stdout is flushed and it makes llvm-objdump slow. This patches adds a string buffer to prevent stdout from being flushed.
Benchmark results (./llvm-objdump-master: without this patch, ./bin/llvm-objcopy: with this patch):
$ hyperfine --warmup 10 './llvm-objdump-master -d ./bin/llvm-objcopy' './bin/llvm-objdump -d ./bin/llvm-objcopy' Benchmark #1: ./llvm-objdump-master -d ./bin/llvm-objcopy Time (mean ± σ): 2.230 s ± 0.050 s [User: 1.533 s, System: 0.682 s] Range (min … max): 2.115 s … 2.278 s 10 runs
Benchmark #2: ./bin/llvm-objdump -d ./bin/llvm-objcopy Time (mean ± σ): 386.4 ms ± 13.0 ms [User: 376.6 ms, System: 6.1 ms] Range (min … max): 366.1 ms … 407.0 ms 10 runs
Summary './bin/llvm-objdump -d ./bin/llvm-objcopy' ran 5.77 ± 0.23 times faster than './llvm-objdump-master -d ./bin/llvm-objcopy'
Reviewers: alexshap, Bigcheese, jhenderson, rupprecht, grimar, MaskRay
Reviewed By: jhenderson, MaskRay
Subscribers: dexonsmith, jhenderson, javed.absar, kristof.beyls, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64969
llvm-svn: 366984
show more ...
|
#
fac3900c |
| 24-Jul-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[llvm-objdump] Emit warning if --start-address/--stop-address specify range outside file's address range.
NB: the warning is about the input file itself regardless of the options used such as `-r`,
[llvm-objdump] Emit warning if --start-address/--stop-address specify range outside file's address range.
NB: the warning is about the input file itself regardless of the options used such as `-r`, `-s` etc..
https://bugs.llvm.org/show_bug.cgi?id=41911
Reviewers: jhenderson, grimar, MaskRay, rupprecht
Reviewed by: MaskRay, jhenderson
Differential Revision: https://reviews.llvm.org/D64779
llvm-svn: 366923
show more ...
|
Revision tags: llvmorg-10-init |
|
#
c5f8aa8b |
| 09-Jul-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[llvm-objdump] Keep warning for --disassemble-functions in correct order.
relative to normal output when dumping archive files.
prepare for PR35351.
Reviewers: jhenderson, grimar, MaskRay, rupprec
[llvm-objdump] Keep warning for --disassemble-functions in correct order.
relative to normal output when dumping archive files.
prepare for PR35351.
Reviewers: jhenderson, grimar, MaskRay, rupprecht
Reviewed by: MaskRay, jhenderson
Differential Revision: https://reviews.llvm.org/D64165
llvm-svn: 365564
show more ...
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4 |
|
#
5de4692c |
| 08-Jul-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
Teach the symbolizer lib symbolize objects directly.
Currently, the symbolizer lib can only symbolize a file on disk. This patch teaches the symbolizer lib to symbolize objects. llvm-objdump needs t
Teach the symbolizer lib symbolize objects directly.
Currently, the symbolizer lib can only symbolize a file on disk. This patch teaches the symbolizer lib to symbolize objects. llvm-objdump needs this to support archive disassembly with source info.
https://bugs.llvm.org/show_bug.cgi?id=41871
Reviewed by: jhenderson, grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D63521
llvm-svn: 365376
show more ...
|
#
d16c162c |
| 02-Jul-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[llvm-objdump] Warn if no user specified sections (-j) are not found.
Match GNU objdump.
https://bugs.llvm.org/show_bug.cgi?id=41898
Reviewers: jhenderson, grimar, MaskRay, rupprecht
Reviewed by:
[llvm-objdump] Warn if no user specified sections (-j) are not found.
Match GNU objdump.
https://bugs.llvm.org/show_bug.cgi?id=41898
Reviewers: jhenderson, grimar, MaskRay, rupprecht
Reviewed by: jhenderson, grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D63779
llvm-svn: 364955
show more ...
|
#
78ee2fbf |
| 30-Jun-2019 |
Fangrui Song <maskray@google.com> |
Cleanup: llvm::bsearch -> llvm::partition_point after r364719
llvm-svn: 364720
|
Revision tags: llvmorg-8.0.1-rc3 |
|
#
6e04b92c |
| 24-Jun-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[llvm-objdump] Match GNU objdump on symbol types shown in disassembly output.
STT_OBJECT and STT_COMMON are dumped as data, not disassembled.
https://bugs.llvm.org/show_bug.cgi?id=41947
Differenti
[llvm-objdump] Match GNU objdump on symbol types shown in disassembly output.
STT_OBJECT and STT_COMMON are dumped as data, not disassembled.
https://bugs.llvm.org/show_bug.cgi?id=41947
Differential Revision: https://reviews.llvm.org/D62964
llvm-svn: 364211
show more ...
|
#
4a2a1524 |
| 22-Jun-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[llvm-objdump] Allow --disassemble-functions to take demangled names
The --disassemble-functions switch takes demangled names when --demangle is specified, otherwise the switch takes mangled names.
[llvm-objdump] Allow --disassemble-functions to take demangled names
The --disassemble-functions switch takes demangled names when --demangle is specified, otherwise the switch takes mangled names.
https://bugs.llvm.org/show_bug.cgi?id=41908
Reviewers: jhenderson, grimar, MaskRay, rupprecht
Differential Revision: https://reviews.llvm.org/D63524
llvm-svn: 364121
show more ...
|
#
0eb966c8 |
| 22-Jun-2019 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[llvm-objdump] Move --start-address >= --stop-address check out of the -d code.
Summary: Move it into `main` function so the checking is effective for all actions user may do with llvm-objdump; nota
[llvm-objdump] Move --start-address >= --stop-address check out of the -d code.
Summary: Move it into `main` function so the checking is effective for all actions user may do with llvm-objdump; notably, -r and -s in addition to existing -d.
Match GNU behavior.
Reviewers: jhenderson, grimar, MaskRay, rupprecht
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63631
llvm-svn: 364118
show more ...
|