summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [yaml2obj][ELF] Convert some static functions into class members toSimon Atanasyan2014-04-021-149/+159
| | | | | | | | reduce number of arguments. No functional changes. llvm-svn: 205434
* [yaml2obj][ELF] Remove unused typedef.Simon Atanasyan2014-04-021-1/+0
| | | | | | No functional changes. llvm-svn: 205433
* [yaml2obj][ELF] Move section index to the ELFState class.Simon Atanasyan2014-04-021-32/+39
| | | | | | No functional changes. llvm-svn: 205432
* [yaml2obj][ELF] Remove relationship between ELFStateSimon Atanasyan2014-04-021-13/+6
| | | | | | | | | and ContiguousBlobAccumulator classes. Pass ContiguousBlobAccumulator to the handleSymtabSectionHeader function directly. No functional changes. llvm-svn: 205431
* [yaml2obj] Add support for ELF e_flags.Daniel Sanders2014-03-311-0/+1
| | | | | | | | | | | | | | | | Summary: The FileHeader mapping now accepts an optional Flags sequence that accepts the EF_<arch>_<flag> constants. When not given, Flags defaults to zero. Reviewers: atanasyan Reviewed By: atanasyan CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3213 llvm-svn: 205173
* Windows: canonicalise the default windows tripleSaleem Abdulrasool2014-03-291-1/+2
| | | | | | | Canonicalise the default triple that is used on Windows. This should hopefully fix the MSVC buildbots. llvm-svn: 205070
* Add missing include (for r205050)David Blaikie2014-03-281-0/+1
| | | | llvm-svn: 205053
* llvm-mc: error when -compress-debug-sections is requested and zlib is not linkedDavid Blaikie2014-03-281-1/+6
| | | | | | | | | | This is a bit of a stab in the dark, since I have zlib on my machine. Just going to bounce it off the bots & see if it sticks. Do we have some convention for negative REQUIRES: checks? Or do I just need to add a feature like I've done here? llvm-svn: 205050
* DebugInfo: Support for compressed debug info sectionsDavid Blaikie2014-03-271-0/+6
| | | | | | | | | | | | | | | | | | | 1) When creating a .debug_* section and instead create a .zdebug_ section. 2) When creating a fragment in a .zdebug_* section, make it a compressed fragment. 3) When computing the size of a compressed section, compress the data and use the size of the compressed data. 4) Emit the compressed bytes. Also, check that only if a section has a compressed fragment, then that is the only fragment in the section. Assert-fail if the fragment's data is modified after it is compressed. Initial review on llvm-commits by Eric Christopher and Rafael Espindola. llvm-svn: 204958
* Update MCSymbolizer and its subclasses' constructors to reflect the fact thatLang Hames2014-03-271-1/+2
| | | | | | they take ownership of the RelocationInfo they're constructed with. llvm-svn: 204891
* Create .symtab_shndxr only when needed.Rafael Espindola2014-03-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | We need .symtab_shndxr if and only if a symbol references a section with an index >= 0xff00. The old code was trying to figure out if the section was needed ahead of time, making it a fairly dependent on the code actually writing the table. It was also somewhat conservative and would create the section in cases where it was not needed. If I remember correctly, the old structure was there so that the sections were created in the same order gas creates them. That was valuable when MC's support for ELF was new and we tested with elf-dump.py. This patch refactors the symbol table creation to another class and makes it obvious that .symtab_shndxr is really only created when we are about to output a reference to a section index >= 0xff00. While here, also improve the tests to use macros. One file is one section short of needing .symtab_shndxr, the second one has just the right number. llvm-svn: 204769
* DebugInfo: Support debug_loc under fissionDavid Blaikie2014-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | Implement debug_loc.dwo, as well as llvm-dwarfdump support for dumping this section. Outlined in the DWARF5 spec and http://gcc.gnu.org/wiki/DebugFission the debug_loc.dwo section has more variation than the standard debug_loc, allowing 3 different forms of entry (plus the end of list entry). GCC seems to, and Clang certainly, only use one form, so I've just implemented dumping support for that for now. It wasn't immediately obvious that there was a good refactoring to share the implementation of dumping support between debug_loc and debug_loc.dwo, so they're separate for now - ideas welcome or I may come back to it at some point. As per a comment in the code, we could choose different forms that may reduce the number of debug_addr entries we emit, but that will require further study. llvm-svn: 204697
* VS integration installer: set SUCCESS=1 if we find VS 2013Hans Wennborg2014-03-241-2/+3
| | | | | | | | | | Previously we would print an error message on machines where the only VS version we find is 2013, even though we successfully install the integration files for it. Also, we shouldn't have two END labels. llvm-svn: 204629
* Teach llvm-readobj to print human friendly description of reserved sections.Rafael Espindola2014-03-241-2/+22
| | | | llvm-svn: 204584
* llvm-profdata: Check for bad data in the show commandJustin Bogner2014-03-231-0/+2
| | | | llvm-svn: 204573
* llvm-profdata: Use Format.h instead of handrolling a formatterJustin Bogner2014-03-231-19/+2
| | | | llvm-svn: 204571
* llvm-profdata doesn't require LLVMCore.NAKAMURA Takumi2014-03-232-2/+2
| | | | llvm-svn: 204552
* llvm-profdata: Avoid F_Text in "merge" for now, since "llvm-profdata show" ↵NAKAMURA Takumi2014-03-221-1/+2
| | | | | | | is confused with CRLF. FIXME: line_iterator should be tolerant of CR. llvm-svn: 204540
* ProfileData: Introduce InstrProfWriter using the naive text formatJustin Bogner2014-03-211-35/+15
| | | | | | | | | | | This isn't a format we'll want to write out in practice, but moving it to the writer library simplifies llvm-profdata and isolates it from further changes to the format. This also allows us to update the tests to not rely on the text output format. llvm-svn: 204489
* llvm-profdata: Implement show commandJustin Bogner2014-03-211-2/+98
| | | | | | | The `llvm-profdata show` command summarizes a profdata file's contents in a human readable format. llvm-svn: 204485
* ProfileData: Introduce the InstrProfReader interface and a text readerJustin Bogner2014-03-214-71/+37
| | | | | | | | | | This introduces the ProfileData library and updates llvm-profdata to use this library for reading profiles. InstrProfReader is an abstract base class that will be subclassed for both the raw instrprof data from compiler-rt and the efficient instrprof format that will be used for PGO. llvm-svn: 204482
* llvm-objdump output hex to match binutils' objdumpGreg Fitzgerald2014-03-201-2/+8
| | | | | | Patch by Ted Woodward llvm-svn: 204409
* Remove llvm-mc's disable-cfi option.Rafael Espindola2014-03-201-7/+4
| | | | | | It was dead. llvm-svn: 204404
* llvm-profdata: Remove an empty commentJustin Bogner2014-03-201-1/+0
| | | | llvm-svn: 204370
* Object: Output .file symbols properlyDavid Majnemer2014-03-201-1/+2
| | | | | | | obj2yaml would emit the NUL bytes padding the auxiliary file symbol records. Trimming them looks nicer. llvm-svn: 204314
* Object: Abstract out the determination of function line symbolsDavid Majnemer2014-03-201-1/+1
| | | | | | No functionality change. llvm-svn: 204313
* Object: Provide a richer means of describing auxiliary symbolsDavid Majnemer2014-03-195-31/+192
| | | | | | | | | | | | | | | | The current state of affairs has auxiliary symbols described as a big bag of bytes. This is less than satisfying, it detracts from the YAML file as being human readable. Instead, allow for symbols to optionally contain their auxiliary data. This allows us to have a much higher level way of describing things like weak symbols, function definitions and section definitions. This depends on D3105. Differential Revision: http://llvm-reviews.chandlerc.com/D3092 llvm-svn: 204214
* Object: Move auxiliary symbol definitions from llvm-readobjDavid Majnemer2014-03-191-26/+7
| | | | | | | | | | | | Summary: These definitions are useful to other aspects of LLVM, move them out. Reviewers: rafael, nrieck, ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3105 llvm-svn: 204213
* llvm-profdata: Make "merge" into a subcommand.Justin Bogner2014-03-191-16/+51
| | | | | | We'll be adding a few more subcommands in the near future. llvm-svn: 204211
* llvm-profdata: Update to use the naive text format with function hashJustin Bogner2014-03-191-101/+53
| | | | | | This also uses line_iterator to simplify the parsing logic. llvm-svn: 204210
* Object/COFF: Add function to check if section number is reserved one.Rui Ueyama2014-03-182-4/+3
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D3103 llvm-svn: 204199
* Darwin: Add assembler directives to create version-min load commands.Jim Grosbach2014-03-181-0/+12
| | | | | | | | | | | | Allow object files to be tagged with a version-min load command for iOS or MacOSX. Teach macho-dump to understand the version-min load commands for testcases. rdar://11337778 llvm-svn: 204190
* Use early returns to reduce nesting.Rui Ueyama2014-03-181-69/+69
| | | | llvm-svn: 204171
* [C++11] Change the interface of getCOFF{Section,Relocation,Symbol} to make ↵Alexey Samsonov2014-03-184-69/+54
| | | | | | | | | | | | | | it work with range-based for loops. Reviewers: ruiu Reviewed By: ruiu CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3097 llvm-svn: 204120
* [C++11] Introduce ObjectFile::symbols() to use range-based loops.Alexey Samsonov2014-03-176-67/+62
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3081 llvm-svn: 204031
* llvm-readobj: Print referred symbol name for CLR token definitionNico Rieck2014-03-171-1/+10
| | | | llvm-svn: 204024
* llvm-readobj: Add test for COFF auxiliary symbols as used by C++/CLINico Rieck2014-03-171-1/+3
| | | | llvm-svn: 204023
* Support: Make error_category's constructor publicJustin Bogner2014-03-151-1/+1
| | | | | | | | Since our error_category is based on the std one, we should have the same visibility for the constructor. This also allows us to avoid using the _do_message implementation detail in our own categories. llvm-svn: 203998
* Object/COFF: change data type of SymbolNumber from int16 to uint16.Rui Ueyama2014-03-151-1/+3
| | | | | | | | | | | | Microsoft PE/COFF Spec clearly states that the field is of signed interger type. However, in reality, it's unsigned. If cl.exe needs to create a large number of sections for COMDAT sections, it will just create more than 32768 sections. Handling large section number as negative number is not correct. I think this is a spec bug. Differential Revision: http://llvm-reviews.chandlerc.com/D3088 llvm-svn: 203986
* Fix a bug introduced during the transition to PathV2.Rafael Espindola2014-03-141-1/+1
| | | | | | | | | sys::fs::createUniqueFile returns an absolute path, so MakeSharedObject does too and we don't need to add a './' prefix. Patch by Jon McLachlan. llvm-svn: 203931
* [C++11] Introduce SectionRef::relocations() to use range-based loopsAlexey Samsonov2014-03-145-67/+57
| | | | | | | | | | | | Reviewers: rafael Reviewed By: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3077 llvm-svn: 203927
* [yaml2obj][ELF] Use range-based for loops.Simon Atanasyan2014-03-141-4/+2
| | | | llvm-svn: 203900
* [yaml2obj][ELF] Refer to a section in the error message by its name notSimon Atanasyan2014-03-141-1/+1
| | | | | | index. llvm-svn: 203899
* [yaml2obj][ELF] Remove unused ELFState class field.Simon Atanasyan2014-03-141-7/+4
| | | | llvm-svn: 203898
* [yaml2obj][ELF] Assign name (.shstrtab) to the section holds sections names.Simon Atanasyan2014-03-141-0/+1
| | | | llvm-svn: 203897
* static link polly into toolsSebastian Pop2014-03-145-6/+46
| | | | llvm-svn: 203886
* [C++11] Use ObjectFile::sections() in commandline llvm toolsAlexey Samsonov2014-03-135-114/+111
| | | | llvm-svn: 203802
* Back out Profile library and dependent commitsJustin Bogner2014-03-124-266/+120
| | | | | | | | | Chandler voiced some concern with checking this in without some discussion first. Reverting for now. This reverts r203703, r203704, r203708, and 203709. llvm-svn: 203723
* Profile: Remove an inefficient and unnecessary API functionJustin Bogner2014-03-121-7/+7
| | | | | | | This was leftover from an approach I abandoned, but I forgot to update it before committing. llvm-svn: 203708
* llvm-profdata: Use the Profile library, implement show and generateJustin Bogner2014-03-124-120/+266
| | | | | | | | This replaces the llvm-profdata tool with a version that uses the recently introduced Profile library. The new tool has the ability to generate and summarize profdata files as well as merging them. llvm-svn: 203704
OpenPOWER on IntegriCloud