summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/elf-versioninfo.test
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj][test] - Move platform specific test cases and their inputs to ↵Georgii Rymar2019-12-101-297/+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-readelf][llvm-readobj][test] - Cleanup test cases for versioning sections.Georgii Rymar2019-11-281-235/+2
| | | | | | | | | | | | | | | | | | Currently we have 2 tests for testing versioning sections: 1) elf-versioninfo.test 2) elf-invalid-versioning.test The first one currently checks how versioning sections are dumped + how tools dump invalid SHT_GNU_verdef section. The second despite of its name contains only tests for invalid SHT_GNU_verneed section. In this patch I`ve renamed elf-invalid-versioning.test->elf-verneed-invalid.test, and moved a few tests from elf-versioninfo.test to a new elf-verdef-invalid.test. It will help to maintain these and a new tests for broken versioning sections. Differential revision:
* [llvm-readobj] - Always print "Predecessors" for version definition sections.Georgii Rymar2019-11-271-0/+6
| | | | | | | | | | | | | This is a follow-up discussed in D70495 thread. The current logic is unusual for llvm-readobj. It doesn't print predecessors list when it is empty. This is not good for machine parsers. D70495 had to add this condition during refactoring to reduce amount of changes, in tests, because the original code also had a similar logic. Now seems it is time to get rid of it. This patch does it. Differential revision: https://reviews.llvm.org/D70717
* [llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verdef section.Georgii Rymar2019-11-261-4/+240
| | | | | | | | | | | | Currently we have following issues: 1) We have 2 different implementations with a different behaviors for GNU/LLVM styles. 2) Errors are either not handled at all or we call report_fatal_error with not helpfull messages. 3) There is no test coverage even for those errors that are reported. This patch reimplements parsing of the SHT_GNU_verdef section entries in a single place, adds a few error messages and test coverage. Differential revision: https://reviews.llvm.org/D70495
* [llvm-readobj/llvm-readelf] - Improve dumping of versioning sections.Georgii Rymar2019-11-201-32/+135
| | | | | | | | | | | | | Our elf-versioninfo.test is not perfect. It does not properly test how flags are dumped and also we have a bug: they are dumped as enums in LLVM style now, i.e not dumped properly. GNU style uses a `versionFlagToString` method to build a string from flags which seems is consistent with GNU readelf. In this patch I fixed the issues mentioned. Differential revision: https://reviews.llvm.org/D70399
* [yaml2obj][obj2yaml] - Do not create a symbol table by default.George Rimar2019-10-201-3/+3
| | | | | | | | | | | | | | | | | | This patch tries to resolve problems faced in D68943 and uses some of the code written by Konrad Wilhelm Kleine in that patch. Previously, yaml2obj tool always created a .symtab section. This patch changes that. With it we only create it when have a "Symbols:" tag in the YAML document or when we need to create it because it is used by another section(s). obj2yaml follows the new behavior and does not print "Symbols:" anymore when there is no symbol table. Differential revision: https://reviews.llvm.org/D69041 llvm-svn: 375361
* [llvm-readobj] - Refine the LLVM-style output to be consistent.George Rimar2019-10-171-5/+5
| | | | | | | | | | | | | | Our LLVM-style output was inconsistent. This patch changes the output in the following way: SHT_GNU_verdef { -> VersionDefinitions [ SHT_GNU_verneed { -> VersionRequirements [ Version symbols [ -> VersionSymbols [ EH_FRAME Header [ -> EHFrameHeader { Differential revision: https://reviews.llvm.org/D68636 llvm-svn: 375095
* [llvm-readobj] - Remove excessive fields when dumping "Version symbols".George Rimar2019-10-111-32/+26
| | | | | | | | | | | This removes a few fields that are not useful: "Section Name", "Address", "Offset" and "Link" (they duplicated the information available under the "Sections [" tag). Differential revision: https://reviews.llvm.org/D68704 llvm-svn: 374541
* [yaml2obj] Write the section header table after section contentsFangrui Song2019-09-051-4/+4
| | | | | | | | | | | | | | | | | Linkers (ld.bfd/gold/lld) place the section header table at the very end. This allows tools to strip it, which is optional in executable/shared objects. In addition, if we add or section, the size of the section header table will change. Placing the section header table in the end keeps section offsets unchanged. yaml2obj currently places the section header table immediately after the program header. Follow what linkers do to make offset updating easier. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D67221 llvm-svn: 371074
* [llvm-readobj/llvm-readelf] - Implement GNU style dumper of the ↵George Rimar2019-05-301-3/+9
| | | | | | | | | | | SHT_GNU_verdef section. It was not implemented yet, we had only LLVM style dumper implemented. Section description is here: https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html Differential revision: https://reviews.llvm.org/D62520 llvm-svn: 362082
* [llvm-readobj/llvm-readelf] - Implement GNU style dumper of the ↵George Rimar2019-05-301-3/+10
| | | | | | | | | | | SHT_GNU_verneed section. It was not implemented yet, we had only LLVM style dumper implemented. Section description is here: https://refspecs.linuxfoundation.org/LSB_2.0.1/LSB-Core/LSB-Core/symverrqmts.html Differential revision: https://reviews.llvm.org/D62516 llvm-svn: 362080
* [llvm-readobj] - Repair the test case.George Rimar2019-05-291-2/+2
| | | | | | | I forgot to change the test tag in r361932. Now it is fixed. llvm-svn: 361945
* [llvm-readobj/llvm-readelf] - Simplify the elf-versioninfo.test test case.George Rimar2019-05-291-125/+173
| | | | | | | | | | This removes 2 precompiled objects from the test case and replaces them with a single YAML. That allowed to simplify and clean up the test, remove excessive checks. Differential revision: https://reviews.llvm.org/D62529 llvm-svn: 361932
* [llvm-readobj] Implement GNU-style output for dynamic tableSimon Atanasyan2019-05-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | GNU readelf tool prints slightly different dynamic table "header" and surrounds dynamic tag names by brackets. This patch implements the same formatting for GNU-style output of the `llvm-readobj`. LLVM ``` DynamicSection [ (13 entries) Tag Type Name/Value 0x00000006 SYMTAB 0x168 ... ] ``` GNU ``` Dynamic section at offset 0x1d0 contains 13 entries: Tag Type Name/Value 0x00000006 (SYMTAB) 0x168 ... ``` Differential Revision: https://reviews.llvm.org/D62256 llvm-svn: 361633
* [llvm-nm][llvm-readelf] Avoid single-dash -long-option in testsFangrui Song2019-04-271-2/+2
| | | | llvm-svn: 359383
* [llvm-readobj] Should declare `ListScope` for `verneed` entries.Xing GUO2019-04-101-18/+22
| | | | | | | | | | | | | | | | Summary: YAML mappings require keys to be unique. See: https://yaml.org/spec/1.2/spec.html#id2764652 Reviewers: jhenderson, grimar, rupprecht, espindola, ruiu Reviewed By: ruiu Subscribers: ruiu, emaste, arichardson, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60438 llvm-svn: 358078
* [llvm-readobj] Add GNU style dumper for .gnu.version sectionXing GUO2019-04-031-2/+9
| | | | | | | | | | | | | | | | Summary: Currently, `llvm-readobj` do not support GNU style dumper for symbol versioning sections. In this patch, I would like to implement dumper for `.gnu.version` section Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59877 llvm-svn: 357578
* [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU ↵Xing GUO2019-03-251-99/+112
| | | | | | | | | | | | | | | | | | | | style` Summary: Currently, llvm-readobj can dump symbol version sections only in LLVM style. In this patch, I would like to separate these dumpers into GNU style and LLVM style for future implementation. Reviewers: grimar, jhenderson, mattd, rupprecht Reviewed By: jhenderson, rupprecht Subscribers: ormris, dyung, RKSimon, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59186 llvm-svn: 356881
* Revert "[llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` ↵Douglas Yung2019-03-221-111/+99
| | | | | | | | | | | | | and `GNU style`" This reverts commit 94a0cffe250c1cd6b8fea5607be502cadf617bdc (r356764). This change was originally committed in r356764, but then partially reverted in r356777 due to "bad changes". This caused test failures because the test changes committed along with the original change were not reverted, so this change reverts the rest of the changes. llvm-svn: 356811
* [llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` and `GNU ↵Xing GUO2019-03-221-99/+111
| | | | | | | | | | | | | | | | | | | | style` Summary: Currently, llvm-readobj can dump symbol version sections only in LLVM style. In this patch, I would like to separate these dumpers into GNU style and LLVM style for future implementation. Reviewers: grimar, jhenderson, mattd, rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59186 llvm-svn: 356764
* [llvm-readobj] Don't print '@' at end of unversioned dynsym namesJames Henderson2019-01-081-4/+4
| | | | | | | | | | | | | This fixes https://bugs.llvm.org/show_bug.cgi?id=40097. The problem was caused by a regression in r188022. See also r350614. Reviewed by: rupprecht, mstorsjo, Higuoxing, jakehehrlich Differential Revision: https://reviews.llvm.org/D56319 llvm-svn: 350615
* Revert "ELFDumper: Unversioned symbols must not have trailing @"Hemant Kulkarni2016-08-301-4/+4
| | | | | | | | This reverts commit 8df7a877949e8782a3a28e3ecdb0770c1e444056. Fixing other repositories and adding changes together. llvm-svn: 280152
* ELFDumper: Unversioned symbols must not have trailing @Hemant Kulkarni2016-08-301-4/+4
| | | | llvm-svn: 280140
* [llvm-readobj] - Teach llvm-readobj to print dependencies of SHT_GNU_verdef ↵George Rimar2016-06-221-34/+23
| | | | | | | | | | | | | | | and refactor dumping method. This patch changes single method of llvm-readobj. It teaches SHT_GNU_verdef dumper to print version dependencies, also it removes few fields from output that can be dumped with other keys and slightly refactors code. Testcase was also modified to match the changes. Change is required for testcases of upcoming lld patches. Differential revision: http://reviews.llvm.org/D21552 llvm-svn: 273417
* [llvm-readobj] - Teach llvm-readobj to dump .gnu.version_r sectionsGeorge Rimar2016-06-071-0/+33
| | | | | | | | | | SHT_GNU_verneed (.gnu.version_r) is a version dependency section. It was the last symbol versioning relative section that was not dumped, now it is. Differential revision: http://reviews.llvm.org/D21024 llvm-svn: 271998
* [llvm-readobj] Dump hash as part of -version-info.Davide Italiano2016-05-021-0/+3
| | | | llvm-svn: 268210
* [llvm-readobj] Teach ELFDumper about symbol versioning.Davide Italiano2015-10-161-1/+75
| | | | | | Differential Revision: http://reviews.llvm.org/D13824 llvm-svn: 250575
* [llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.Davide Italiano2015-10-151-0/+7
llvm-svn: 250464
OpenPOWER on IntegriCloud