summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
* [Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.Simon Atanasyan2013-10-071-21/+38
| | | | | | | The patch reviewed by Michael Spencer. http://llvm-reviews.chandlerc.com/D1846 llvm-svn: 192093
* Remove several unused variables.Rafael Espindola2013-10-012-7/+0
| | | | | | Patch by Alp Toker. llvm-svn: 191757
* ELF: Add support for the exclude section bit for gas compat.Benjamin Kramer2013-09-151-0/+1
| | | | llvm-svn: 190769
* Print string value for DT_RPATH and DT_RUNPATH.Joerg Sonnenberger2013-09-031-0/+4
| | | | llvm-svn: 189829
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-09-011-33/+33
| | | | llvm-svn: 189728
* Revert "Fix the build broken by r189315." and "Move everything depending on ↵Charles Davis2013-08-271-33/+33
| | | | | | | | | Object/MachOFormat.h over to Support/MachO.h." This reverts commits r189319 and r189315. r189315 broke some tests on what I believe are big-endian platforms. llvm-svn: 189321
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-08-271-33/+33
| | | | llvm-svn: 189315
* Remove byte order mark from source file.Benjamin Kramer2013-08-091-1/+1
| | | | llvm-svn: 188066
* [Object] Split the ELF interface into 3 parts.Michael J. Spencer2013-08-082-175/+134
| | | | | | | | * ELFTypes.h contains template magic for defining types based on endianess, size, and alignment. * ELFFile.h defines the ELFFile class which provides low level ELF specific access. * ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface. llvm-svn: 188022
* Remove the mblaze backend from llvm.Rafael Espindola2013-07-251-3/+1
| | | | | | Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html llvm-svn: 187145
* 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
* Don't link with the archive library programs that don't use it.Rafael Espindola2013-06-173-3/+2
| | | | llvm-svn: 184081
* 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-053-12/+9
| | | | | | | | 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
* Introduce convenience typedefs for the 4 ELF object types.Rafael Espindola2013-05-091-26/+16
| | | | llvm-svn: 181509
* Change getRelocationAdditionalInfo to be ELF only.Rafael Espindola2013-05-091-4/+4
| | | | | | | It was only implemented for ELF where it collected the Addend, so this patch also renames it to getRelocationAddend. llvm-svn: 181502
* Revert r181009.Amara Emerson2013-05-033-70/+0
| | | | llvm-svn: 181079
* Add support for reading ARM ELF build attributes.Amara Emerson2013-05-033-0/+70
| | | | | | | | | | | Build attribute sections can now be read if they exist via ELFObjectFile, and the llvm-readobj tool has been extended with an option to dump this information if requested. Regression tests are also included which exercise these features. Also update the docs with a fixed ARM ABI link and a new link to the Addenda which provides the build attributes specification. llvm-svn: 181009
* Clarify getRelocationAddress x getRelocationOffset a bit.Rafael Espindola2013-04-252-3/+7
| | | | | | | | | | getRelocationAddress is for dynamic libraries and executables, getRelocationOffset for relocatable objects. Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a test of ELF's. llvm-readobj -r now prints the same values as readelf -r. llvm-svn: 180259
* 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
OpenPOWER on IntegriCloud