| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
This patch improves the error messages reported for
note sections and phdrs and also makes a cleanup for
existent test case.
Differential revision: https://reviews.llvm.org/D64470
llvm-svn: 365884
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D64526
llvm-svn: 365863
|
|
|
|
|
|
| |
It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15419
llvm-svn: 365779
|
|
|
|
|
|
|
|
|
|
| |
This patch improves the error messages reported for
note sections and phdrs and also makes a cleanup for
existent test case.
Differential revision: https://reviews.llvm.org/D64470
llvm-svn: 365775
|
|
|
|
|
|
|
|
|
|
| |
Failture:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/35670/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Aelf-override-shsize.yaml
Solution:
Change `od` tool invocation to print single bytes.
llvm-svn: 365772
|
|
|
|
|
|
|
|
|
|
| |
There is no way to set broken sh_size field currently
for sections. It can be usefull for writing the
test cases.
Differential revision: https://reviews.llvm.org/D64401
llvm-svn: 365766
|
|
|
|
|
|
|
|
|
|
|
|
| |
dumping a broken dynamic section.
It does not make sence to stop dumping the object if the broken
dynamic section was found. In this patch I changed the behavior from
"report an error" to "report a warning". This matches GNU.
Differential revision: https://reviews.llvm.org/D64472
llvm-svn: 365762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is currently an EPERM error when a regular user executes `llvm-objcopy a.o /dev/null`.
Worse, root can even change the mode bits of /dev/null.
Fix it by checking if the output file is special.
A new overload of llvm::sys::fs::setPermissions with FD as the parameter
is added. Users should provide `perm & ~umask` as the parameter if they
intend to respect umask.
The existing overload of llvm::sys::fs::setPermissions may be deleted if
we can find an implementation of fchmod() on Windows. fchmod() is
usually better than chmod() because it saves syscalls and can avoid race
condition.
Reviewed By: jakehehrlich, jhenderson
Differential Revision: https://reviews.llvm.org/D64236
llvm-svn: 365753
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts r365193 (git commit 194f16b3548bcb23a7f0fd638778ed72edd18d37)
This patch doesn't work with binaries built w/ `--emit-relocs`, e.g.
```
$ echo 'int main() { return 0; }' | clang -Wl,--emit-relocs -x c - -o foo && llvm-objcopy --strip-unneeded foo
llvm-objcopy: error: 'foo': not stripping symbol '__gmon_start__' because it is named in a relocation
```
llvm-svn: 365712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a readobj dumper for 32-bit and 64-bit section header tables, and extend
support for the file-header dumping to include 64-bit object files. Also
refactors the binary file parsing to be done in a helper function in an attempt
to cleanup error handeling.
Differential Revision: https://reviews.llvm.org/D63843
llvm-svn: 365524
|
|
|
|
|
|
|
| |
Add configuration file to llvm-objdump tests to treat files with .yaml
extension as tests.
llvm-svn: 365519
|
|
|
|
| |
llvm-svn: 365517
|
|
|
|
|
|
|
| |
llvm-pdbdump was renamed to llvm-pdbutil long ago. This updates the test
to be where you'd expect them to be.
llvm-svn: 365515
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dump the DWARF information about call sites and call site parameters into
debug info sections.
The patch also provides an interface for the interpretation of instructions
that could load values of a call site parameters in order to generate DWARF
about the call site parameters.
([13/13] Introduce the debug entry values.)
Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>
Differential Revision: https://reviews.llvm.org/D60716
llvm-svn: 365467
|
|
|
|
|
|
|
| |
Some file systems may not allow this behavior, the test fails on our internal
system ("Permission denied").
llvm-svn: 365450
|
|
|
|
|
|
|
| |
This fixes buildbot failure in LLVM on llvm-clang-x86_64-expensive-checks-win
from r365386.
llvm-svn: 365401
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently llvm-profdata does not expect the same file name for the input profile
and the output profile.
>llvm-profdata merge A.profraw B.profraw -o B.profraw
The above command runs successfully but the resulted B.profraw is not correct.
This patch fixes the issue by moving the initialization of writer after loading
the profile.
For the show command, the following will report a confusing error of
"Empty raw profile file":
>llvm-profdata show B.profraw -o B.profraw
It's harder to fix as we need to output something before loading the input profile.
I don't think that a fix for this is worth the effort. I just make the error explicit for
the show command.
Differential Revision: https://reviews.llvm.org/D64360
llvm-svn: 365386
|
|
|
|
|
|
| |
llvm-ar.extract.test has been failing on greendragon and gone unfixed.
llvm-svn: 365383
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes trivial-object-test.elf-i386,
trivial-object-test.elf-x86-64 and trivial-object-test2.elf-x86-64
precompiled objects from test/Object/Inputs folder.
I adjusted the existent test cases to use YAML instead.
Differential revision: https://reviews.llvm.org/D64206
llvm-svn: 365348
|
|
|
|
|
|
|
|
| |
This change adds tests to cover existing llvm-ar functionality.
Differential Revision: https://reviews.llvm.org/D63935
llvm-svn: 365318
|
|
|
|
|
|
|
|
| |
Reverted due to test failures
Differential Revision: https://reviews.llvm.org/D63935
llvm-svn: 365317
|
|
|
|
|
|
|
|
| |
This change adds tests to cover existing llvm-ar functionality.
Differential Revision: https://reviews.llvm.org/D63935
llvm-svn: 365316
|
|
|
|
|
|
| |
Differential revision: https://reviews.llvm.org/D61672
llvm-svn: 365193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The errors coming from ELF.h are usually not very
useful because they are uninformative. This patch is a
first step to improve the situation.
I tested this patch with a run of check-llvm and found
that few messages are untested. In this patch, I did not
add more tests but marked all such cases with a "TODO" comment.
For all tested messages I extended the error text to
provide more details (see test cases changed).
Differential revision: https://reviews.llvm.org/D64014
llvm-svn: 365183
|
|
|
|
| |
llvm-svn: 365172
|
|
|
|
| |
llvm-svn: 365170
|
|
|
|
| |
llvm-svn: 365168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Address bug [[ https://bugs.llvm.org/show_bug.cgi?id=42082 | 42082 ]] where files were always outputted with 0775 permissions. Now, the output file is given either 0666 or 0777 if the object is executable.
Reviewers: espindola, alexshap, rupprecht, jhenderson, jakehehrlich, MaskRay
Reviewed By: rupprecht, jhenderson, jakehehrlich, MaskRay
Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62718
llvm-svn: 365162
|
|
|
|
|
|
|
|
|
|
|
| |
Added array of valid architectures and function returning array.
Modified llvm-lipo to include list of valid architectures in error message for invalid arch.
Patch by Anusha Basana <anusha.basana@gmail.com>
Differential Revision: https://reviews.llvm.org/D63735
llvm-svn: 365099
|
|
|
|
|
|
|
| |
This reverts commit 250015bacf7f255abcfb646fb8b6b56ce8be7e01.
r365039 was re-commit of D63197 and failed on Mac. Reid XFAIL'd it, but I'd rather jsut revert and have it fixed properly.
llvm-svn: 365084
|
|
|
|
| |
llvm-svn: 365076
|
|
|
|
|
|
| |
'macCatalyst' is more readable than 'maccatalyst'.
llvm-svn: 365064
|
|
|
|
|
|
|
|
| |
This reapplies 363232 that was reverted due to a buildbot test failure, this build bot has now been fixed.
Differential Revision: https://reviews.llvm.org/D63197
llvm-svn: 365039
|
|
|
|
|
|
|
|
|
| |
Mac Catalyst is a new MachO platform in macOS Catalina.
It always uses the build_version MachO load command.
Differential Revision: https://reviews.llvm.org/D64107
llvm-svn: 364981
|
|
|
|
|
|
|
|
|
|
| |
The recent change to the BitStream reader error handling in r364464
changed the error message format (from "LLVM ERROR:" to just "error"),
leading to a failure in this test which is only executed for very recent
versions of gold. Fix this by removing that part of the error message
check, leaving only the interesting part of the message to be checked.
llvm-svn: 364965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 364919
|
|
|
|
|
|
|
|
| |
I guess the problem is because of endianess of
the bytes tested by "od" tool. I changed the Content
sequence as it does not actually matter.
llvm-svn: 364907
|
|
|
|
|
|
|
|
|
|
|
| |
Some of our test cases are using objects which
has sections with a broken sh_offset field.
There was no way to set it from YAML until this patch.
Differential revision: https://reviews.llvm.org/D63879
llvm-svn: 364898
|
|
|
|
|
|
|
|
|
| |
This is partial revert of 70a8027c60fe1f95e8a8a1ff6575ebf8778d3544.
The test apparently failed on win32 bots due to the way slashes in
pathnames are handled.
llvm-svn: 364705
|
|
|
|
|
|
|
|
| |
Also a test for this.
Differential Revision: https://reviews.llvm.org/D63836
llvm-svn: 364673
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compilation units.
Summary: Patch by Chuan Qiu (@eagleonhill).
Reviewers: Dor1s
Reviewed By: Dor1s
Subscribers: lebedev.ri, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63571
llvm-svn: 364653
|
|
|
|
|
|
|
|
|
|
| |
binding does not match class assigned by GNU nm
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=41711
Differential Revision: https://reviews.llvm.org/D63340
llvm-svn: 364559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the IR and the AsmPrinter parts for handling of the DW_OP_entry_values
DWARF operation.
([11/13] Introduce the debug entry values.)
Co-authored-by: Ananth Sowda <asowda@cisco.com>
Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com>
Co-authored-by: Ivan Baev <ibaev@cisco.com>
Differential Revision: https://reviews.llvm.org/D60866
llvm-svn: 364542
|
|
|
|
|
|
|
|
|
|
|
|
| |
fields in the YAML.
This allows setting different values for e_shentsize, e_shoff, e_shnum
and e_shstrndx fields and is useful for producing broken inputs for various
test cases.
Differential revision: https://reviews.llvm.org/D63771
llvm-svn: 364517
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bitstream reader handles errors poorly. This has two effects:
* Bugs in file handling (especially modules) manifest as an "unexpected end of
file" crash
* Users of clang as a library end up aborting because the code unconditionally
calls `report_fatal_error`
The bitstream reader should be more resilient and return Expected / Error as
soon as an error is encountered, not way late like it does now. This patch
starts doing so and adopting the error handling where I think it makes sense.
There's plenty more to do: this patch propagates errors to be minimally useful,
and follow-ups will propagate them further and improve diagnostics.
https://bugs.llvm.org/show_bug.cgi?id=42311
<rdar://problem/33159405>
Differential Revision: https://reviews.llvm.org/D63518
llvm-svn: 364464
|
|
|
|
|
|
| |
Handle / and \ separators
llvm-svn: 364301
|
|
|
|
|
|
|
|
|
|
|
|
| |
names.
The patch teaches yaml2obj/obj2yaml to support parsing/dumping
the sections and symbols with the same name.
A special suffix is added to a name to make it unique.
Differential revision: https://reviews.llvm.org/D63596
llvm-svn: 364282
|