summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/ARMEHABIPrinter.h
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] - Remove 'error(Error EC)' helper.George Rimar2019-08-131-2/+2
| | | | | | | | | We do not need it. I replaced it with reportError(StringRef Input, Error Err). Differential revision: https://reviews.llvm.org/D66011 llvm-svn: 368677
* [llvm-readobj] - Remove deprecated unwrapOrError(Expected<T> EO).George Rimar2019-08-091-7/+8
| | | | | | | | | This patch changes the code to use a modern unwrapOrError(StringRef Input, Expected<T> EO) version that contains the input source name and removes the deprecated version. Differential revision: https://reviews.llvm.org/D65946 llvm-svn: 368428
* [llvm-readobj] -u: don't crash when dumping SHT_ARM_EXIDX if .symtab doesn't ↵Fangrui Song2019-05-291-3/+7
| | | | | | | | | | exist Reviewed By: kongyi Differential Revision: https://reviews.llvm.org/D62567 llvm-svn: 361929
* 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
* Instead of ELFFile<ELFT>::Type, use ELFT::Type. NFC.Rui Ueyama2018-01-121-7/+6
| | | | llvm-svn: 322346
* Attempt to fix inscrutible build break...David Blaikie2017-11-161-1/+1
| | | | llvm-svn: 318463
* llvm-readobj/ARMEHABIPrinter.h: Make this a real/modular headerDavid Blaikie2017-11-161-62/+79
| | | | | | | Had several non-inline/strong function definitions that needed to be marked inline, etc. llvm-svn: 318461
* [ELF] Convert ELF.h to Expected<T>.Davide Italiano2016-11-161-12/+13
| | | | | | | | | | | | This has two advantages: 1) We slowly move away from ErrorOr to the new handling interface, in the hope of having an uniform error handling in LLVM, eventually. 2) We're starting to have *meaningful* error messages for invalid object ELF files, rather than a generic "parse error". At some point we should include also the offset to improve the quality of the diagnostic. llvm-svn: 287081
* Remove the last use of report_fatal_error from ELF.h.Rafael Espindola2016-11-031-1/+1
| | | | llvm-svn: 285955
* Add error handling to getEntry.Rafael Espindola2016-11-031-1/+2
| | | | | | Issue found by inspection. llvm-svn: 285951
* Replace a report_fatal_error with an ErrorOr.Rafael Espindola2016-11-031-1/+1
| | | | llvm-svn: 285905
* Avoid a report_fatal_error in sections().Rafael Espindola2016-11-021-2/+2
| | | | | | | Have it return a ErrorOr<Range> and delete section_begin and section_end. llvm-svn: 285807
* Move llvm-readobj/StreamWriter to Support.Zachary Turner2016-05-031-5/+5
| | | | | | | | | We wish to re-use this from llvm-pdbdump, and it provides a nice way to print structured data in scoped format that could prove useful for many other dumping tools as well. Moving to support and changing name to ScopedPrinter to better reflect its purpose. llvm-svn: 268342
* Thread Expected<...> up from libObject’s getName() for symbols to allow ↵Kevin Enderby2016-04-201-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | llvm-objdump to produce a good error message. Produce another specific error message for a malformed Mach-O file when a symbol’s string index is past the end of the string table. The existing test case in test/Object/macho-invalid.test for macho-invalid-symbol-name-past-eof now reports the error with the message indicating that a symbol at a specific index has a bad sting index and that bad string index value. Again converting interfaces to Expected<> from ErrorOr<> does involve touching a number of places. Where the existing code reported the error with a string message or an error code it was converted to do the same. There is some code for this that could be factored into a routine but I would like to leave that for the code owners post-commit to do as they want for handling an llvm::Error. An example of how this could be done is shown in the diff in lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h which had a Check() routine already for std::error_code so I added one like it for llvm::Error . Also there some were bugs in the existing code that did not deal with the old ErrorOr<> return values.  So now with Expected<> since they must be checked and the error handled, I added a TODO and a comment: “// TODO: Actually report errors helpfully” and a call something like consumeError(NameOrErr.takeError()) so the buggy code will not crash since needed to deal with the Error. Note there fixes needed to lld that goes along with this that I will commit right after this. So expect lld not to built after this commit and before the next one. llvm-svn: 266919
* One more batch of self-containing headers.Benjamin Kramer2016-01-271-0/+1
| | | | llvm-svn: 258974
* Pass a symbol table to getRelocationSymbol instead of returning one.Rafael Espindola2015-09-021-3/+6
| | | | | | | This removes a report_fatal_error from library and avoids checking a section property for every section entry. llvm-svn: 246656
* Don't iterate over all sections in the ELFFile constructor.Rafael Espindola2015-08-101-1/+4
| | | | | | | With this we finally have an ELFFile that is O(1) to construct. This is helpful for programs like lld which have to do their own section walk. llvm-svn: 244510
* Delete getDotSymtabSec.Rafael Espindola2015-08-101-7/+8
| | | | | | Another step in avoiding iterating over all sections in the ELFFile constructor. llvm-svn: 244496
* Use continue to reduce indentation. NFC.Rafael Espindola2015-08-101-17/+19
| | | | llvm-svn: 244480
* Remove the symbol iteration functions that don't take a symbol table.Rafael Espindola2015-08-071-1/+1
| | | | | | Another step in making ELFFile's constructor not iterate over all sections. llvm-svn: 244351
* Replace the last uses of ELF::getSymbolName in llvm-readobj.Rafael Espindola2015-07-211-1/+6
| | | | llvm-svn: 242798
* Remove Elf_Rela_Iter and Elf_Rel_Iter.Rafael Espindola2015-07-201-7/+5
| | | | | | Use just the pointers and check for invalid relocation sections. llvm-svn: 242700
* Return ErrorOr from getSection.Rafael Espindola2015-07-011-1/+4
| | | | | | | | | | | | | | This also improves the logic of what is an error: * getSection(uint_32): only return an error if the index is out of bounds. The index 0 corresponds to a perfectly valid entry. * getSection(Elf_Sym): Returns null for symbols that normally don't have sections and error for out of bound indexes. In many places this just moves the report_fatal_error up the stack, but those can then be fixed in smaller patches. llvm-svn: 241156
* Remove Elf_Shdr_Iter. Diagnose files with invalid section header sizes.Rafael Espindola2015-06-301-1/+0
| | | | llvm-svn: 241109
* Use range loop.Rafael Espindola2015-06-301-8/+6
| | | | llvm-svn: 241104
* Use range loop.Rafael Espindola2015-06-301-5/+4
| | | | llvm-svn: 241100
* Fix the name of the iterator functions to match the coding standards.Rafael Espindola2015-06-301-3/+3
| | | | llvm-svn: 241074
* Remove Elf_Sym_Iter.Rafael Espindola2015-06-291-8/+7
| | | | | | | | | | | | | | | | | | | It was a fairly broken concept for an ELF only class. An ELF file can have two symbol tables, but they have exactly the same format. There is no concept of a dynamic or a static symbol. Storing this on the iterator also makes us do more work per symbol than necessary. To fetch a name we would: * Find if we had a static or a dynamic symbol. * Look at the corresponding symbol table and find the string table section. * Look at the string table section to fetch its contents. * Compute the name as a substring of the string table. All but the last step can be done per symbol table instead of per symbol. This is a step in that direction. llvm-svn: 240939
* 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 all uses of 'using std::error_code' from headers.Rafael Espindola2014-06-131-1/+0
| | | | llvm-svn: 210866
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* [C++] Use 'nullptr'.Craig Topper2014-04-281-1/+1
| | | | llvm-svn: 207394
* tools: remove unnecessary copy of array_lengthofSaleem Abdulrasool2014-04-121-8/+3
| | | | llvm-svn: 206115
* tools: cast the right operandSaleem Abdulrasool2014-02-091-1/+1
| | | | | | Properly apply the fix intended by SVN r201032. llvm-svn: 201036
* tools: explicitly cast to avoid a warningSaleem Abdulrasool2014-02-091-1/+1
| | | | llvm-svn: 201032
* tools: handle out-of-line personality 0 decodingSaleem Abdulrasool2014-02-081-1/+1
| | | | | | | | In some cases it is possible to have a personality 0 unwinding opcodes in the extab (such as when .handlerdata is used in the assembly). Simply decode the 3 opcodes for that case. llvm-svn: 201030
* tools: use 64-bit print specifierSaleem Abdulrasool2014-01-211-1/+1
| | | | | | | Try to repair the ARM Cortex-A15 buildbot by using a more appropriate conversion specifier. llvm-svn: 199711
* tools: support decoding ARM EHABI opcodes in readobjSaleem Abdulrasool2014-01-211-2/+288
| | | | | | | | | | | | | | Add support to llvm-readobj to decode the actual opcodes. The ARM EHABI opcodes are a variable length instruction set that describe the operations required for properly unwinding stack frames. The primary motivation for this change is to ease the creation of tests for the ARM EHABI object emission as well as the unwinding directive handling in the ARM IAS. Thanks to Logan Chien for an extra test case! llvm-svn: 199708
* [cleanup] Add a missing include exposed by resorting other includes.Chandler Carruth2014-01-131-0/+1
| | | | | | Should fix the build. llvm-svn: 199081
* Re-sort #include lines again, prior to moving headers around.Chandler Carruth2014-01-131-1/+0
| | | | llvm-svn: 199080
* llvm-readobj: address review comments for ARM EHABI printingSaleem Abdulrasool2014-01-091-18/+10
| | | | | | | | Rename bytecode to opcodes to make it more clear. Change an impossible case to llvm_unreachable instead. Avoid allocation of a buffer by modifying the PrintOpcodes iteration. llvm-svn: 198848
* llvm-readobj: fix endiannessSaleem Abdulrasool2014-01-091-5/+6
| | | | | | | Explicitly handle endianness to ensure that bytes are read properly on big-endian systems. llvm-svn: 198847
* llvm-readobj: add support for ARM EHABI unwind infoSaleem Abdulrasool2014-01-081-0/+278
This adds some preliminary support for decoding ARM EHABI unwinding information. The major functionality that remains from complete support is bytecode translation. Each Unwind Index Table is printed out as a separate entity along with its section index, name, offset, and entries. Each entry lists the function address, and if possible, the name, of the function to which it corresponds. The encoding model, personality routine or index, and byte code is also listed. llvm-svn: 198734
OpenPOWER on IntegriCloud