summaryrefslogtreecommitdiffstats
path: root/llvm/tools/obj2yaml/obj2yaml.h
Commit message (Collapse)AuthorAgeFilesLines
* Recommit r366052 "[obj2yaml] - Rework tool's error reporting logic for ELF ↵George Rimar2019-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target." No changes, LLD code was updated in r366057. Original commit message: ELF.h contains two getSymbol methods which seems to be used only from obj2yaml. One of these methods calls another, which in turn contains untested error message which doesn't provide enough information. Problem is that after improving only just that message, obj2yaml will not show it, ("Error reading file: yaml: Invalid data was encountered while parsing the file" message will be shown instead), because internal errors handling of tool is based on ErrorOr<> class which stores a error code and as a result can only show a predefined error string, what actually isn't very useful. In this patch, I rework obj2yaml's error reporting system for ELF targets to use Error Expected<> classes. Also, I improve the error message produced by getSymbol for demonstration of the new functionality. Differential revision: https://reviews.llvm.org/D64631 llvm-svn: 366058
* Revert r366052 "[obj2yaml] - Rework tool's error reporting logic for ELF ↵George Rimar2019-07-151-1/+1
| | | | | | | | | target." Seems it broke LLD: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48434 llvm-svn: 366053
* [obj2yaml] - Rework tool's error reporting logic for ELF target.George Rimar2019-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | ELF.h contains two getSymbol methods which seems to be used only from obj2yaml. One of these methods calls another, which in turn contains untested error message which doesn't provide enough information. Problem is that after improving only just that message, obj2yaml will not show it, ("Error reading file: yaml: Invalid data was encountered while parsing the file" message will be shown instead), because internal errors handling of tool is based on ErrorOr<> class which stores a error code and as a result can only show a predefined error string, what actually isn't very useful. In this patch, I rework obj2yaml's error reporting system for ELF targets to use Error Expected<> classes. Also, I improve the error message produced by getSymbol for demonstration of the new functionality. Differential revision: https://reviews.llvm.org/D64631 llvm-svn: 366052
* [XCOFF] Add functionality for parsing AIX XCOFF object file headersHubert Tong2019-04-041-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: 1. Add functionality for parsing AIX XCOFF object files headers. 2. Only support 32-bit AIX XCOFF object files in this patch. 3. Print out the AIX XCOFF object file header in YAML format. Reviewers: sfertile, hubert.reinterpretcast, jasonliu, mstorsjo, zturner, rnk Reviewed By: sfertile, hubert.reinterpretcast Subscribers: jsji, mgorny, hiraditya, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59419 Patch by Digger Lin llvm-svn: 357663
* Add minidump support to obj2yamlPavel Labath2019-04-021-0/+3
| | | | | | | | | | | | | | | | | Summary: This patch adds the code needed to parse a minidump file into the MinidumpYAML model, and the necessary glue code so that obj2yaml can recognise the minidump files and process them. Reviewers: jhenderson, zturner, clayborg Subscribers: mgorny, lldb-commits, amccarth, markmentovai, aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59634 llvm-svn: 357469
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Use delegation instead of inheritance.Rafael Espindola2017-07-191-3/+2
| | | | | | | | | | This changes DwarfContext to delegate to DwarfObject instead of having pure virtual methods. With this DwarfContextInMemory is replaced with an implementation of DwarfObject that is local to a .cpp file. llvm-svn: 308543
* [WebAssembly] Improve support for WebAssembly binary formatDerek Schuff2017-03-301-0/+3
| | | | | | | | | | | | | | | | | | | Mostly this change adds support converting to and from YAML which will allow us to write more test cases for the WebAssembly MC and lld ports. Better support for objdump, readelf, and nm will be in followup CLs. I had to update the two wasm test binaries because they used the old style 'name' section which is no longer supported. Differential Revision: https://reviews.llvm.org/D31099 Patch by Sam Clegg llvm-svn: 299101
* [ObjectYAML] Remove DWARF from class namesChris Bieneman2016-12-081-2/+2
| | | | | | Since all the DWARF classes are in a DWARFYAML namespace having every class start with DWARF seems like a bit of overkill. llvm-svn: 289080
* [obj2yaml] Refactor and abstract dwarf2yamlChris Bieneman2016-12-071-0/+11
| | | | | | This makes the dwarf2yaml code separated and reusable allowing ELF and COFF to share implementations with MachO. llvm-svn: 288986
* [obj2yaml] [yaml2obj] Support for MachO Universal binariesChris Bieneman2016-06-241-1/+1
| | | | | | This patch adds round-trip support for MachO Universal binaries to obj2yaml and yaml2obj. Universal binaries have a header and list of architecture structures, followed by a the individual object files at specified offsets. llvm-svn: 273719
* Initial add for MachO support for obj2yamlChris Bieneman2016-05-111-0/+2
| | | | | | | | Adding the initial files for adding MachO support to obj2yaml. Passing a MachO file will result in a new not_implemented error. I will be implementing obj2yaml and yaml2obj for MachO in parallel so that one can be used to test the other. llvm-svn: 269243
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-2/+2
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* Remove system_error.h.Rafael Espindola2014-06-121-1/+1
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* Replace llvm::error_code with std::error_code.Rafael Espindola2014-06-121-4/+4
| | | | llvm-svn: 210783
* [obj2yaml] Support ELF input format in the obj2yaml tool.Simon Atanasyan2014-05-141-0/+2
| | | | | | | | | | The ELF header e_flags field in the MIPS related test cases handled incorrectly. The obj2yaml prints too many flags. I will fix that in the next patches. The patch reviewed by Michael Spencer and Sean Silva. llvm-svn: 208752
* [obj2yaml] Recognize input file format using llvm::object::ObjectFileSimon Atanasyan2014-05-071-2/+3
| | | | | | | | | | | interface methods isCOFF(). The '-coff' command line option has been removed. It was not used in any test cases. The patch reviewed by Michael Spencer. llvm-svn: 208157
* Remove dead code.Rafael Espindola2013-06-031-12/+0
| | | | | | Thanks to Sean Silva for noticing it! llvm-svn: 183148
* Rename obj2yaml local namespace to avoid conflicts with llvm::yaml.Rafael Espindola2013-04-201-1/+1
| | | | llvm-svn: 179922
* Fix include guards to match new location.Rafael Espindola2013-04-051-2/+2
| | | | llvm-svn: 178877
* Move obj2yaml to tools to sort out make's dependencies.Rafael Espindola2013-04-051-0/+34
llvm-svn: 178835
OpenPOWER on IntegriCloud