summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* Use pointers to iterate over symbols.Rafael Espindola2013-04-241-1/+3
| | | | | | | | While here, don't report a dummy symbol for relocations that don't have symbols. We used to says such relocations were for the first defined symbol, but now we return end_symbols(). The llvm-readobj output change agrees with otool. llvm-svn: 180214
* 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-223-11/+10
| | | | llvm-svn: 180005
* At Jim Grosbach's request detemplate Object/MachO.h.Rafael Espindola2013-04-181-75/+58
| | | | | | | We are still able to handle mixed endian objects by swapping one struct at a time. llvm-svn: 179778
* Remove getters now that we can specialize structs on the host endianness.Rafael Espindola2013-04-151-3/+3
| | | | llvm-svn: 179534
* Finish templating MachObjectFile over endianness.Rafael Espindola2013-04-131-52/+80
| | | | | | | We are now able to handle big endian macho files in llvm-readobject. Thanks to David Fang for providing the object files. llvm-svn: 179440
* Teach llvm-readobj to print ELF program headersNico Rieck2013-04-123-5/+58
| | | | llvm-svn: 179363
* Add -expand-relocs to llvm-readobjNico Rieck2013-04-125-23/+59
| | | | | | | | | | | | | | 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
* Add 179294 back, but don't use bit fields so that it works on big endian hosts.Rafael Espindola2013-04-121-4/+12
| | | | | | | | | | | | | | Original message: Print more information about relocations. 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. llvm-svn: 179345
* Revert my last two commits while I debug what is wrong in a big endian host.Rafael Espindola2013-04-111-12/+4
| | | | llvm-svn: 179303
* Print more information about relocations.Rafael Espindola2013-04-111-4/+12
| | | | | | | | | | 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. llvm-svn: 179294
* Template MachOObjectFile over endianness too.Rafael Espindola2013-04-101-8/+8
| | | | llvm-svn: 179179
* Convert MachOObjectFile to a template.Rafael Espindola2013-04-091-13/+15
| | | | | | | For now it is templated only on being 64 or 32 bits. I will add little/big endian next. llvm-svn: 179097
* Template the MachO types over the word size.Rafael Espindola2013-04-081-5/+6
| | | | llvm-svn: 179051
* Remove two uses of getObject.Rafael Espindola2013-04-071-13/+2
| | | | llvm-svn: 178985
* Remove usage of InMemoryStruct in getSymbol.Rafael Espindola2013-04-071-26/+6
| | | | llvm-svn: 178984
* Remove a use of InMemoryStruct in llvm-readobj.Rafael Espindola2013-04-071-9/+6
| | | | llvm-svn: 178981
* Make getObject const. Remove a const_cast.Rafael Espindola2013-04-071-1/+1
| | | | llvm-svn: 178980
* Don't fetch pointers from a InMemoryStruct.Rafael Espindola2013-04-051-15/+8
| | | | | | | | 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. llvm-svn: 178875
* Implements low-level object file format specific output for COFF andEric Christopher2013-04-0315-426/+3073
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [tools][llvm-readobj] print the name of the section when iterating the ↵Shankar Easwaran2013-03-251-12/+19
| | | | | | symbol table / dynamic symbol table llvm-svn: 177873
* [llvm-readobj] Add ELF .dynamic table dumping.Michael J. Spencer2013-02-204-0/+228
| | | | llvm-svn: 175592
* [readobj] Fix memory leak.Michael J. Spencer2013-02-081-1/+2
| | | | llvm-svn: 174687
* [objdump,readobj] Document the purpose and goals of each tool.Michael J. Spencer2013-02-051-4/+7
| | | | llvm-svn: 174439
* Use the generic dump template. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-53/+19
| | | | llvm-svn: 171305
* Dump sections. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-0/+76
| | | | llvm-svn: 171304
* Print a header above the symbols. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-0/+12
| | | | llvm-svn: 171302
* Check for errors. Extracted from a patch by Sami Liedes.Rafael Espindola2012-12-311-6/+12
| | | | llvm-svn: 171301
* Fix indentation. Extracted from a patch by Sami Liedes!Rafael Espindola2012-12-311-32/+32
| | | | llvm-svn: 171300
* Style fixes in llvm-readobj.cpp. Extracted from a patch by Sami Liedes!Rafael Espindola2012-12-311-28/+18
| | | | llvm-svn: 171299
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-6/+6
| | | | | | | | 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. llvm-svn: 169252
* Fix uses of the C99 PRI format macros not to conflict with C++11 UDLs.Benjamin Kramer2012-03-101-3/+3
| | | | llvm-svn: 152474
* Support reading GNU symbol versions in ELFObjectFileDavid Meyer2012-03-091-10/+24
| | | | | | | | | | * 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 llvm-svn: 152436
* Fix comments for llvm-readobj, remove extraneous headersDavid Meyer2012-03-021-5/+9
| | | | llvm-svn: 151957
* [Object]David Meyer2012-03-011-0/+12
| | | | | | Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. llvm-svn: 151845
* [Object]David Meyer2012-03-014-0/+233
* 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. llvm-svn: 151785
OpenPOWER on IntegriCloud