summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-size
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-size] print a blank line between archieve members when using sysv formatTH3CHARLie2020-01-033-2/+9
| | | | | | | | | | | | | | Summary: This patch is related to https://bugs.llvm.org/show_bug.cgi?id=42967 and it fixes llvm-size's sysv format output by adding a blank line between archieve members Reviewers: jhenderson, Jim, MaskRay Reviewed By: jhenderson, Jim, MaskRay Subscribers: MaskRay, Jim, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71957
* [yaml2obj, obj2yaml] - Add support for SHT_NOTE sections.georgerim2019-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | SHT_NOTE is the section that consists of namesz, descsz, type, name + padding, desc + padding data. This patch teaches yaml2obj, obj2yaml to dump and parse them. This patch implements the section how it is described here: https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-18048.html Which says: "For 64–bit objects and 32–bit objects, each entry is an array of 4-byte words in the format of the target processor" The official specification is different http://www.sco.com/developers/gabi/latest/ch5.pheader.html#note_section And says: "n 64-bit objects (files with e_ident[EI_CLASS] equal to ELFCLASS64), each entry is an array of 8-byte words in the format of the target processor. In 32-bit objects (files with e_ident[EI_CLASS] equal to ELFCLASS32), each entry is an array of 4-byte words in the format of the target processor" Since LLVM uses the first, 32-bit way, this patch follows it. Differential revision: https://reviews.llvm.org/D68983
* Reapply: [llvm-size] Tidy up error messages (PR42970)Jordan Rupprecht2019-10-142-8/+4
| | | | | | | | | | | | Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases. Originally submitted as r374771 and then reverted as r374780, this patch fixes the libObject test case in Object/macho-invalid.test. Patch by Alex Cameron Differential Revision: https://reviews.llvm.org/D68906 llvm-svn: 374793
* Revert r374771 "[llvm-size] Tidy up error messages (PR42970)"Nico Weber2019-10-142-4/+8
| | | | | | | | | This reverts commit 83e52f5e1150018329b8907bb014c77ac382d611. Makes Object/macho-invalid.test fail everywhere, e.g. here: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/23669/steps/test-llvm/logs/FAIL%3A%20LLVM%3A%3Amacho-invalid.test llvm-svn: 374780
* [llvm-size] Tidy up error messages (PR42970)Fangrui Song2019-10-142-8/+4
| | | | | | | | | Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases. Differential Revision: https://reviews.llvm.org/D68906 Patch by Alex Cameron llvm-svn: 374771
* [yaml2obj/obj2yaml] - Add support for SHT_HASH sections.George Rimar2019-10-011-0/+1
| | | | | | | | | | | | | | | SHT_HASH specification is: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash In short the format is the following: it has 2 uint32 fields in its header: nbucket and nchain followed by (nbucket + nchain) uint32 values. This patch allows dumping and parsing such sections. Differential revision: https://reviews.llvm.org/D68085 llvm-svn: 373315
* [llvm-size][test] Improve llvm-size testingJames Henderson2019-08-1427-143/+1088
| | | | | | | | | | | | | | | | | | | | | This patch significantly improves the llvm-size testing. The changes made are: 1) Change all tests to use yaml2obj instead of assembly or pre-canned inputs. 2) Move the tests out of the X86 directory, since they don't need to be there after 1). 3) Increased test coverage. 4) Added comments to explain purpose of tests. I haven't attempted to add test coverage for all Mach-O related code, as I am not familiar enough with that file format to be able to. Reviewers: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D66134 llvm-svn: 368821
* [binutils] Add response file option to help and docsJames Henderson2019-06-211-0/+7
| | | | | | | | | | | | | | | | | | | | | Many LLVM-based tools already support response files (i.e. files containing a list of options, specified with '@'). This change simply updates the documentation and help text for some of these tools to include it. I haven't attempted to fix all tools, just a selection that I am interested in. I've taken the opportunity to add some tests for --help behaviour, where they were missing. We could expand these tests, but I don't think that's within scope of this patch. This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and https://bugs.llvm.org/show_bug.cgi?id=42236. Reviewed by: grimar, MaskRay, jkorous Differential Revision: https://reviews.llvm.org/D63597 llvm-svn: 364036
* [llvm-nm][llvm-size] Use --double-dash options in testsFangrui Song2019-04-261-5/+5
| | | | llvm-svn: 359308
* [llvm-size][libobject] Add explicit "inTextSegment" methods similar to ↵Jordan Rupprecht2018-12-132-2/+57
| | | | | | | | | | | | | | | | | | | | | "isText" section methods to calculate size correctly. Summary: llvm-size uses "isText()" etc. which seem to indicate whether the section contains code-like things, not whether or not it will actually go in the text segment when in a fully linked executable. The unit test added (elf-sizes.test) shows some types of sections that cause discrepencies versus the GNU size tool. llvm-size is not correctly reporting sizes of things mapping to text/data segments, at least for ELF files. This fixes pr38723. Reviewers: echristo, Bigcheese, MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54369 llvm-svn: 349074
* [llvm-size] Berkeley formatting: use tabs instead of spaces as field delimeters.Jordan Rupprecht2018-09-211-0/+15
| | | | | | This matches GNU behavior for size and allows use of cut to parse the output of llvm-size. llvm-svn: 342791
* Fix a bug with llvm-size and the -m option with multiple files not printing ↵Kevin Enderby2016-12-012-0/+4
| | | | | | the file names. llvm-svn: 288402
* llvm-size: Add --totals optionHemant Kulkarni2016-09-121-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D24308 llvm-svn: 281233
* Add the first of what will be a long line of additional error checks for ↵Kevin Enderby2016-08-051-1/+1
| | | | | | | | | | | | | invalid Mach-O files. This is where an LC_SEGMENT load command has a fileoff field that extends past the end of the file. Also fix llvm-nm and llvm-size to remove the errorToErrorCode() call so error messages are printed. And needed to update a few test cases now that they do print the error messages just a bit differently. llvm-svn: 277845
* Fix llvm-size to exit with non zero when it can’t open a file.Kevin Enderby2016-05-021-1/+1
| | | | | | rdar://26027819 llvm-svn: 268313
* [llvm-size] Implement --common optionHemant Kulkarni2016-03-281-0/+29
| | | | | | Differential Revision: http://reviews.llvm.org/D16820 llvm-svn: 264591
* [llvm-size] Make error handling uniform.Davide Italiano2016-02-131-1/+1
| | | | llvm-svn: 260786
* This brings back commit r259578.Rafael Espindola2016-02-092-0/+30
| | | | | | | But now it follows the llvm style, uses an early return and doesn't include a file named 1.o. llvm-svn: 260293
* Revert "Correct size calculations for ELF files"Rafael Espindola2016-02-092-26/+0
| | | | | | | | | This reverts commit r259578. There are enough issues with this small patch that it is better to revert and then commit a fixed version (will be committed shortly). llvm-svn: 260285
* Fix a formatting problems with llvm-size and the -m option.Kevin Enderby2016-02-092-0/+7
| | | | | | | | | | It was using format() with a string for 64-bit types but was passed a 32-bit type in places when printing values for 32-bit Mach-O files. rdar://24542509 llvm-svn: 260243
* Correct size calculations for ELF filesHemant Kulkarni2016-02-022-0/+26
| | | | llvm-svn: 259578
* [llvm-size] Attempt to fix a test failure on Windows.Davide Italiano2015-10-031-1/+1
| | | | llvm-svn: 249247
* [llvm-size] Fix time to check if time of use bug.Davide Italiano2015-10-031-0/+2
This was the last tool relying on this pattern. llvm-svn: 249244
OpenPOWER on IntegriCloud