summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Initial dsymutil tool commit.Frederic Riss2014-12-0910-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: 223793
* Remember the unmangled name in the plugin.Rafael Espindola2014-12-091-0/+22
| | | | | | | | | This allows it to work with non trivial manglings like the one in COFF. Amusingly, this can be tested with gold, as emit-llvm causes the plugin to exit before any COFF is generated. llvm-svn: 223790
* Re-add support to llvm-objdump for Mach-O universal files and archives with ↵Kevin Enderby2014-12-043-0/+25
| | | | | | | | | | | -macho with fixes. Includes the move of tests for llvm-objdump for universal files to an X86 directory. And the fix where it was failing on linux Rafael tracked down with asan. I had both Jim Grosbach and Adam Hemet look over the second fix since I could not set up asan to reproduce with the old version but not with the fix. llvm-svn: 223416
* This reverts commit r223306 and r223277.Rafael Espindola2014-12-033-25/+0
| | | | | | The code is using uninitialized memory and failing on linux. llvm-svn: 223315
* Move tests for llvm-objdump for universal files to X86 directory to fix ↵Kevin Enderby2014-12-033-0/+0
| | | | | | build bots. llvm-svn: 223306
* Add support to llvm-objdump for Mach-O universal files and archives with -macho.Kevin Enderby2014-12-033-0/+25
| | | | llvm-svn: 223277
* Test all <build attribute, value> pairs.Charlie Turner2014-11-2822-287/+1148
| | | | | | | | | | Add more tests to make sure the encoding/decoding of build attributes works correctly for all permissible values of build attributes. For cases where there are an infinite number of such values, a representative subset has been settled for. Change-Id: I2643c9624c211b2d56405306e16eec2d487bc5d6 llvm-svn: 222917
* Stop uppercasing build attribute data.Charlie Turner2014-11-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The string data for string-valued build attributes were being unconditionally uppercased. There is no mention in the ARM ABI addenda about case conventions, so it's technically implementation defined as to whether the data are capitialised in some way or not. However, there are good reasons not to captialise the data. * It's less work. * Some vendors may legitimately have case-sensitive checks for these attributes which would fail on LLVM generated object files. * There could be locale issues with uppercasing. The original reasons for uppercasing appear to have stemmed from an old codesourcery toolchain behaviour, see http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/87133 This patch makes the object file emitted no longer captialise string data, it encodes as seen in the assembly source. Change-Id: Ibe20dd6e60d2773d57ff72a78470839033aa5538 llvm-svn: 222882
* Update AArch64 ELF relocations to ABI 1.0Will Newton2014-11-263-4/+82
| | | | | | | | | | | | | | | | | | | | This mostly entails adding relocations, however there are a couple of changes to existing relocations: 1. R_AARCH64_NONE is defined to be zero rather than 256 R_AARCH64_NONE has been defined to be zero for a long time elsewhere e.g. binutils and glibc since the submission of the AArch64 port in 2012 so this is required for compatibility. 2. R_AARCH64_TLSDESC_ADR_PAGE renamed to R_AARCH64_TLSDESC_ADR_PAGE21 I don't think there is any way for relocation names to leak out of LLVM so this should not break anything. Tested with check-all with no regressions. llvm-svn: 222821
* Update ARM ELF relocations to ABI 2.09Will Newton2014-11-263-0/+2
| | | | | | Add R_ARM_IRELATIVE. llvm-svn: 222817
* This test requires asserts because of -stats.Rafael Espindola2014-11-251-0/+2
| | | | | | Sorry about that. llvm-svn: 222788
* gold plugin: call llvm_shutdown so that -stats works.Rafael Espindola2014-11-251-0/+5
| | | | llvm-svn: 222787
* Forgot to add a file for r222734David Majnemer2014-11-251-0/+0
| | | | llvm-svn: 222736
* COFF: Add another test for r222124David Majnemer2014-11-251-0/+2
| | | | llvm-svn: 222734
* Add a disable-output option to the gold plugin.Rafael Espindola2014-11-241-0/+6
| | | | | | This corresponds to the opt option and is handy for profiling. llvm-svn: 222687
* [ELF] Prevent ARM ELF object writer from generating deprecated relocation ↵Jyoti Allur2014-11-201-1/+0
| | | | | | code R_ARM_PLT32 llvm-svn: 222414
* Add a test for r221870David Majnemer2014-11-202-0/+8
| | | | | | | bad-relocs.obj.coff-i386 has a relocation whose symbol index is outside the symbol table. llvm-svn: 222413
* llvm-readobj: fix off-by-one error in COFFDumperRui Ueyama2014-11-191-17/+21
| | | | | | | | It printed out base relocation table header as table entry. This patch also makes llvm-readobj to not skip ABSOLUTE entries becuase it was confusing. llvm-svn: 222299
* llvm-readobj: teach it how to dump COFF base relocation tableRui Ueyama2014-11-192-0/+20
| | | | llvm-svn: 222289
* llvm-readobj: Don't print the Characteristics field as the SubsystemDavid Majnemer2014-11-182-2/+2
| | | | | | | We claimed that we were printing the Subystem field when we were actually printing the Characteristics field. llvm-svn: 222216
* Object, COFF: Tighten the object file parserDavid Majnemer2014-11-171-5/+4
| | | | | | | | | | | | We were a little lax in a few areas: - We pretended that import libraries were like any old COFF file, they are not. In fact, they aren't really COFF files at all, we should probably grow some specialized functionality to handle them smarter. - Our symbol iterators were more than happy to attempt to go past the end of the symbol table if you had a symbol with a bad list of auxiliary symbols. llvm-svn: 222124
* Implement MachODumper::printFileHeadersFrederic Riss2014-11-171-0/+92
| | | | | | | | Patch by Chilledheart. Differential Revision: http://reviews.llvm.org/D6163 llvm-svn: 222115
OpenPOWER on IntegriCloud