summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/ELFDumper.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-readobj][ELF] Teach llvm-readobj to show dynamic relocation in REL formatSimon Atanasyan2016-01-161-34/+69
| | | | | | | | | | MIPS 32-bit ABI uses REL relocation record format to save dynamic relocations. The patch teaches llvm-readobj to show dynamic relocations in this format. Differential Revision: http://reviews.llvm.org/D16114 llvm-svn: 258001
* Fixed CRLF->LF line endings from r257914. NFC.George Rimar2016-01-161-8/+8
| | | | llvm-svn: 257990
* [llvm-readobj] Dump DT_RELACOUNT correctly.Davide Italiano2016-01-161-0/+2
| | | | llvm-svn: 257988
* Revert of 57967George Rimar2016-01-161-1/+2170
| | | | | | | Initial commit message: CRLF -> LF. NFC llvm-svn: 257973
* CRLF -> LF. NFCGeorge Rimar2016-01-161-2170/+1
| | | | llvm-svn: 257967
* Recommit r257912George Rimar2016-01-151-6/+8
| | | | | | | | | | | | | | Added forgotten ELFDumper.cpp to commit. Initial commit message: [llvm-readobj] Add support for TLSDESC_PLT and TLSDESC_GOT dynamic section tags to the llvm-readobj. If module uses uses lazy TLSDESC relocations it should define DT_TLSDESC_PLT and DT_TLSDESC_GOT entries. They were unknown for llvm-readobj before this patch. Differential revision: http://reviews.llvm.org/D16224 llvm-svn: 257914
* [WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.Dan Gohman2016-01-121-1/+2
| | | | | | | | | A request has been made to the official registry, but an official value is not yet available. This patch uses a temporary value in order to support development. When an official value is recieved, the value of EM_WEBASSEMBLY will be updated. llvm-svn: 257517
* [llvm-readobj/ELF] Simplify Verdef handling.Davide Italiano2015-12-041-7/+1
| | | | llvm-svn: 254751
* [llvm-readobj] Don't cast qualifiers away. Now gcc is happy again.Davide Italiano2015-10-231-7/+8
| | | | | | Reported by: mikael.holmen at ericsson.com llvm-svn: 251117
* [llvm-readobj] Teach ELFDumper about symbol versioning.Davide Italiano2015-10-161-6/+97
| | | | | | Differential Revision: http://reviews.llvm.org/D13824 llvm-svn: 250575
* [llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.Davide Italiano2015-10-151-0/+4
| | | | llvm-svn: 250464
* [llvm-readobj/ELF] Print GNU Hash sectionIgor Kudrin2015-10-141-0/+24
| | | | | | | | Add a new command line switch, -gnu-hash-table, to print the content of that section. Differential Revision: http://reviews.llvm.org/D13696 llvm-svn: 250291
* Fix printing of 64 bit values and make test more strict.Rafael Espindola2015-10-011-5/+4
| | | | llvm-svn: 249043
* Avoid SEGFAULT if a requested symbol section is absent.Rafael Espindola2015-09-211-0/+2
| | | | | | Patch by Igor Kudrin! llvm-svn: 248194
* Pass a symbol table to getRelocationSymbol instead of returning one.Rafael Espindola2015-09-021-18/+18
| | | | | | | This removes a report_fatal_error from library and avoids checking a section property for every section entry. llvm-svn: 246656
* [llvm-readobj/ELF] Factor out common code.Davide Italiano2015-08-231-12/+11
| | | | llvm-svn: 245813
* Don't iterate over all sections in the ELFFile constructor.Rafael Espindola2015-08-101-12/+31
| | | | | | | With this we finally have an ELFFile that is O(1) to construct. This is helpful for programs like lld which have to do their own section walk. llvm-svn: 244510
* Delete getDotSymtabSec.Rafael Espindola2015-08-101-4/+11
| | | | | | Another step in avoiding iterating over all sections in the ELFFile constructor. llvm-svn: 244496
* Don't look for a SHT_DYNSYM in the ELFFile's constructor.Rafael Espindola2015-08-071-2/+9
| | | | | | Yet another step in not having it scan every section. llvm-svn: 244353
* Remove the symbol iteration functions that don't take a symbol table.Rafael Espindola2015-08-071-2/+2
| | | | | | Another step in making ELFFile's constructor not iterate over all sections. llvm-svn: 244351
* Add dynamic_table iterators back to ELF.h.Rafael Espindola2015-08-071-22/+15
| | | | | | | | | In tree they are only used by llvm-readobj, but it is also used by https://github.com/mono/CppSharp. While at it, add some missing error checking. llvm-svn: 244320
* ELF: Add AMDGPU specific defintionsTom Stellard2015-08-071-2/+24
| | | | | | | | | | Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11458 llvm-svn: 244303
* [llvm-readobj] Convert to range-loops.Davide Italiano2015-08-071-2/+2
| | | | llvm-svn: 244300
* Move to llvm-readobj code that is only used there.Rafael Espindola2015-08-061-20/+213
| | | | | | | | | | lld might end up using a small part of this, but it will be in a much refactored form. For now this unblocks avoiding the full section scan in the ELFFile constructor. This also has a (very small) error handling improvement. llvm-svn: 244282
* [Mips] Support DT_MIPS_RLD_MAP_REL dynamic section tag in the llvm-readobjSimon Atanasyan2015-08-011-0/+2
| | | | llvm-svn: 243833
* Support printing relocations in files with no section table.Rafael Espindola2015-07-231-4/+9
| | | | llvm-svn: 242998
* Use typdef to simplify the code. NFC.Rafael Espindola2015-07-231-40/+41
| | | | llvm-svn: 242995
* Delete ELFEntityIterator. NFC.Rafael Espindola2015-07-221-31/+34
| | | | llvm-svn: 242901
* Don't iterate over the program headers in the constructor of ELFFile.Rafael Espindola2015-07-211-28/+162
| | | | | | | | | Not every program needs this information. In particular, it is necessary and sufficient for a static linker to scan the section table. llvm-svn: 242833
* Make printValue a member function.Rafael Espindola2015-07-211-6/+7
| | | | | | We were already passing 3 values it can get from ELFDumper. llvm-svn: 242829
* Remove always null argument.Rafael Espindola2015-07-211-2/+1
| | | | llvm-svn: 242828
* Replace the last uses of ELF::getSymbolName in llvm-readobj.Rafael Espindola2015-07-211-1/+2
| | | | llvm-svn: 242798
* Use helper function. NFC.Rafael Espindola2015-07-211-3/+1
| | | | llvm-svn: 242795
* llvm-readobj: use the associated string table to print symbols. NFI.Rafael Espindola2015-07-211-16/+44
| | | | | | | This just removes some cases that require ELFFile to eagerly parse the ELF file. llvm-svn: 242794
* Simplify printing the soname. NFC.Rafael Espindola2015-07-211-0/+5
| | | | llvm-svn: 242786
* Simplify now that we can iterate backwards. NFC.Rafael Espindola2015-07-201-3/+16
| | | | llvm-svn: 242715
* Remove Elf_Rela_Iter and Elf_Rel_Iter.Rafael Espindola2015-07-201-27/+19
| | | | | | Use just the pointers and check for invalid relocation sections. llvm-svn: 242700
* Simplify iterating over program headers and detect corrupt ones.Rafael Espindola2015-07-201-13/+11
| | | | | | We now use a simple pointer and have range loops. llvm-svn: 242669
* llvm-readobj: Handle invalid references to the string table.Rafael Espindola2015-07-201-4/+12
| | | | llvm-svn: 242658
* llvm-readobj: call exit(1) on error.Rafael Espindola2015-07-201-12/+10
| | | | | | | | | 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
* [Object][ELF] Support dumping hash-tables from files with no section table.Michael J. Spencer2015-07-091-0/+13
| | | | | | This time without breaking the bots. llvm-svn: 241869
* [llvm-readobj] Print MIPS PLT tableSimon Atanasyan2015-07-091-73/+164
| | | | | | Now the -mips-plt-got prints both MIPS GOT and PLT tables. llvm-svn: 241836
* Temporarily reverting 241765, 241768, and 241772 to unbreak the build bots.Adrian Prantl2015-07-091-13/+0
| | | | llvm-svn: 241781
* [Object][ELF] Support dumping hash-tables from files with no section table.Michael J. Spencer2015-07-091-0/+13
| | | | llvm-svn: 241765
* Return ErrorOr from getSection.Rafael Espindola2015-07-011-11/+19
| | | | | | | | | | | | | | This also improves the logic of what is an error: * getSection(uint_32): only return an error if the index is out of bounds. The index 0 corresponds to a perfectly valid entry. * getSection(Elf_Sym): Returns null for symbols that normally don't have sections and error for out of bound indexes. In many places this just moves the report_fatal_error up the stack, but those can then be fixed in smaller patches. llvm-svn: 241156
* Use range loops. NFC.Rafael Espindola2015-06-301-30/+24
| | | | llvm-svn: 241105
* Fix the name of the iterator functions to match the coding standards.Rafael Espindola2015-06-301-18/+18
| | | | llvm-svn: 241074
* Convert obj->getSymbolName to sym->getName.Rafael Espindola2015-06-291-2/+1
| | | | | | I doesn't depend on the object anymore. llvm-svn: 240996
* Factor out the checking of string tables.Rafael Espindola2015-06-291-2/+5
| | | | | | | | | | This moves the error checking for string tables to getStringTable which returns an ErrorOr<StringRef>. This improves error checking, makes it uniform across all string tables and makes it possible to check them once instead of once per name. llvm-svn: 240950
* Remove Elf_Sym_Iter.Rafael Espindola2015-06-291-33/+30
| | | | | | | | | | | | | | | | | | | It was a fairly broken concept for an ELF only class. An ELF file can have two symbol tables, but they have exactly the same format. There is no concept of a dynamic or a static symbol. Storing this on the iterator also makes us do more work per symbol than necessary. To fetch a name we would: * Find if we had a static or a dynamic symbol. * Look at the corresponding symbol table and find the string table section. * Look at the string table section to fetch its contents. * Compute the name as a substring of the string table. All but the last step can be done per symbol table instead of per symbol. This is a step in that direction. llvm-svn: 240939
OpenPOWER on IntegriCloud