summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
* [Objdump] Fixing crash when printing symbols in ELF sections with special types.Colin LeMahieu2015-02-182-0/+3
| | | | llvm-svn: 229759
* Modify llvm-readobj to dump symbol record bytes.Zachary Turner2015-02-181-14/+14
| | | | | | | | | | This will help us study the format of individual symbol records more closely. Differential Revision: http://reviews.llvm.org/D7664 Reviewed by: Timur Iskhodzhanov llvm-svn: 229730
* Add code to llvm-objdump so the -section option with -macho will dump ↵Kevin Enderby2015-02-174-14/+82
| | | | | | | | | | | literal pointer sections with the Mach-O S_LITERAL_POINTERS section type. Also fix the printing of the leading addresses for literal sections to be consistent and not print the 0x prefix. Updated test cases to match. llvm-svn: 229548
* gold-plugin: fix test to allow default visibility on local symbolsMichael Kuperstein2015-02-151-1/+1
| | | | | | | | | GNU ld sets default, not hidden, visibility on local symbols. Having default or hidden visibility on local symbols makes no difference in run-time behavior. Patch by: H.J. Lu <hjl.tools@gmail.com> llvm-svn: 229297
* [gold] Consolidate the gold plugin options and actually search forChandler Carruth2015-02-1418-23/+23
| | | | | | | | | | | | | | | | a gold binary explicitly. Substitute this binary into the tests rather than just directly executing the 'ld' binary. This should allow folks to inject a cross compiling gold binary, or in my case to use a gold binary built and installed somewhere other than /usr/bin/ld. It should also allow the tests to find 'ld.gold' so that things work even if gold isn't the default on the system. I've only stubbed out support in the makefile to preserve the existing behavior with none of the fancy logic. If someone else wants to add logic here, they're welcome to do so. llvm-svn: 229251
* llvm-cov: Actually use the command line arguments when reportingJustin Bogner2015-02-142-3/+17
| | | | | | | | This code didn't really make sense as is. If a filename is passed in, the user obviously wants the coverage *for that file*, not *for everything*. llvm-svn: 229217
* [dsymutil] Add DIE selection algorithm.Frederic Riss2015-02-131-1/+96
| | | | | | | | | | | | | | | | With this commit, llvm-dsymutil learns how to choose which DIEs it will link in the final output and which ones it won't. This is based on the 'valid relocation' information that has been built in the previous commits. The test only tests that we choose the right 'root DIEs'. The selection algorithm (and especially the part that walk the dependencies of a root DIE) lacks a bit test coverage. This will be much easier to cover when we output actual Dwarf and thus can use llvm-dwarfdump to verify the structure of the emitted DIE trees. I'll add more tests then. llvm-svn: 229183
* Gold-plugin: Broaden scope of get/release_input_file to scope of Module.Jan Wen Voung2015-02-111-0/+9
| | | | | | | | | | | | | | | | | | | | Summary: Move calls to get_input_file and release_input_file out of getModuleForFile(). Otherwise release_input_file may end up unmapping a view of the file while the view is still being used by the Module (on 32-bit hosts). Fix for PR22482. Test Plan: Add test using --no-map-whole-files. Reviewers: rafael, nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7539 llvm-svn: 228842
* Add code to llvm-objdump so the -section option with -macho will dump literalKevin Enderby2015-02-061-0/+48
| | | | | | sections with the Mach-O S_{4,8,16}BYTE_LITERALS section types. llvm-svn: 228465
* Add code to llvm-objdump so the -section option with -macho will dump ↵Kevin Enderby2015-02-041-0/+4
| | | | | | | | ‘C’ string sections with the Mach-O S_CSTRING_LITERALS section type. llvm-svn: 228198
* Add code to llvm-objdump so the -section option with -macho will disassemble ↵Kevin Enderby2015-02-041-0/+9
| | | | | | | | sections that have attributes indicating they contain instructions. llvm-svn: 228101
* InstrProf: Remove CoverageMapping::HasCodeBefore, it isn't usedJustin Bogner2015-02-034-6/+6
| | | | | | | It's not entirely clear to me what this field was meant for, but it's always false. Remove it. llvm-svn: 228034
* llvm-readobj: add a test case for ARM_MOV32(T) base relocationSaleem Abdulrasool2015-01-312-0/+7
| | | | | | | | Add a trivial binary (int main() { return 0; }) built for Windows on ARM to ensure that we can correctly identify ARM_MOV32(T) base relocations. Addresses post-commit review comments. llvm-svn: 227673
* Add the -section option to llvm-objdump used with -macho that takes the argumentKevin Enderby2015-01-312-0/+4
| | | | | | | | | | segname,sectname to specify a Mach-O section to print. The printing is based on the section type or section attributes. The printing of the module initialization and termination section types is printed with this change. Printing of other section types will be added next. llvm-svn: 227649
* [dsymutil] Add DwarfLinker class.Frederic Riss2015-01-281-0/+54
| | | | | | | | It's an empty shell for now. It's main method just opens the debug map objects and parses their Dwarf info. Test that we at least do that correctly. llvm-svn: 227337
* dd the option, -link-opt-hints to llvm-objdump used with -macho to print theKevin Enderby2015-01-272-0/+11
| | | | | | Mach-O AArch64 linker optimization hints for ADRP code optimization. llvm-svn: 227246
* Fix the problem with llvm-objdump and -archive-headers in printing the ↵Kevin Enderby2015-01-231-4/+4
| | | | | | | | archive header size field. This problem showed up with the clang-cmake-armv7-a15-full bot. Thanks to Renato Golin for his help. llvm-svn: 226936
* [Objdump] Output information about common symbols in a way closer to GNU ↵Colin LeMahieu2015-01-232-0/+3
| | | | | | objdump. llvm-svn: 226932
* Add the option, -data-in-code, to llvm-objdump used with -macho to print the ↵Kevin Enderby2015-01-232-0/+8
| | | | | | Mach-O data in code table. llvm-svn: 226921
* Add the option, -indirect-symbols, used with -macho to print the Mach-O ↵Kevin Enderby2015-01-221-0/+12
| | | | | | indirect symbol table to llvm-objdump. llvm-svn: 226848
* For llvm-objdump, hook up existing options to work when using -macho (the ↵Kevin Enderby2015-01-205-0/+47
| | | | | | Mach-O parser). llvm-svn: 226612
* [dsymutil] Add the detected target triple to the debug map.Frederic Riss2015-01-191-3/+5
| | | | | | | It will be needed to instantiate the Target object that we will use to create all the MC objects for the dwarf emission. llvm-svn: 226525
* Change the test case for llvm-objdump’s -archive-headers option to not ↵Kevin Enderby2015-01-161-4/+4
| | | | | | | | | check the size while I once again try to figure out why only the clang-cmake-armv7-a15-full bot is getting that value wrong. llvm-svn: 226345
* Fix the Archive::Child::getRawSize() method used by llvm-objdump’s ↵Kevin Enderby2015-01-161-0/+10
| | | | | | | | -archive-headers option and tweak its use in llvm-objdump. Add back the test case for the -archive-headers option. llvm-svn: 226332
* Work around to get the build bot clang-cmake-armv7-a15-full green byKevin Enderby2015-01-161-10/+0
| | | | | | | removing the macho-archive-headers.test added with r226228 that it is failing on for now while I try to figure out what is going on. llvm-svn: 226241
* Another attempt to fix the build bot clang-cmake-armv7-a15-full failing onKevin Enderby2015-01-161-2/+2
| | | | | | the macho-archive-headers.test added with r226228. llvm-svn: 226239
* Add the option, -archive-headers, used with -macho to print the Mach-O ↵Kevin Enderby2015-01-151-0/+10
| | | | | | archive headers to llvm-objdump. llvm-svn: 226228
* Fix linking of shared libraries.Rafael Espindola2015-01-141-0/+8
| | | | | | | In shared libraries the plugin can see non-weak declarations that are still undefined. llvm-svn: 226031
* Fix handling of extern_weak. This was broken by r225983.Rafael Espindola2015-01-141-0/+8
| | | | llvm-svn: 226026
* Handle a symbol being undefined.Rafael Espindola2015-01-141-0/+5
| | | | | | | | | | | | | This can happen if: * It is present in a comdat in one file. * It is not present in the comdat of the file that is kept. * Is is not used. This should fix the LTO boostrap. Thanks to Takumi NAKAMURA for setting up the bot! llvm-svn: 225983
* Add the option, -universal-headers, used with -macho to print the Mach-O ↵Kevin Enderby2015-01-091-0/+19
| | | | | | universal headers to llvm-objdump. llvm-svn: 225537
* Slightly refactor things for llvm-objdump and the -macho option so it can be ↵Kevin Enderby2015-01-071-0/+6
| | | | | | | | | | | | used with options other than just -disassemble so that universal files can be used with other options combined with -arch options. No functional change to existing options and use. One test case added for the additional functionality with a universal file an a -arch option. llvm-svn: 225383
* Change the .ll syntax for comdats and add a syntactic sugar.Rafael Espindola2015-01-062-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make comdats always explicit in the IR, we decided to make the syntax a bit more compact for the case of a GlobalObject in a comdat with the same name. Just dropping the $name causes problems for @foo = globabl i32 0, comdat $bar = comdat ... and declare void @foo() comdat $bar = comdat ... So the syntax is changed to @g1 = globabl i32 0, comdat($c1) @g2 = globabl i32 0, comdat and declare void @foo() comdat($c1) declare void @foo() comdat llvm-svn: 225302
* [dsymutil] Implement the BinaryHolder object and gain archive support.Frederic Riss2015-01-054-0/+32
| | | | | | | | | | | | | | | | | | | This object is meant to own the ObjectFiles and their underlying MemoryBuffer. It is basically the equivalent of an OwningBinary except that it efficiently handles Archives. It is optimized for efficiently providing mappings of members of the same archive when they are opened successively (which is standard in Darwin debug maps, objects from the same archive will be contiguous). Of course, the BinaryHolder will also be used by the DWARF linker once it is commited, but for now only the debug map parser uses it. With this change, you can run llvm-dsymutil on your Darwin debug build of clang and get a complete debug map for it. Differential Revision: http://reviews.llvm.org/D6690 llvm-svn: 225207
* Emit the build attribute Tag_conformance.Charlie Turner2015-01-052-0/+16
| | | | | | | | | | | Claim conformance to version 2.09 of the ARM ABI. This build attribute must be emitted first amongst the build attributes when written to an object file. This is to simplify conformance detection by consumers. Change-Id: If9eddcfc416bc9ad6e5cc8cdcb05d0031af7657e llvm-svn: 225166
* llvm-readobj: add support to dump COFF export tablesSaleem Abdulrasool2015-01-034-0/+11
| | | | | | | This enhances llvm-readobj to print out the COFF export table, similar to the -coff-import option. This is useful for testing in lld. llvm-svn: 225120
* Add printing the LC_THREAD load commands with llvm-objdump’s -private-headers.Kevin Enderby2014-12-232-0/+16
| | | | llvm-svn: 224792
* Add printing the LC_ROUTINES load commands with llvm-objdump’s ↵Kevin Enderby2014-12-192-0/+14
| | | | | | -private-headers. llvm-svn: 224627
* Add printing the LC_SUB_CLIENT load command with llvm-objdump’s ↵Kevin Enderby2014-12-192-0/+7
| | | | | | -private-headers. llvm-svn: 224616
* Add printing the LC_SUB_LIBRARY load command with llvm-objdump’s ↵Kevin Enderby2014-12-192-0/+7
| | | | | | -private-headers. llvm-svn: 224607
* Add printing the LC_SUB_UMBRELLA load command with llvm-objdump’s ↵Kevin Enderby2014-12-182-0/+7
| | | | | | -private-headers. llvm-svn: 224548
* Add printing the LC_SUB_FRAMEWORK load command with llvm-objdump’s ↵Kevin Enderby2014-12-182-0/+7
| | | | | | -private-headers. llvm-svn: 224534
* Add printing the LC_LINKER_OPTION load command with llvm-objdump’s ↵Kevin Enderby2014-12-182-0/+13
| | | | | | | | | | -private-headers. Also corrected the name of the load command to not end in an ’S’ as well as corrected the name of the MachO::linker_option_command struct and other places that had the word option as plural which did not match the Mac OS X headers. llvm-svn: 224485
* Add printing the LC_ENCRYPTION_INFO_64 load command with llvm-objdump’s ↵Kevin Enderby2014-12-171-0/+312
| | | | | | | | -private-headers and add tests for the two AArch64 binaries. llvm-svn: 224400
* Add printing the LC_ENCRYPTION_INFO load command with llvm-objdump’s ↵Kevin Enderby2014-12-161-0/+5
| | | | | | -private-headers. llvm-svn: 224390
* Fix a bug in llvm-objdump’s -private-headers for the LC_VERSION_MIN_IPHONEOSKevin Enderby2014-12-161-0/+4
| | | | | | load command not getting printed. llvm-svn: 224376
* Fix a bug in llvm-objdump’s -private-headers for 32-bit Mach-O filesKevin Enderby2014-12-161-0/+336
| | | | | | printing the section header. And add some tests for this for 32-bit files. llvm-svn: 224302
* Relax debug-map-parsing.test error message check for WindowsReid Kleckner2014-12-121-4/+4
| | | | | | On Windows we get the string "no such file or directory". llvm-svn: 224141
* Initial dsymutil tool commit.Frederic Riss2014-12-1210-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | The goal of this tool is to replicate Darwin's dsymutil functionality based on LLVM. dsymutil is a DWARF linker. Darwin's linker (ld64) does not link the debug information, it leaves it in the object files in relocatable form, but embbeds a `debug map` into the executable that describes where to find the debug information and how to relocate it. When releasing/archiving a binary, dsymutil is called to link all the DWARF information into a `dsym bundle` that can distributed/stored along with the binary. With this commit, the LLVM based dsymutil is just able to parse the STABS debug maps embedded by ld64 in linked binaries (and not all of them, for example archives aren't supported yet). Note that the tool directory is called dsymutil, but the executable is currently called llvm-dsymutil. This discrepancy will disappear once the tool will be feature complete. At this point the executable will be renamed to dsymutil, but until then you do not want it to override the system one. Differential Revision: http://reviews.llvm.org/D6242 llvm-svn: 224134
* Revert "Initial dsymutil tool commit."Frederic Riss2014-12-0910-115/+0
| | | | | | This reverts commit r223793. The review thread wasn't concluded. llvm-svn: 223794
OpenPOWER on IntegriCloud