summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typo. NFC.Tim Northover2016-03-012-3/+3
| | | | llvm-svn: 262405
* [lanai] Add ELF enum value and relocations.Jacques Pienaar2016-03-011-1/+2
| | | | | | | | | | Add ELF enum value and relocations for Lanai backed. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17008 llvm-svn: 262394
* Reverts change r261907 and r261918Hemant Kulkarni2016-02-253-682/+265
| | | | llvm-svn: 261927
* Fix endianness issue on BE machines introduced by r261907Hemant Kulkarni2016-02-251-3/+4
| | | | llvm-svn: 261918
* [llvm-readobj] Enable GNU style sections and relocations printingHemant Kulkarni2016-02-253-265/+681
| | | | | | http://reviews.llvm.org/D17523 llvm-svn: 261907
* Remove uses of builtin comma operator.Richard Trieu2016-02-181-11/+11
| | | | | | Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261270
* [readobj] Remove uneeded braces in case statement.Michael J. Spencer2016-02-171-2/+1
| | | | llvm-svn: 261170
* Represent the dynamic table itself with a DynRegionInfo.Rafael Espindola2016-02-171-12/+17
| | | | | | | | | | | | The dynamic table is also an array of a fixed structure, so it can be represented with a DynReginoInfo. No major functionality change. The extra error checking is covered by existing tests with a broken dynamic program header. Idea extracted from r260488. I did the extra cleanups. llvm-svn: 261107
* Add a unwrapOrError utility and use it to simplify ELFDumper.cpp.Rafael Espindola2016-02-172-119/+77
| | | | | | Utility extracted from r260488. llvm-svn: 261103
* Change how readobj stores info about dynamic symbols.Rafael Espindola2016-02-171-44/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to keep both a section and a pointer to the first symbol. The oddity of keeping a section for dynamic symbols is because there is a DT_SYMTAB but no DT_SYMTABZ, so to print the table we have to find the size via a section table. The reason for still keeping a pointer to the first symbol is because we want to be able to print relocation tables even if the section table is missing (it is mandatory only for files used in linking). With this patch we keep just a DynRegionInfo. This then requires changing a few places that were asking for a Elf_Shdr but actually just needed the first symbol. The test change is to delete the program header pointer. Now that we use the information of both DT_SYMTAB and .dynsym, we don't depend on the sh_entsize of .dynsym if we see DT_SYMTAB. Note: It is questionable if it is worth it putting the effort to report broken sh_entsize given that in files with no section table we have to assume it is sizeof(Elf_Sym), but that is for another change. Extracted from r260488. llvm-svn: 261099
* Reapply r260489.Rafael Espindola2016-02-161-0/+29
| | | | | | | | | | Original commit message: [readobj] Dump DT_JMPREL relocations when outputting dynamic relocations. The bits of r260488 it depends on have been committed. llvm-svn: 260970
* Introduce a getAsRange helper.Rafael Espindola2016-02-161-25/+9
| | | | | | | | | This requires making an error message a bit more generic, but that seems a reasonable tradeoff. Extracted from r260488 but simplified a bit. llvm-svn: 260967
* Move DynRegionInfo out of the ELFDumper.Rafael Espindola2016-02-161-11/+11
| | | | | | | | This reduces indentation in preparation to adding a bit more code to it. Extracted from r260488. llvm-svn: 260963
* This reverts commit r260488 and r260489.Rafael Espindola2016-02-162-187/+98
| | | | | | | | | | | Original messages: Revert "[readobj] Handle ELF files with no section table or with no program headers." Revert "[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations." r260489 depends on r260488 and among other issues r260488 deleted error handling code. llvm-svn: 260962
* [codeview] Dump def range lengths in hexReid Kleckner2016-02-111-3/+3
| | | | | | | It makes it easier to correlate with assembly dumps, which are typically given with hex offsets. llvm-svn: 260619
* [readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.Michael J. Spencer2016-02-111-0/+28
| | | | llvm-svn: 260489
* [readobj] Handle ELF files with no section table or with no program headers.Michael J. Spencer2016-02-112-98/+159
| | | | | | | | This adds support for finding the dynamic table and dynamic symbol table via the section table or the program header table. If there's no section table an attempt is made to figure out the length of the dynamic symbol table. llvm-svn: 260488
* [readobj] Move dynamic table parsing to a new function. NFC.Michael J. Spencer2016-02-111-5/+14
| | | | llvm-svn: 260487
* [readobj] Sort switch by enum value.Michael J. Spencer2016-02-111-29/+29
| | | | | | | Sort by enum value, but keep related entries adjacent. This makes it easier to compare against documentation. llvm-svn: 260486
* [readobj] Parse sections before dynamic table.Michael J. Spencer2016-02-111-36/+36
| | | | | | | NFC. This code will be expanded to handle dynamic tables that don't have a PT_DYNAMIC. llvm-svn: 260485
* Fix const confusion while lambda function usageHemant Kulkarni2016-02-111-24/+26
| | | | llvm-svn: 260484
* Fix build failure caused in r260430Hemant Kulkarni2016-02-111-1/+1
| | | | llvm-svn: 260471
* [llvm-readobj] Option to emit readelf like outputHemant Kulkarni2016-02-105-283/+412
| | | | | | | | | New option --elf-output-style=LLVM or GNU Enables -file-headers in readelf style when elf-output-style=GNU Differential revision: http://reviews.llvm.org/D14128 llvm-svn: 260430
* Revert "[llvm-readobj] Option to emit readelf like output"Hemant Kulkarni2016-02-105-411/+283
| | | | | | This reverts commit a58765909660a7195b32e0cc8c7476168b913750. llvm-svn: 260397
* [llvm-readobj] Option to emit readelf like outputHemant Kulkarni2016-02-105-283/+411
| | | | | | | | | New option --elf-output-style=LLVM or GNU Enables -file-headers in readelf style when elf-output-style=GNU Differential revision: http://reviews.llvm.org/D14128 llvm-svn: 260391
* [llvm-readobj][ELF] Show MIPS GOT content when there is another zero-sized ↵Simon Atanasyan2016-02-091-40/+25
| | | | | | | | | | | | | section at the same address It is possible to have .got section and one or more zero-sized section at the same address. This patch first checks that GOT (or GOT PLT) section should have non-zero size using corresponding dynamic tags. Then it looks up not empty section at the specified address. Differential Revision: http://reviews.llvm.org/D16968 llvm-svn: 260245
* [codeview] Dump a missing field and change its signednessReid Kleckner2016-02-051-0/+2
| | | | llvm-svn: 259904
* Correctly handle {Always,Never}StepIntoLineDavid Majnemer2016-02-041-8/+9
| | | | llvm-svn: 259806
* Add support for S_DEFRANGE and S_DEFRANGE_SUBFIELDDavid Majnemer2016-02-041-2/+27
| | | | llvm-svn: 259805
* Make the dumper's output for variable ranges easier to readDavid Majnemer2016-02-041-24/+14
| | | | llvm-svn: 259804
* Print the OffsetStart field's relocationDavid Majnemer2016-02-031-8/+15
| | | | llvm-svn: 259723
* [llvm-readobj] Add support for dumping S_DEFRANGE symbolsDavid Majnemer2016-02-031-1/+84
| | | | llvm-svn: 259719
* [codeview] Wire up the .cv_inline_linetable directiveReid Kleckner2016-02-021-1/+1
| | | | | | | | This directive emits the binary annotations that describe line and code deltas in inlined call sites. Single-stepping through inlined frames in windbg now works. llvm-svn: 259535
* [CodeView] Fix dumping the is_stmt bit from the line tableReid Kleckner2016-01-291-1/+1
| | | | | | Bug pointed out by George Rimar. llvm-svn: 259205
* Reland "[CodeView] Use assembler directives for line tables"Reid Kleckner2016-01-291-6/+5
| | | | | | | | This reverts commit r259126 and relands r259117. This time with updated library dependencies. llvm-svn: 259130
* Revert "[CodeView] Use assembler directives for line tables"Reid Kleckner2016-01-291-5/+6
| | | | | | | | | This reverts commit r259117. The LineInfo constructor is defined in the codeview library and we have to link against it now. Doing that isn't trivial, so reverting for now. llvm-svn: 259126
* Silence gcc warning about ternary and enumerationsReid Kleckner2016-01-281-299/+0
| | | | llvm-svn: 259123
* [CodeView] Use assembler directives for line tablesReid Kleckner2016-01-281-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new family of .cv_* directives to LLVM's variant of GAS syntax: - .cv_file: Similar to DWARF .file directives - .cv_loc: Similar to the DWARF .loc directive, but starts with a function id. CodeView line tables are emitted by function instead of by compilation unit, so we needed an extra field to communicate this. Rather than overloading the .loc direction further, we decided it was better to have our own directive. - .cv_stringtable: Emits the codeview string table at the current position. Currently this just contains the filenames as null-terminated strings. - .cv_filechecksums: Emits the file checksum table for all files used with .cv_file so far. There is currently no support for emitting actual checksums, just filenames. This moves the line table emission code down into the assembler. This is in preparation for implementing the inlined call site line table format. The inline line table format encoding algorithm requires knowing the absolute code offsets, so it must run after the assembler has laid out the code. David Majnemer collaborated on this patch. llvm-svn: 259117
* One more batch of self-containing headers.Benjamin Kramer2016-01-271-0/+1
| | | | llvm-svn: 258974
* Remove superfluous call to std::to_string that's breaking the cygwin build.Benjamin Kramer2016-01-271-2/+1
| | | | llvm-svn: 258928
* Remove autoconf supportChris Bieneman2016-01-261-18/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Fix comparison warning (r258845)Hemant Kulkarni2016-01-261-1/+1
| | | | llvm-svn: 258856
* Fixes build break introduced by r258845Hemant Kulkarni2016-01-261-1/+1
| | | | llvm-svn: 258854
* [llvm-readobj] Add -elf-section-groups optionHemant Kulkarni2016-01-263-10/+67
| | | | | | | | | Adds a way to inspect SHT_GROUP sections in ELF objects. Displays signature, member sections of these sections. Differential revision: http://reviews.llvm.org/D16555 llvm-svn: 258845
* [ARM] Add DSP build attribute and extension targetingBradley Smith2016-01-252-0/+13
| | | | | | | | This patch was originally committed as r257885, but was reverted due to windows failures. The cause of these failures has been fixed under r258677, hence re-committing the original patch. llvm-svn: 258683
* [readobj] Print CodeOffset first, it's easier to readReid Kleckner2016-01-201-5/+5
| | | | llvm-svn: 258368
* [llvm-readobj][ELF] Teach llvm-readobj to show arch specific ELF section's flagsSimon Atanasyan2016-01-201-2/+47
| | | | | | | | | | | | | | Some architecture specific ELF section flags might have the same value (for example SHF_X86_64_LARGE and SHF_HEX_GPREL) and we have to check machine architectures to select an appropriate set of possible flags. The patch selects architecture specific flags into separate arrays `ElfxxxSectionFlags` and combines `ElfSectionFlags` and `ElfxxxSectionFlags` before pass to the `StreamWriter::printFlags()` method. Differential Revision: http://reviews.llvm.org/D16269 llvm-svn: 258334
* Use new function name. NFC.Rafael Espindola2016-01-181-3/+2
| | | | llvm-svn: 258079
* [llvm-readobj][ELF] s/dyn_rela_/dyn_rel_/ No functional changes.Simon Atanasyan2016-01-181-16/+16
| | | | | | | Follow up to r258001. These template functions might return both REL and RELA relocations. The 'rel' noun looks less ambiguous. llvm-svn: 258060
* [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
OpenPOWER on IntegriCloud