summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [Object/ELF] - Improve error reporting for notes.George Rimar2019-07-121-75/+117
| | | | | | | | | | 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
* NFC: Unforget a colon in a few CHECK: directives.Artem Dergachev2019-07-122-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D64526 llvm-svn: 365863
* Revert r365775 - "[Object/ELF] - Improve error reporting for notes."George Rimar2019-07-111-117/+75
| | | | | | It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15419 llvm-svn: 365779
* [Object/ELF] - Improve error reporting for notes.George Rimar2019-07-111-75/+117
| | | | | | | | | | 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
* [yaml2obj/elf-override-shsize.yaml] - An attemp to fix ppc64 bot.George Rimar2019-07-111-2/+2
| | | | | | | | | | 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
* [yaml2obj] - Allow overriding the sh_size field.George Rimar2019-07-111-0/+159
| | | | | | | | | | 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
* [llvm-readobj/llvm-readelf] - Report a warning instead of a error when ↵George Rimar2019-07-111-9/+32
| | | | | | | | | | | | 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
* [llvm-objcopy] Don't change permissions of non-regular output filesFangrui Song2019-07-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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
* Revert [llvm-objcopy] Allow strip symtab from executables and DSOsJordan Rupprecht2019-07-106-25/+88
| | | | | | | | | | | | | 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
* [llvm-objdump] Keep warning for --disassemble-functions in correct order.Yuanfang Chen2019-07-091-1/+11
| | | | | | | | | | | | | | 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
* [Object][XCOFF] Add support for 64-bit file header and section header dumping.Sean Fertile2019-07-093-0/+181
| | | | | | | | | | | 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 lit.local.cfg to llvm-objdump testsSteven Wu2019-07-092-1/+2
| | | | | | | Add configuration file to llvm-objdump tests to treat files with .yaml extension as tests. llvm-svn: 365519
* Remove a comment that has been obsolete since r327679Nico Weber2019-07-091-3/+0
| | | | llvm-svn: 365517
* Rename llvm/test/tools/llvm-pdbdump to llvm/test/tools/llvm-pdbutilNico Weber2019-07-0943-0/+0
| | | | | | | 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
* [DwarfDebug] Dump call site debug infoDjordje Todorovic2019-07-091-0/+76
| | | | | | | | | | | | | | | | | | | 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
* [llvm-profdata] Don't make the output overwrite the input file.Haojian Wu2019-07-091-4/+4
| | | | | | | Some file systems may not allow this behavior, the test fails on our internal system ("Permission denied"). llvm-svn: 365450
* [llvm-profdata] Fix buildbot failure on llvm-clang-x86_64-expensive-checks-winRong Xu2019-07-081-1/+1
| | | | | | | This fixes buildbot failure in LLVM on llvm-clang-x86_64-expensive-checks-win from r365386. llvm-svn: 365401
* llvm-profdata] Handle the cases of overlapping input file and output fileRong Xu2019-07-085-0/+79
| | | | | | | | | | | | | | | | | | | | 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
* Revert "Reapply [llvm-ar][test] Increase llvm-ar test coverage"JF Bastien2019-07-0810-433/+17
| | | | | | llvm-ar.extract.test has been failing on greendragon and gone unfixed. llvm-svn: 365383
* Teach the symbolizer lib symbolize objects directly.Yuanfang Chen2019-07-081-0/+49
| | | | | | | | | | | | | | 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
* [llvm\test\Object] - An initial step to cleanup the test cases.George Rimar2019-07-081-0/+50
| | | | | | | | | | | | 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
* Reapply [llvm-ar][test] Increase llvm-ar test coverageOwen Reynolds2019-07-0810-17/+433
| | | | | | | | This change adds tests to cover existing llvm-ar functionality. Differential Revision: https://reviews.llvm.org/D63935 llvm-svn: 365318
* Revert [llvm-ar][test] Increase llvm-ar test coverageOwen Reynolds2019-07-0810-433/+17
| | | | | | | | Reverted due to test failures Differential Revision: https://reviews.llvm.org/D63935 llvm-svn: 365317
* [llvm-ar][test] Increase llvm-ar test coverageOwen Reynolds2019-07-0810-17/+433
| | | | | | | | This change adds tests to cover existing llvm-ar functionality. Differential Revision: https://reviews.llvm.org/D63935 llvm-svn: 365316
* [llvm-objcopy] Allow strip symtab from executables and DSOsEugene Leviant2019-07-056-88/+25
| | | | | | Differential revision: https://reviews.llvm.org/D61672 llvm-svn: 365193
* [Object/ELF.h] - Improve error reporting.George Rimar2019-07-055-10/+15
| | | | | | | | | | | | | | | | | 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-objcopy][test] Fix respect-umask.test after D62718/r365162Fangrui Song2019-07-051-14/+3
| | | | llvm-svn: 365172
* Fix patch not passing test casesAlex Brachet2019-07-051-4/+3
| | | | llvm-svn: 365170
* Temporarily stop failing test caseAlex Brachet2019-07-051-3/+3
| | | | llvm-svn: 365168
* [llvm-objcopy] Change handling of output file permissionsAlex Brachet2019-07-043-0/+125
| | | | | | | | | | | | | | | | 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
* [MachO] Add valid architecture functionShoaib Meenai2019-07-041-2/+2
| | | | | | | | | | | 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
* Revert "[llvm-ar][test] Add to MRI test coverage"JF Bastien2019-07-035-160/+0
| | | | | | | 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
* Try to XFAIL mri-utf8.test on MacReid Kleckner2019-07-031-18/+21
| | | | llvm-svn: 365076
* [macCatalyst] Print out macCatalyst in llvm-objdump for the platformAlex Lorenz2019-07-031-1/+1
| | | | | | 'macCatalyst' is more readable than 'maccatalyst'. llvm-svn: 365064
* [llvm-ar][test] Add to MRI test coverageOwen Reynolds2019-07-035-0/+157
| | | | | | | | 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
* Add support for the 'macCatalyst' MachO platformAlex Lorenz2019-07-021-0/+54
| | | | | | | | | 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
* [gold] Fix test after BitStream reader error changesTeresa Johnson2019-07-021-1/+1
| | | | | | | | | | 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
* [llvm-objdump] Warn if no user specified sections (-j) are not found.Yuanfang Chen2019-07-021-0/+73
| | | | | | | | | | | | | | 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
* Fix line endings (NFC)Paul Robinson2019-07-021-85/+85
| | | | llvm-svn: 364919
* [yaml2obj] - An attempt to fix a ppc64be build bot after r364898George Rimar2019-07-021-4/+4
| | | | | | | | 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
* [yaml2obj] - Allow overriding sh_offset field from the YAML.George Rimar2019-07-021-0/+106
| | | | | | | | | | | 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
* Partial revert of "[llvm-ar] Document response file support in --help"Sam Clegg2019-06-291-9/+0
| | | | | | | | | 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
* [llvm-ar] Document response file support in --helpSam Clegg2019-06-281-0/+9
| | | | | | | | Also a test for this. Differential Revision: https://reviews.llvm.org/D63836 llvm-svn: 364673
* [llvm-cov[ Fix lcov coverage report contains functions from other ↵Max Moroz2019-06-281-0/+12
| | | | | | | | | | | | | | | | | | 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
* [llvm-nm] Fix for BZ41711 - Class character for a symbol with undefinedChris Jackson2019-06-271-23/+23
| | | | | | | | | | 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
* [DWARF] Handle the DW_OP_entry_value operandDjordje Todorovic2019-06-272-0/+118
| | | | | | | | | | | | | | | 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
* [yaml2obj] - Allow overriding e_shentsize, e_shoff, e_shnum and e_shstrndx ↵George Rimar2019-06-271-0/+61
| | | | | | | | | | | | 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
* BitStream reader: propagate errorsJF Bastien2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* Fix frame.s test dir-separator checksSimon Pilgrim2019-06-251-10/+10
| | | | | | Handle / and \ separators llvm-svn: 364301
* [yaml2obj/obj2yaml] - Allow having the symbols and sections with duplicated ↵George Rimar2019-06-253-0/+422
| | | | | | | | | | | | 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
OpenPOWER on IntegriCloud