summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj
Commit message (Collapse)AuthorAge
...
* Print more information about relocations.Rafael Espindola2013-04-11
| | | | | | | | | | With this patch llvm-readobj now prints if a relocation is pcrel, its length, if it is extern and if it is scattered. It also refactors the code a bit to use bit fields instead of shifts and masks all over the place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179294 91177308-0d34-0410-b5e6-96231b3b80d8
* Template MachOObjectFile over endianness too.Rafael Espindola2013-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179179 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert MachOObjectFile to a template.Rafael Espindola2013-04-09
| | | | | | | For now it is templated only on being 64 or 32 bits. I will add little/big endian next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179097 91177308-0d34-0410-b5e6-96231b3b80d8
* Template the MachO types over the word size.Rafael Espindola2013-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179051 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove two uses of getObject.Rafael Espindola2013-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178985 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove usage of InMemoryStruct in getSymbol.Rafael Espindola2013-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178984 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a use of InMemoryStruct in llvm-readobj.Rafael Espindola2013-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178981 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getObject const. Remove a const_cast.Rafael Espindola2013-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178980 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't fetch pointers from a InMemoryStruct.Rafael Espindola2013-04-05
| | | | | | | | InMemoryStruct is extremely dangerous as it returns data from an internal buffer when the endiannes doesn't match. This should fix the tests on big endian hosts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178875 91177308-0d34-0410-b5e6-96231b3b80d8
* Implements low-level object file format specific output for COFF andEric Christopher2013-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178679 91177308-0d34-0410-b5e6-96231b3b80d8
* [tools][llvm-readobj] print the name of the section when iterating the ↵Shankar Easwaran2013-03-25
| | | | | | symbol table / dynamic symbol table git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177873 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-readobj] Add ELF .dynamic table dumping.Michael J. Spencer2013-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175592 91177308-0d34-0410-b5e6-96231b3b80d8
* [readobj] Fix memory leak.Michael J. Spencer2013-02-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174687 91177308-0d34-0410-b5e6-96231b3b80d8
* [objdump,readobj] Document the purpose and goals of each tool.Michael J. Spencer2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174439 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the generic dump template. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171305 91177308-0d34-0410-b5e6-96231b3b80d8
* Dump sections. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171304 91177308-0d34-0410-b5e6-96231b3b80d8
* Print a header above the symbols. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171302 91177308-0d34-0410-b5e6-96231b3b80d8
* Check for errors. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171301 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation. Extracted from a patch by Sami Liedes!Rafael Espindola2012-12-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171300 91177308-0d34-0410-b5e6-96231b3b80d8
* Style fixes in llvm-readobj.cpp. Extracted from a patch by Sami Liedes!Rafael Espindola2012-12-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171299 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for tools/...Chandler Carruth2012-12-04
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix uses of the C99 PRI format macros not to conflict with C++11 UDLs.Benjamin Kramer2012-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152474 91177308-0d34-0410-b5e6-96231b3b80d8
* Support reading GNU symbol versions in ELFObjectFileDavid Meyer2012-03-09
| | | | | | | | | | | | * Add enums and structures for GNU version information. * Implement extraction of that information on a per-symbol basis (ELFObjectFile::getSymbolVersion). * Implement a generic interface, GetELFSymbolVersion(), for getting the symbol version from the ObjectFile (hides the templating). * Have llvm-readobj print out the version, when available. * Add a test for the new feature: readobj-elf-versioning.test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152436 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments for llvm-readobj, remove extraneous headersDavid Meyer2012-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151957 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object]David Meyer2012-03-01
| | | | | | | | Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151845 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object]David Meyer2012-03-01
* Add begin_dynamic_table() / end_dynamic_table() private interface to ELFObjectFile. * Add begin_libraries_needed() / end_libraries_needed() interface to ObjectFile, for grabbing the list of needed libraries for a shared object or dynamic executable. * Implement this new interface completely for ELF, leave stubs for COFF and MachO. * Add 'llvm-readobj' tool for dumping ObjectFile information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151785 91177308-0d34-0410-b5e6-96231b3b80d8