summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/COFFDumper.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use new function name. NFC.Rafael Espindola2016-01-181-3/+2
| | | | llvm-svn: 258079
* [codeview] Handle multiple frame descriptions in readobjReid Kleckner2016-01-151-35/+29
| | | | llvm-svn: 257943
* [codeview] Dump the file checksum substreamReid Kleckner2016-01-151-0/+38
| | | | llvm-svn: 257910
* [codeview] Translate file table offsets to filenames and print themReid Kleckner2016-01-151-48/+63
| | | | llvm-svn: 257846
* [codeview] Dump function callees and add more labels to inlinee infoReid Kleckner2016-01-141-8/+26
| | | | | | | I kept forgetting which number is the line delta and which is the code delta. llvm-svn: 257813
* Update to use new name alignTo().Rui Ueyama2016-01-141-1/+1
| | | | llvm-svn: 257804
* [codeview] Dump CodeView inlinee lines subsectionReid Kleckner2016-01-141-0/+36
| | | | llvm-svn: 257790
* Use std::map::insert instead of emplace for libstdc++ 4.7Reid Kleckner2016-01-141-1/+1
| | | | llvm-svn: 257780
* Print function names when they are referenced via TypeIndexReid Kleckner2016-01-141-1/+1
| | | | llvm-svn: 257778
* [readobj] Add functionality to dump relocations inside of binary blobsReid Kleckner2016-01-141-6/+38
| | | | llvm-svn: 257777
* [codeview] Print relocations against code and data offset fieldsReid Kleckner2016-01-141-76/+62
| | | | | | | | These fields are almost always zero. However, there are relocations against them, and we should print the relocation symbol with it as SYM+0xNN. llvm-svn: 257776
* [CodeView] Add support for dumping binary annotationsDavid Majnemer2016-01-141-1/+100
| | | | | | | | | | | | Binary annotations are encoded along the lines of UTF-8 and ECI but with a few minor differences. The algorithm specified in "ECMA-335 CLI Section II.3.2 - Blobs and Signatures" is used to compress binary annotations. Signed binary annotations are encoded like unsigned annotations except the sign bit is rotated left to reduce the number of bits needed to be encoded. llvm-svn: 257742
* [codeview] Share more enums across the writer and the dumperReid Kleckner2016-01-131-12/+17
| | | | | | | | | Moves some .def files into include/DebugInfo/CodeView. Aslo remove a 'using namespace' directive from a header in readobj and update the uses of the endian helper types to compensate. llvm-svn: 257712
* [readobj] Expand CodeView dumping functionalityReid Kleckner2016-01-131-140/+1568
| | | | | | | | | | | | | | | | This rewrites and expands the existing codeview dumping functionality in llvm-readobj using techniques similar to those in lib/Object. This defines a number of new records and enums useful for reading memory mapped codeview sections in COFF objects. The dumper is intended as a testing tool for LLVM as it grows more codeview output capabilities. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D16104 llvm-svn: 257658
* [CodeView] Improve the line table dumperDavid Majnemer2016-01-131-14/+28
| | | | | | | | This change has us print out fields we didn't previously understand. To improve readability, we now group column information with it's respective line. llvm-svn: 257552
* Reland "[llvm-readobj] Simplify usage of -codeview flag"Reid Kleckner2015-12-161-7/+13
| | | | | | Relands r255790 with fixed tests. llvm-svn: 255793
* Revert "[llvm-readobj] Simplify usage of -codeview flag"Reid Kleckner2015-12-161-13/+7
| | | | | | This reverts commit r255790. llvm-svn: 255791
* [llvm-readobj] Simplify usage of -codeview flagReid Kleckner2015-12-161-7/+13
| | | | llvm-svn: 255790
* [llvm-readobj] s/FunctionName/LinkageName/ for codeview dumpingReid Kleckner2015-12-151-7/+7
| | | | | | | The symbol being printed in this field comes from the main symbol table, not 0xF1 subsection. Use LinkageName to make that a lot clearer. llvm-svn: 255596
* [COFF] Add IMAGE_SCN_TYPE_NOLOAD to SectionCharacteristicsDavid Majnemer2015-07-301-0/+1
| | | | llvm-svn: 243658
* llvm-readobj: call exit(1) on error.Rafael Espindola2015-07-201-54/+33
| | | | | | | | | llvm-readobj exists for testing llvm. We can safely stop the program the first time we know the input in corrupted. This is in preparation for making it handle a few more broken files. llvm-svn: 242656
* [llvm-readobj] Re-add sanity checking which was accidentally removed in r241764David Majnemer2015-07-091-2/+9
| | | | llvm-svn: 241831
* llvm-readobj: Fix an unused variable after r241764Justin Bogner2015-07-091-2/+3
| | | | llvm-svn: 241783
* [CodeView] Add support for emitting column informationDavid Majnemer2015-07-091-6/+14
| | | | | | | | | | Column information is present in CodeView when the line table subsection has bit 0 set to 1 in it's flags field. The column information is represented as a pair of 16-bit quantities: a starting and ending column. This information is present at the end of the chunk, after all the line-PC pairs. llvm-svn: 241764
* Check that COFF .obj files have sections with zero virtual address spaces.Rafael Espindola2015-07-061-1/+6
| | | | | | | | | | | | | When talking about the virtual address of sections the coff spec says: ... for simplicity, compilers should set this to zero. Otherwise, it is an arbitrary value that is subtracted from offsets during relocation. We don't currently subtract it, so check that it is zero. If some producer does create such files, we can change getRelocationOffset instead. llvm-svn: 241447
* Return ErrorOr from SymbolRef::getName.Rafael Espindola2015-07-021-3/+9
| | | | | | | | | | | | This function can really fail since the string table offset can be out of bounds. Using ErrorOr makes sure the error is checked. Hopefully a lot of the boilerplate code in tools/* can go away once we have a diagnostic manager in Object. llvm-svn: 241297
* Don't return error_code from a function that doesn't fail.Rafael Espindola2015-06-301-2/+1
| | | | llvm-svn: 241042
* Don't return error_code from a function that doesn't fail.Rafael Espindola2015-06-301-3/+1
| | | | llvm-svn: 241033
* Don't return error_code from function that never fails.Rafael Espindola2015-06-291-6/+2
| | | | llvm-svn: 241021
* [StackMaps] Add a lightweight parser for stackmap version 1 sections.Lang Hames2015-06-261-1/+31
| | | | | | | | | | The parser provides a convenient interface for reading llvm stackmap v1 sections in object files. This patch also includes a new option for llvm-readobj, '-stackmap', which uses the parser to pretty-print stackmap sections for debugging/testing purposes. llvm-svn: 240860
* Remove object_error::success and use std::error_code() insteadRui Ueyama2015-06-091-1/+1
| | | | | | | | | | | | make_error_code(object_error) is slow because object::object_category() uses a ManagedStatic variable. But the real problem is that the function is called too frequently. This patch uses std::error_code() instead of object_error::success. In most cases, we return "success", so this patch reduces number of function calls to that function. http://reviews.llvm.org/D10333 llvm-svn: 239409
* Modify llvm-readobj to dump symbol record bytes.Zachary Turner2015-02-181-10/+23
| | | | | | | | | | This will help us study the format of individual symbol records more closely. Differential Revision: http://reviews.llvm.org/D7664 Reviewed by: Timur Iskhodzhanov llvm-svn: 229730
* llvm-readobj: add IMAGE_REL_ARM_MOV32(T) to the enumerationSaleem Abdulrasool2015-01-161-0/+1
| | | | | | | Add an additional based relocation to the enumeration of based relocation names. The lack of the enumerator value causes issues when inspecting WoA binaries. llvm-svn: 226314
* llvm-readobj: add support to dump COFF export tablesSaleem Abdulrasool2015-01-031-0/+21
| | | | | | | This enhances llvm-readobj to print out the COFF export table, similar to the -coff-import option. This is useful for testing in lld. llvm-svn: 225120
* [llvm-readobj][NFC]Colin LeMahieu2014-11-191-1/+2
| | | | | | Appeasing mingw without C++11 std::to_string llvm-svn: 222369
* llvm-readobj: fix off-by-one error in COFFDumperRui Ueyama2014-11-191-4/+1
| | | | | | | | It printed out base relocation table header as table entry. This patch also makes llvm-readobj to not skip ABSOLUTE entries becuase it was confusing. llvm-svn: 222299
* llvm-readobj: teach it how to dump COFF base relocation tableRui Ueyama2014-11-191-0/+31
| | | | llvm-svn: 222289
* llvm-readobj: Don't print the Characteristics field as the SubsystemDavid Majnemer2014-11-181-1/+1
| | | | | | | We claimed that we were printing the Subystem field when we were actually printing the Characteristics field. llvm-svn: 222216
* Object, COFF: Tighten the object file parserDavid Majnemer2014-11-171-14/+22
| | | | | | | | | | | | We were a little lax in a few areas: - We pretended that import libraries were like any old COFF file, they are not. In fact, they aren't really COFF files at all, we should probably grow some specialized functionality to handle them smarter. - Our symbol iterators were more than happy to attempt to go past the end of the symbol table if you had a symbol with a bad list of auxiliary symbols. llvm-svn: 222124
* llvm-readobj, COFF: Remove an unused variableDavid Majnemer2014-11-131-3/+0
| | | | | | | printRelocation doesn't use the section contents. No functionality change intended. llvm-svn: 221871
* Object, COFF: getRelocationSymbol shouldn't assertDavid Majnemer2014-11-131-3/+3
| | | | | | | | lib/Object is supposed to be robust to malformed object files. Don't assert if we don't have a symbol table. I'll try to come up with a test case later. llvm-svn: 221870
* llvm-readobj: Print out address table when dumping COFF delay-import tableRui Ueyama2014-11-131-1/+21
| | | | llvm-svn: 221855
* [COFF] Make it clearer that the symbols subsection holds function display ↵Timur Iskhodzhanov2014-11-121-2/+2
| | | | | | name rather than just name llvm-svn: 221812
* llvm-readobj: Add support for dumping the DOS header in PE filesDavid Majnemer2014-11-051-0/+25
| | | | llvm-svn: 221333
* Object, COFF: Cleanup symbol type code, improve binutils compatibilityDavid Majnemer2014-10-311-1/+1
| | | | | | | Do a better job classifying symbols. This increases the consistency between the COFF handling code and the ELF side of things. llvm-svn: 220952
* PR21189: Teach llvm-readobj to dump bits of COFF symbol subsections required ↵Timur Iskhodzhanov2014-10-231-0/+82
| | | | | | | | | to debug using VS2012+ Reviewed at http://reviews.llvm.org/D5755 Thanks to Andrey Guskov for his help investigating this! llvm-svn: 220526
* Object: Add range iterators for COFF import/export tableRui Ueyama2014-10-091-21/+15
| | | | llvm-svn: 219383
* Remove bogus std::error_code returns form SectionRef.Rafael Espindola2014-10-081-2/+1
| | | | | | | | | | | | | | There are two methods in SectionRef that can fail: * getName: The index into the string table can be invalid. * getContents: The section might point to invalid contents. Every other method will always succeed and returning and std::error_code just complicates the code. For example, a section can have an invalid alignment, but if we are able to get to the section structure at all and create a SectionRef, we will always be able to read that invalid alignment. llvm-svn: 219314
* llvm-readobj: add support to dump (COFF) directivesSaleem Abdulrasool2014-10-071-0/+19
| | | | | | | | PE/COFF has a special section (.drectve) which can be used to pass options to the linker (similar to LC_LINKER_OPTION). Add support to llvm-readobj to print the contents of the section for tests. llvm-svn: 219228
* Fix dumping codeview line tables when there are multiple debug sectionsTimur Iskhodzhanov2014-10-061-10/+10
| | | | | | | | | | Codeview line tables for functions in different sections refer to a common STRING_TABLE_SUBSECTION for filenames. This happens when building with -Gy or with inline functions with MSVC. Original patch by Jeff Muizelaar! llvm-svn: 219125
OpenPOWER on IntegriCloud