summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools: add a high level explanation for WoA EH dataSaleem Abdulrasool2014-06-071-21/+81
| | | | | | | | | | | | Add a brief explanation of the data section layout for the unwind data that the Windows on ARM EH models. This is simply to provide a rough idea of the layout of the code involved in the decoding of the unwinding. Details on the involved data structures are available in the associated support header. The bulk of it is related to printing out the byte-code to help validate generation of WoA EH. No functional change. llvm-svn: 210397
* [yaml2obj][obj2yaml] Support ELF symbol's visibility flags ↵Simon Atanasyan2014-06-062-0/+2
| | | | | | (default/hidden/protected). llvm-svn: 210316
* Add "-format darwin" to llvm-nm to be like darwin's nm(1) -m output.Kevin Enderby2014-06-051-4/+176
| | | | | | | | | | | | | | | This is a first step in seeing if it is possible to make llvm-nm produce the same output as darwin's nm(1). Darwin's default format is bsd but its -m output prints the longer Mach-O specific details. For now I added the "-format darwin" to do this (whos name may need to change in the future). As there are other Mach-O specific flags to nm(1) which I'm hoping to add some how in the future. But I wanted to see if I could get the correct output for -m flag using llvm-nm and the libObject interfaces. I got this working but would love to hear what others think about this approach to getting object/format specific details printed with llvm-nm. llvm-svn: 210285
* lld (build with configur and make) Enable buildIain Sandoe2014-06-051-3/+3
| | | | | | | r210177 added Makefiles to the lld project. This revision enables the automatic build of lld when the sources are found in tools/lld. llvm-svn: 210245
* tools: fix parenthesis warning from GCCSaleem Abdulrasool2014-06-041-1/+1
| | | | | | Add parenthesis as suggested by GCC. llvm-svn: 210194
* tools: fix silly typo in llvm-readobjSaleem Abdulrasool2014-06-041-1/+1
| | | | | | | Case insensitive case preserving file systems are not a good choice for development. llvm-svn: 210193
* tools: initial implementation of WoA EH decodingSaleem Abdulrasool2014-06-044-0/+812
| | | | | | | | | | | | | Add support to llvm-readobj to decode Windows ARM Exception Handling data. This uses the previously added datastructures to decode the information into a format that can be used by tests. This is a necessary step to add support for emitting Windows on ARM exception handling information. A fair amount of formatting inspiration is drawn from the Win64 EH printer as well as the ARM EHABI printer. This allows for a reasonably thorough look into the encoded data. llvm-svn: 210192
* tools: introduce StreamWriter::printBooleanSaleem Abdulrasool2014-06-041-0/+4
| | | | | | | Add a helper print method to print a boolean value as "Yes" or "No". This is intended to be used by the Windows ARM EH printer. llvm-svn: 210191
* [Object][ELF] Range-based loop simplification.Simon Atanasyan2014-06-041-13/+10
| | | | | | No functional changes. llvm-svn: 210164
* Allow alias to point to an arbitrary ConstantExpr.Rafael Espindola2014-06-031-6/+2
| | | | | | | | | | | | | | | | | | | | | This patch changes GlobalAlias to point to an arbitrary ConstantExpr and it is up to MC (or the system assembler) to decide if that expression is valid or not. This reduces our ability to diagnose invalid uses and how early we can spot them, but it also lets us do things like @test5 = alias inttoptr(i32 sub (i32 ptrtoint (i32* @test2 to i32), i32 ptrtoint (i32* @bar to i32)) to i32*) An important implication of this patch is that the notion of aliased global doesn't exist any more. The alias has to encode the information needed to access it in its metadata (linkage, visibility, type, etc). Another consequence to notice is that getSection has to return a "const char *". It could return a NullTerminatedStringRef if there was such a thing, but when that was proposed the decision was to just uses "const char*" for that. llvm-svn: 210062
* [yaml2obj] Add new command line option `-docnum`.Simon Atanasyan2014-05-314-12/+37
| | | | | | | | | | Input YAML file might contain multiple object file definitions. New option `-docnum` allows to specify an ordinal number (starting from 1) of definition used for an object file generation. Patch reviewed by Sean Silva. llvm-svn: 209967
* There is no std::errc::success, remove the llvm one.Rafael Espindola2014-05-312-2/+2
| | | | llvm-svn: 209960
* Turn errc and windows_error into enum classes.Rafael Espindola2014-05-311-2/+1
| | | | llvm-svn: 209957
* MachO: support N_INDR aliases in assembly files.Tim Northover2014-05-301-0/+2
| | | | | | | | | This makes LLVM create N_INDR aliases (to be resolved by the linker) when appropriate. rdar://problem/15125513 llvm-svn: 209894
* [elf2yaml][ELF] Move Info field to the RelocationSection structure. ThisSimon Atanasyan2014-05-291-9/+22
| | | | | | | field represents ELF section header sh_info field and does not have any sense for regular sections. Its interpretation depends on section type. llvm-svn: 209801
* tools: avoid use of std::functionSaleem Abdulrasool2014-05-253-12/+14
| | | | | | | | | | | Remove the use of the std::function and replace the capturing lambda with a non-capturing one, opting to pass the user data down to the context. This is needed as std::function is not yet available on all hosted platforms (it requires RTTI, which breaks on Windows). Thanks to Nico Rieck for pointing this out! llvm-svn: 209607
* tools: split out Win64EHDumper from COFFDumperSaleem Abdulrasool2014-05-254-328/+406
| | | | | | | | | | Move the implementation of the Win64 EH printer from the COFFDumper into its own class. This is in preparation for adding support to print ARM EH information. The only real change here is in printUnwindInfo where we now lambda lift the implicit this parameter for the resolveFunction. Also setup the printing to handle ARM. This now has set the stage to introduce ARM EH printing. llvm-svn: 209606
* tools: inline simple single-use functionSaleem Abdulrasool2014-05-251-18/+6
| | | | | | | This inlines the single use function in preparation for splitting the Win64EH printing out of the COFFDumper into its own entity. llvm-svn: 209605
* tools: refactor COFFDumper symbol resolution logicSaleem Abdulrasool2014-05-251-61/+69
| | | | | | | | | | Make the use of the cache more transparent to the users. There is no reason that the cached entries really need to be passed along. The overhead for doing so is minimal: a single extra parameter. This requires that some standalone functions be brought into the COFFDumper class so that they may access the cache. llvm-svn: 209604
* tools: use references rather than out pointers in COFFDumperSaleem Abdulrasool2014-05-251-18/+8
| | | | | | | Switch to use references for parameters that are guaranteed to be non-null. Simplifies the code a slight bit in preparation for another change. llvm-svn: 209603
* build: sort llvm-readobj sourcesSaleem Abdulrasool2014-05-241-4/+4
| | | | | | Sort the source files. NFC. llvm-svn: 209587
* llvm-readobj: remove some dead codeSaleem Abdulrasool2014-05-241-28/+0
| | | | llvm-svn: 209586
* llvm-ar: Output the file we errored on.Filipe Cabecinhas2014-05-231-1/+1
| | | | llvm-svn: 209500
* Move MCOptions that aren't shared between programs into their specificEric Christopher2014-05-212-5/+18
| | | | | | program and have them initialize the MCOptions struct explicitly. llvm-svn: 209321
* Make a couple of command lines static and remove an unnecessaryEric Christopher2014-05-211-6/+4
| | | | | | initialization. llvm-svn: 209320
* This command line option is only used in one place. Move it there andEric Christopher2014-05-211-0/+3
| | | | | | rename it to something more descriptive. llvm-svn: 209263
* Move the verbose asm option to be part of the options struct andEric Christopher2014-05-201-3/+4
| | | | | | set appropriately. llvm-svn: 209258
* [Mips] Add more relocation types and MIPS specific e_flags constants.Simon Atanasyan2014-05-201-1/+3
| | | | llvm-svn: 209201
* llvm-readobj: use range-based for loopSaleem Abdulrasool2014-05-201-5/+3
| | | | | | Convert an additional site to a range based for loop. NFC. llvm-svn: 209194
* Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer ↵Alexey Samsonov2014-05-191-48/+4
| | | | | | for that. llvm-svn: 209152
* [DWARF parser] Teach DIContext to fetch short (non-linkage) function names ↵Alexey Samsonov2014-05-173-13/+18
| | | | | | | | | | for a given address. Change --functions option in llvm-symbolizer tool to accept values "none", "short" or "linkage". Update the tests and docs accordingly. llvm-svn: 209050
* Delete getAliasedGlobal.Rafael Espindola2014-05-161-1/+1
| | | | llvm-svn: 209040
* [yaml2obj][ELF] Add an optional `Size` field to the YAML section declaration.Simon Atanasyan2014-05-162-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the only method to configure ELF section's content and size is to assign a hexadecimal string to the `Content` field. Unfortunately this way is completely useless when you need to declare a really large section. To solve this problem this patch adds one more optional field `Size` to the `RawContentSection` structure. When yaml2obj generates an ELF file it uses the following algorithm: 1. If both `Content` and `Size` fields are missed create an empty section. 2. If only `Content` field is missed take section length from the `Size` field and fill the section by zero. 3. If only `Size` field is missed create a section using data from the `Content` field. 4. If both `Content` and `Size` fields are provided validate that the `Size` value is not less than size of `Content` data. Than take section length from the `Size`, fill beginning of the section by `Content` and the rest by zero. Examples -------- * Create a section 0x10000 bytes long filled by zero Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Size: 0x10000 * Create a section 0x10000 bytes long starting from 'CA' 'FE' 'BA' 'BE' Name: .data Type: SHT_PROGBITS Flags: [ SHF_ALLOC ] Content: CAFEBABE Size: 0x10000 The patch reviewed by Michael Spencer. llvm-svn: 208995
* [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.Alexey Samsonov2014-05-152-15/+14
| | | | | | | | | | | | It is more appropriate than the current situation, when one flag (AbsoluteFilePath) is relevant only if another flag is set. This refactoring would also simplify fetching the short function name (stored in DW_AT_name) instead of a linkage name returned currently. No functionality change. llvm-svn: 208921
* [yaml2obj] Add "-o" command line option to specify an output file name.Simon Atanasyan2014-05-152-11/+31
| | | | llvm-svn: 208900
* Unify command line handling of MCTargetOptions and remove extraEric Christopher2014-05-152-18/+3
| | | | | | options and code. No functional change. llvm-svn: 208833
* Teach llvm-nm to know about fat archives (aka MachOUniversal filesKevin Enderby2014-05-141-0/+14
| | | | | | containing archives). First step as other tools will be updated next. llvm-svn: 208812
* [obj2yaml] Support ELF input format in the obj2yaml tool.Simon Atanasyan2014-05-144-1/+294
| | | | | | | | | | The ELF header e_flags field in the MIPS related test cases handled incorrectly. The obj2yaml prints too many flags. I will fix that in the next patches. The patch reviewed by Michael Spencer and Sean Silva. llvm-svn: 208752
* [tools][llvm-rtdyld] Add a '-dylib <file>' option to llvm-rtdyld to load sharedLang Hames2014-05-131-0/+25
| | | | | | | | | libraries before linking and executing the target objects. This allows programs that use external calls (e.g. to libc) to be run under llvm-rtdyld. llvm-svn: 208739
* autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try)Tom Stellard2014-05-131-2/+2
| | | | | | | | | | | | | We were using libLLVM-Major.Minor.Patch.so for the soname, but we need the soname to stay consistent for all Major.Minor.* releases otherwise operating system distributors will need to rebuild all packages that link with LLVM every time there is a new point release. This patch also reverses the compatibility symlink, so libLLVM-Major.Minor.Patch.so is now a symlink that points to libLLVM-Major-Minor.so. llvm-svn: 208721
* Revert "autoconf: Fix soname for libLLVM-Major.Minor.so"Tom Stellard2014-05-131-2/+2
| | | | | | | | | This reverts commit r208708. I forgot to run make clean before testing this and it broke tools linking. llvm-svn: 208709
* autoconf: Fix soname for libLLVM-Major.Minor.soTom Stellard2014-05-131-2/+2
| | | | | | | | | | | | | We were using libLLVM-Major.Minor.Patch.so for the soname, but we need the soname to stay consistent for all Major.Minor.* releases otherwise operating system distributors will need to rebuild all packages that link with LLVM every time there is a new point release. This patch also reverses the compatibility symlink, so libLLVM-Major.Minor.Patch.so is now a symlink that points to libLLVM-Major-Minor.so. llvm-svn: 208708
* Suggested improvement by Rafael Espindola to use isa<> in a few placesKevin Enderby2014-05-121-6/+6
| | | | | | instead of dyn_cast<>. llvm-svn: 208628
* [llvm-readobj] Print values of FLAGS and MIPS_FLAGS dynamic table tagsSimon Atanasyan2014-05-111-1/+61
| | | | | | in a human readable form. llvm-svn: 208489
* Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files.Kevin Enderby2014-05-091-8/+36
| | | | | | | | | | | | | | The implementation might be better to have a method is64Bit() in the class SymbolicFile instead of having the static routine isSymbolList64Bit() in llvm-nm.cpp . But this is very much in the sprit of isObject() and getNMTypeChar() in llvm-nm.cpp that has a series of if else statements based on the specific class of the SymbolicFile. I can update this if folks would like. Also the tests were updated to be explicit about checking the address for 64-bits or 32-bits from object files. llvm-svn: 208463
* Use range loops.Rafael Espindola2014-05-081-13/+9
| | | | llvm-svn: 208353
* Remove the UseCFI option from createAsmStreamer.Rafael Espindola2014-05-071-3/+2
| | | | | | We were already always passing true, this just removes the option. llvm-svn: 208205
* [obj2yaml] Recognize input file format using llvm::object::ObjectFileSimon Atanasyan2014-05-076-25/+126
| | | | | | | | | | | interface methods isCOFF(). The '-coff' command line option has been removed. It was not used in any test cases. The patch reviewed by Michael Spencer. llvm-svn: 208157
* llvm-cov: Implement --no-outputJustin Bogner2014-05-071-1/+5
| | | | | | | | In gcov, there's a -n/--no-output option, which disables the writing of any .gcov files, so that it emits only the summary info on stdout. This implements the same behaviour in llvm-cov. llvm-svn: 208148
* Have the SubtargetFeature help routine just not return a number andEric Christopher2014-05-061-1/+8
| | | | | | | | fall back to the normal path without a cpu. While doing this fix llc to just exit when we don't have a module to process instead of asserting. llvm-svn: 208102
OpenPOWER on IntegriCloud