| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
disassembled object
Summary:
This fixes the bugzilla id,41862 to support dealing with checking
stop address against start address to support this not being a
proper object to check the disasembly against like gnu objdump
currently does.
Reviewers: jakehehrlich, rupprecht, echristo, jhenderson, grimar
Reviewed By: jhenderson
Subscribers: MaskRay, smeenai, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61969
Patch by Nicholas Krause!
llvm-svn: 362847
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbol
Summary:
Fixes Bug 41904 https://bugs.llvm.org/show_bug.cgi?id=41904
Re-land r362768 after it was reverted in r362826.
Reviewers: jhenderson, rupprecht, grimar, MaskRay
Reviewed By: jhenderson, rupprecht, MaskRay
Subscribers: dexonsmith, rupprecht, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62275
llvm-svn: 362838
|
|
|
|
|
|
|
|
|
|
| |
unknown symbol"
This reverts commit 50f61af3f304a03f10d9ecb0828829f0a72d0099, it used
the function introduced in the previous revert of
0bddef79019a23ab14fcdb27028e55e484674c88.
llvm-svn: 362826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
come from the same line in two different headers.
Reviewers: grimar, rupprecht, jhenderson
Reviewed By: grimar, jhenderson
Subscribers: llvm-commits, jhenderson
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62461
llvm-svn: 362771
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
symbol
Summary: Fixes Bug 41904 https://bugs.llvm.org/show_bug.cgi?id=41904
Reviewers: jhenderson, rupprecht, grimar, MaskRay
Reviewed By: jhenderson, rupprecht, MaskRay
Subscribers: dexonsmith, rupprecht, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62275
llvm-svn: 362768
|
|
|
|
|
|
|
|
|
|
|
| |
This is https://bugs.llvm.org/show_bug.cgi?id=41897.
Previously -d + -j .data had no effect, that wasn't consistent with GNU,
which proccesses .data in that case. With this patch we follow this behavior.
Diffeential revision: https://reviews.llvm.org/D62848
llvm-svn: 362596
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The tests for r362121 ran dsymutil against a test binary every time.
This caused problems on lld-x86_64-ubuntu-fast as dsymutil required
a lipo tool be available to process those binaries.
This change rewrites the new test cases in macho-disassemble-g-dsym
to use bespoke test binaries (exe and dwarf) simplifying the test's
runtime dependencies.
The changes to tools/llvm-objdump/MachODump.cpp are unchanged from
r362121
Reviewers: pete, lhames, JDevlieghere
Reviewed By: pete
Subscribers: smeenai, aprantl, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62694
llvm-svn: 362141
|
|
|
|
| |
llvm-svn: 362123
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Commonly programmers use llvm-objdump to disassemble Mach-O target
binaries with Mach-O dSYMS. While llvm-objdump allows programmers to
disassemble Universal binaries, it previously did not recognize
Universal dSYM files. This change updates llvm-objdump to support
passing in Universal files via the -dsym option. Now, when
disassembling a Mach-O file either as a stand alone file or as an entry
in a Universal binariy, llvm-objdump will search through a Universal
dSYM for a Mach-O matching the architecture flag of the file being
disassembled.
Reviewers: pete, lhames
Reviewed By: pete
Subscribers: rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62642
llvm-svn: 362121
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For clients iterating the symbol table, none expects to handle index 0
(STN_UNDEF). Skip it to improve consistency with other binary formats.
Clients that need STN_UNDEF (e.g. lld) can use
getSectionContentsAsArray(). A test will be added in D62148.
Reviewed By: mtrent
Differential Revision: https://reviews.llvm.org/D62296
llvm-svn: 361506
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Filters out noise, and distinguish Mach-O related options from others.
Differential Revision: https://reviews.llvm.org/D62195
llvm-svn: 361351
|
|
|
|
|
|
|
|
|
|
| |
Fixes https://bugs.llvm.org/show_bug.cgi?id=41903
Patch by Mike Pozulp!
Differential revision: https://reviews.llvm.org/D62054
llvm-svn: 361240
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expected<StringRef>
r360876 didn't fix 2 call sites in clang.
Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
Follow-up of D61781.
llvm-svn: 360892
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expected<StringRef>"
It broke the Clang build, see llvm-commits thread.
> Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
>
> Follow-up of D61781.
llvm-svn: 360878
|
|
|
|
|
|
|
|
| |
Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
Follow-up of D61781.
llvm-svn: 360876
|
|
|
|
|
|
|
|
| |
This adds support for the arm64_32 watchOS ABI to LLVM's low level tools,
teaching them about the specific MachO choices and constants needed to
disassemble things.
llvm-svn: 360663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expected<ArrayRef<uint8_t>>
Change
std::error_code getSectionContents(DataRefImpl, StringRef &) const;
to
Expected<ArrayRef<uint8_t>> getSectionContents(DataRefImpl) const;
Many object formats use ArrayRef<uint8_t> as the underlying type, which
is generally better than StringRef to represent binary data, so change
the type to decrease the number of type conversions.
Reviewed By: ruiu, sbc100
Differential Revision: https://reviews.llvm.org/D61781
llvm-svn: 360648
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for ".hidden" ".internal" ".protected" and " 0x%02x" for
other st_other bits used by some architectures.
Reviewed By: sfertile
Differential Revision: https://reviews.llvm.org/D61718
llvm-svn: 360439
|
|
|
|
| |
llvm-svn: 360414
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the https://bugs.llvm.org/show_bug.cgi?id=41355.
Previously with -r we printed relocation section name instead of the target section name.
It was like this: "RELOCATION RECORDS FOR [.rel.text]"
Now it is: "RELOCATION RECORDS FOR [.text]"
Also when relocation target section has more than one relocation section,
we did not combine the output. Now we do.
Differential revision: https://reviews.llvm.org/D61312
llvm-svn: 360143
|
|
|
|
|
|
|
|
|
|
| |
Summary:
It currently receives an output parameter and returns
std::error_code. Expected<StringRef> fits for this purpose perfectly.
Differential Revision: https://reviews.llvm.org/D61421
llvm-svn: 359774
|
|
|
|
|
|
|
|
|
|
|
| |
This improves readability and the behavior is consistent with GNU objdump.
The new test test/tools/llvm-objdump/X86/disassemble-section-name.s
checks we print newlines before and after "Disassembly of section ...:"
Differential Revision: https://reviews.llvm.org/D61127
llvm-svn: 359668
|
|
|
|
|
|
| |
For test/Object/elf-invalid-phdr.test, the intended error message got lost due to errorToErrorCode().
llvm-svn: 359166
|
|
|
|
|
|
|
|
| |
Revert r359100
It breaks llvm/test/Object/elf-invalid-phdr.test
llvm-svn: 359110
|
|
|
|
| |
llvm-svn: 359102
|
|
|
|
| |
llvm-svn: 359100
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cl::opt<uint64_t> on LP64 platforms
Summary:
And migrate opt<unsigned long long> to opt<uint64_t>
Fixes PR19665
Differential Revision: https://reviews.llvm.org/D60933
llvm-svn: 359068
|
|
|
|
| |
llvm-svn: 358809
|
|
|
|
|
|
|
|
|
| |
This was caught by UBSAN
tools/llvm-objdump/X86/macho-disassembly-g-dsym.test
tools/llvm-objdump/X86/hex-displacement.test
llvm-svn: 358806
|
|
|
|
| |
llvm-svn: 358803
|
|
|
|
| |
llvm-svn: 358564
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This relands D60376/rL358405, with the difference: sed 'y/\t/ /' -> tr '\t' ' '
BSD sed doesn't support escape characters for the 'y' command.
I didn't use it in rL358405 because it was not listed at
https://llvm.org/docs/GettingStarted.html#software but it
should be available.
Original description:
In GNU objdump, -w/--wide aligns instructions in the disassembly output.
This patch does the same to llvm-objdump. However, we always use the
wide format (-w/--wide is ignored), because the narrow format
(instructions are misaligned) is probably not very useful.
In llvm-readobj, we made a similar decision: always use the wide format,
accept but ignore -W/--wide.
To save some columns, we change the tab before hex bytes (controlled by
--[no-]show-raw-insn) to a space.
llvm-svn: 358474
|
|
|
|
|
|
|
|
| |
This relands rL358418. It missed one test that should also use -macho
Note, all the other -private-header -exports-trie tests are used
together with -macho.
llvm-svn: 358472
|
|
|
|
|
|
|
|
|
| |
disassembly output"
The test fails on darwin due to a sed error:
sed: 1: "y/\t/ /": transform strings are not the same length
llvm-svn: 358459
|
|
|
|
|
|
|
| |
This reverts commit r358418 as it broke `test/Object/objdump-export-list`
on Darwin.
llvm-svn: 358443
|
|
|
|
| |
llvm-svn: 358418
|
|
|
|
| |
llvm-svn: 358417
|
|
|
|
| |
llvm-svn: 358416
|
|
|
|
|
|
| |
MachODump.cpp
llvm-svn: 358415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In GNU objdump, -w/--wide aligns instructions in the disassembly output.
This patch does the same to llvm-objdump. However, we always use the
wide format (-w/--wide is ignored), because the narrow format
(instructions are misaligned) is probably not very useful.
In llvm-readobj, we made a similar decision: always use the wide format,
accept but ignore -W/--wide.
To save some columns, we change the tab before hex bytes (controlled by
--[no-]show-raw-insn) to a space.
Reviewers: rupprecht, jhenderson, grimar
Reviewed By: jhenderson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60376
llvm-svn: 358405
|
|
|
|
|
|
|
| |
In disassembly output, dumpBytes prints a space, followed by a tab
printed by printInstr. Remove the extra space.
llvm-svn: 358045
|
|
|
|
|
|
|
|
|
| |
This is similar to what we do for llvm-readobj (--wide/-W is for GNU
readelf compatibility).
The test will be added in D60376.
llvm-svn: 358043
|
|
|
|
| |
llvm-svn: 357965
|
|
|
|
|
|
|
|
|
| |
The new value is taken from <mach/machine.h> in the MacOSX10.14 SDK from
Xcode 10.1. Update llvm-objdump and llvm-readobj accordingly.
Differential Revision: https://reviews.llvm.org/D58636
llvm-svn: 357945
|
|
|
|
| |
llvm-svn: 357920
|
|
|
|
| |
llvm-svn: 357880
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handling
The main disassembly loop is hard to read due to special handling of ARM
ELF data & ELF data. Split off the logic into two functions
dumpARMELFData and dumpELFData. Hoist some checks outside of the loop.
--start-address --stop-address have redundant checks and minor off-by-1
issues. Fix them.
llvm-svn: 357869
|
|
|
|
|
|
|
|
|
| |
If the file does not end with a newline, it may be dropped. Fix the
splitting algorithm.
Also delete an unnecessary SourceCache lookup.
llvm-svn: 357858
|
|
|
|
| |
llvm-svn: 357857
|