summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/stack-sizes.test
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj][test] - Move platform specific test cases and their inputs to ↵Georgii Rymar2019-12-101-666/+0
| | | | | | | | | | | | separate folders. This creates the next subfolders in the test directory: "COFF", "ELF", "MachO", "wasm". I've also removed platform specific prefixes, like "coff-*". One unused binary was removed as well: `Inputs/relocs.obj.elf-mips` Differential revision: https://reviews.llvm.org/D71203
* [llvm-readobj] - Fix a comment in stack-sizes.test. NFC.Georgii Rymar2019-10-291-1/+1
| | | | To address post commit review comment for D69167.
* [llvm/Object] - Make ELFObjectFile::getRelocatedSection return ↵George Rimar2019-10-211-0/+23
| | | | | | | | | | | | | Expected<section_iterator> It returns just a section_iterator currently and have a report_fatal_error call inside. This change adds a way to return errors and handle them on caller sides. The patch also changes/improves current users and adds test cases. Differential revision: https://reviews.llvm.org/D69167 llvm-svn: 375408
* [llvm-readobj/llvm-readelf] - .stack_sizes: demangle symbol names in ↵George Rimar2019-09-251-12/+20
| | | | | | | | | | | | | | | warnings reported. I started this patch as a refactoring, tried to make a helper for getting symbol names, similar to how we get section names used in warning messages. So this patch cleanups the code and fixes an issue: symbol names in warning messages were not demangled. Differential revision: https://reviews.llvm.org/D68012 llvm-svn: 372867
* [llvm-readobj] - Simplify stack-sizes.test test case.George Rimar2019-09-251-10/+20
| | | | | | | | | | This is a follow-up for D67757, which allows to describe .stack_sizes sections with a new YAML syntax. Differential revision: https://reviews.llvm.org/D67759 llvm-svn: 372855
* [llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a ↵George Rimar2019-09-251-0/+26
| | | | | | | | | | | | | | | relocation resolver. The crash might happen when we have either a broken or unsupported object and trying to resolve relocations when dumping the .stack_sizes section. For the test case I used a 32-bits ELF header and a 64-bit relocation. In this case a null pointer is returned by the code instead of the relocation resolver function and then we crash. Differential revision: https://reviews.llvm.org/D67962 llvm-svn: 372838
* [yaml2obj/obj2yaml] - Add support for .stack_sizes sections.George Rimar2019-09-241-3/+4
| | | | | | | | | | | .stack_sizes is a SHT_PROGBITS section that contains pairs of <address (4/8 bytes), stack size (uleb128)>. This patch teach tools to parse and dump it. Differential revision: https://reviews.llvm.org/D67757 llvm-svn: 372762
* [llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes ↵George Rimar2019-09-231-3/+3
| | | | | | | | | | | | | | | | sections. llvm-readobj currently handles .stack_sizes.* (e.g. .stack_sizes.foo) as a normal stack sizes section. Though MC does not produce sections with such names. Also, linkers do not combine .stack_sizes.* into .stack_sizes. A mini discussion about this correctness issue is here: https://reviews.llvm.org/D67757#inline-609274 This patch changes implementation so that only now only '.stack_sizes' name is accepted as a real stack sizes section. Differential revision: https://reviews.llvm.org/D67824 llvm-svn: 372578
* [llvm-readobj] - Implement LLVM-style dumping for .stack_sizes sections.George Rimar2019-09-231-68/+190
| | | | | | | | | D65313 implemented GNU-style dumping (llvm-readelf). This one implements LLVM-style dumping (llvm-readobj). Differential revision: https://reviews.llvm.org/D67834 llvm-svn: 372576
* [llvm-readelf]Print filename for multiple inputs and fix formatting regressionJames Henderson2019-08-091-2/+5
| | | | | | | | | | | | | | | | | | | This patch addresses two closely related bugs: https://bugs.llvm.org/show_bug.cgi?id=42930 and https://bugs.llvm.org/show_bug.cgi?id=42931. GNU readelf prints the file name for every input unless there is only one input and that input is not an archive. This patch adds the printing for multiple inputs. A previous change did it for archives, but introduced a regression with GNU compatibility for single-output formatting, resulting in a spurious initial blank line. This is fixed in this patch too. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D65953 llvm-svn: 368435
* [llvm-readelf] Support dumping of stack sizes sections with readelf ↵Wolfgang Pieb2019-08-051-0/+473
--stack-sizes Reviewers: jhenderson, grimar, rupprecht Differential Revision: https://reviews.llvm.org/D65313 llvm-svn: 367942
OpenPOWER on IntegriCloud