summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/COFFDumper.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Object: Move auxiliary symbol definitions from llvm-readobjDavid Majnemer2014-03-191-26/+7
| | | | | | | | | | | | Summary: These definitions are useful to other aspects of LLVM, move them out. Reviewers: rafael, nrieck, ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3105 llvm-svn: 204213
* Object/COFF: Add function to check if section number is reserved one.Rui Ueyama2014-03-181-1/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D3103 llvm-svn: 204199
* [C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make ↵Alexey Samsonov2014-03-181-51/+40
| | | | | | | | | | | | | | it work with range-based for loops. Reviewers: ruiu Reviewed By: ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3097 llvm-svn: 204120
* llvm-readobj: Print referred symbol name for CLR token definitionNico Rieck2014-03-171-1/+10
| | | | llvm-svn: 204024
* llvm-readobj: Add test for COFF auxiliary symbols as used by C++/CLINico Rieck2014-03-171-1/+3
| | | | llvm-svn: 204023
* [C++11] Introduce SectionRef::relocations() to use range-based loopsAlexey Samsonov2014-03-141-22/+20
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3077 llvm-svn: 203927
* Object: rename ARMV7 to ARMNTSaleem Abdulrasool2014-03-111-1/+1
| | | | | | | The official specifications state the name to be ARMNT (as per the Microsoft Portable Executable and Common Object Format Specification v8.3). llvm-svn: 203530
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-3/+2
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-021-6/+6
| | | | llvm-svn: 202621
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-101-18/+18
| | | | llvm-svn: 201108
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-301-42/+10
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* Rename IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.Rui Ueyama2014-01-271-2/+1
| | | | | | | editbin.exe and link.exe both accepts /highentropyva option to set this bit, so doing s/VIRTUAL_ADDRESS/VA/ should make sense. llvm-svn: 200191
* COFF: Add a missing enum value for high entropy ASLR.Rui Ueyama2014-01-261-0/+2
| | | | | | | | | That bit is not documented in the PE/COFF spec published by Microsoft, so we don't know the official name of it. I named this bit IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS because the bit is reported as "high entropy virtual address" by dumpbin.exe, llvm-svn: 200121
* llvm-readobj: add support for PE32+ (Windows 64 bit executable).Rui Ueyama2014-01-261-48/+63
| | | | | | | | | | | | PE32+ supports 64 bit address space, but the file format remains 32 bit. So its file format is pretty similar to PE32 (32 bit executable). The differences compared to PE32 are (1) the lack of "BaseOfData" field and (2) some of its data members are 64 bit. In this patch, I added a new member function to get a PE32+ Header object to COFFObjectFile class and made llvm-readobj to use it. llvm-svn: 200117
* Re-sort #include lines again, prior to moving headers around.Chandler Carruth2014-01-131-5/+2
| | | | llvm-svn: 199080
* Teach the llvm-readobj COFF dumper to dump debug line tables from object filesTimur Iskhodzhanov2013-12-191-0/+165
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2425 llvm-svn: 197674
* Retry submitting r186623: COFFDumper: Dump data directory entries.Rui Ueyama2013-07-191-0/+24
| | | | | | | | The original change was rolled back in r186627 because of test failures on the big endian machine. I believe I fixed the issue so re-submitting. llvm-svn: 186734
* Revert "COFFDumper: Dump data directory entries."Rui Ueyama2013-07-181-24/+0
| | | | | | Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623. llvm-svn: 186627
* COFFDumper: Dump data directory entries.Rui Ueyama2013-07-181-0/+24
| | | | | | | | | | | | | | | | | Summary: Dump optional data directory entries in the PE/COFF header, so that we can test the output of LLD linker. This patch updates the test binary file, but the source of the binary is the same. I just re-linked the file. I don't know how the previous file was linked, but the previous file did not have any data directory entries for some reason. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1148 llvm-svn: 186623
* COFFDumper: Print uint64_t with the right format string.Benjamin Kramer2013-07-061-3/+3
| | | | | | I wish we could typecheck llvm::format. llvm-svn: 185766
* readobj: Dump PE/COFF optional records.Rui Ueyama2013-06-121-11/+77
| | | | | | | | | | | | These records are mandatory for executables and are used by the loader. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D939 llvm-svn: 183852
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-051-5/+3
| | | | | | | | In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. llvm-svn: 183284
* llvm-readobj: Dump more COFF auxiliary recordsNico Rieck2013-04-221-1/+6
| | | | llvm-svn: 180007
* llvm-readobj: Check for null section pointerNico Rieck2013-04-221-1/+1
| | | | llvm-svn: 180006
* llvm-readobj: Do not print NULL StringRefsNico Rieck2013-04-221-3/+3
| | | | llvm-svn: 180005
* Add -expand-relocs to llvm-readobjNico Rieck2013-04-121-5/+12
| | | | | | | | | | | | | | This option expands shown relocations from single line to a dictionary format: Relocation { Offset: 0x4 Type: R_386_32 (1) Symbol: sym Info: 0x0 } llvm-svn: 179359
* Implements low-level object file format specific output for COFF andEric Christopher2013-04-031-0/+1014
ELF with support for: - File headers - Section headers + data - Relocations - Symbols - Unwind data (only COFF/Win64) The output format follows a few rules: - Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses. - Hex numbers are output in uppercase, prefixed with "0x". - Flags are sorted alphabetically. - Lists and groups are always delimited. Example output: ---------- snip ---------- Sections [ Section { Index: 1 Name: .text (5) Type: SHT_PROGBITS (0x1) Flags [ (0x6) SHF_ALLOC (0x2) SHF_EXECINSTR (0x4) ] Address: 0x0 Offset: 0x40 Size: 33 Link: 0 Info: 0 AddressAlignment: 16 EntrySize: 0 Relocations [ 0x6 R_386_32 .rodata.str1.1 0x0 0xB R_386_PC32 puts 0x0 0x12 R_386_32 .rodata.str1.1 0x0 0x17 R_386_PC32 puts 0x0 ] SectionData ( 0000: 83EC04C7 04240000 0000E8FC FFFFFFC7 |.....$..........| 0010: 04240600 0000E8FC FFFFFF31 C083C404 |.$.........1....| 0020: C3 |.| ) } ] ---------- snip ---------- Relocations and symbols can be output standalone or together with the section header as displayed in the example. This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated. Patch by Nico Rieck! llvm-svn: 178679
OpenPOWER on IntegriCloud