summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] Print MIPS PLT tableSimon Atanasyan2015-07-092-0/+34
| | | | | | Now the -mips-plt-got prints both MIPS GOT and PLT tables. llvm-svn: 241836
* [CodeView] Add support for emitting column informationDavid Majnemer2015-07-091-0/+10
| | | | | | | | | | Column information is present in CodeView when the line table subsection has bit 0 set to 1 in it's flags field. The column information is represented as a pair of 16-bit quantities: a starting and ending column. This information is present at the end of the chunk, after all the line-PC pairs. llvm-svn: 241764
* llvm-objdump: Replace the -macho -raw option with a generic -raw-clang-astAdrian Prantl2015-07-081-2/+0
| | | | | | | | | | | | | | | option that works with all object container formats. Now that clang modules/PCH are object containers this option is useful to to construct pipes like llvm-objdump -raw-clang-ast foo.pcm | llvm-bcanalyzer - to inspect the AST contents in a PCH container. Will be tested via clang. Belatedly addresses review feedback for r233390. llvm-svn: 241659
* Pass -m to the linker in this test.Rafael Espindola2015-06-231-1/+1
| | | | | | Fixes the test on a ppc host. llvm-svn: 240431
* objdump: Don't print a (always 0) size for MachO symbols.Rafael Espindola2015-06-231-5/+5
| | | | | | | | | | | Only common symbol on MachO and COFF have a size. For COFF we already had a custom format. For MachO, there is no native objdump and we were printing it as ELF. Now we only print the sizes for symbols that actually have them. llvm-svn: 240422
* Add a test for the previous commit.Rafael Espindola2015-06-231-0/+3
| | | | | | This shows how two symbols at the same address are handled. llvm-svn: 240374
* Fix tests when X86 is not enabled.Rafael Espindola2015-06-232-0/+2
| | | | llvm-svn: 240368
* Compute correct symbol sizes for MachO and COFF.Rafael Espindola2015-06-231-0/+44
| | | | | | Before this would dump from the symbol start to the end of the section. llvm-svn: 240367
* [Object] Search for architecures by name in ↵Frederic Riss2015-06-223-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | MachOUniversalBinary::getObjectForArch() The reason we need to search by name rather than by Triple::ArchType is to handle subarchitecture correclty. There is no different ArchType for the x86_64h architecture (it identifies itself as x86_64), or for the various ARM subarches. The only way to get to the subarch slice in an universal binary is to search by name. This issue led to hard to debug and transient symbolication failures in Asan tests (it mostly works, because the files are very similar). This also affects the Profiling infrastucture as it is the other user of that API. Reviewers: samsonov, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10604 llvm-svn: 240339
* Add a triple to the test to fix it on some hosts.Rafael Espindola2015-06-221-1/+1
| | | | | | | | The slp vectorizer doesn't optimize this case in 32 bits. Fixes PR23453. llvm-svn: 240289
* Improve the --expand-relocs handling of MachO.Rafael Espindola2015-06-182-168/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a relocation target can take 3 basic forms * A r_value in scattered relocations. * A symbol in external relocations. * A section is non-external relocations. Have the dump reflect that. With this change we go from CHECK-NEXT: Extern: 0 CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) CHECK-NEXT: Symbol: 0x2 CHECK-NEXT: Scattered: 0 To just // CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) // CHECK-NEXT: Section: __data (2) Since the relocation is with a section, we print the seciton name and don't need to say that it is not scattered or external. Someone motivated can add further special cases for things like ARM64_RELOC_ADDEND and ARM_RELOC_PAIR. llvm-svn: 240073
* Pass --expand-relocs to a few more tests.Rafael Espindola2015-06-182-44/+364
| | | | llvm-svn: 240069
* [llvm-readobj] Print MIPS .reginfo section contentSimon Atanasyan2015-06-162-0/+10
| | | | llvm-svn: 239856
* Have MachOObjectFile::isValidArch() accept armv7Frederic Riss2015-06-161-0/+1
| | | | llvm-svn: 239833
* gold-plugin: save the .o when given -save-temps.Rafael Espindola2015-06-151-0/+3
| | | | | | | The plugin now save the bitcode before and after optimizations and the .o that is passed to the linker. llvm-svn: 239726
* [dsymutil] Fix misspelled CHECK line.Frederic Riss2015-06-051-1/+1
| | | | llvm-svn: 239200
* [dsymutil] Add support for linking the debug_frame section.Frederic Riss2015-06-055-0/+231
| | | | | | | | | | | Linking the debug frame section is actually very easy as we just have to patch the start address in the FDE header and then copy the rest of the FDE without even looking at it. The only small complexity comes from the handling of the CIEs that we should unique across object file. This is also really easy by using a StringMap keyed on the raw contents of the CIE. llvm-svn: 239198
* [dsymutil] Have the YAML deserialization rewrite the object address of symbols.Frederic Riss2015-06-051-0/+44
| | | | | | | | | | | The main use of the YAML debug map format is for testing inside LLVM. If we have IR files in the tests used to generate object files, then we obviously don't know the addresses of the symbols inside the object files beforehand. This change lets the YAML import lookup the addresses in the object files and rewrite them. This will allow to have test that really don't need any binary input. llvm-svn: 239189
* [dsymutil] Handle the -oso-prepend-path option when the input is a YAML ↵Frederic Riss2015-06-052-2/+2
| | | | | | | | debug map All the tests using a YAML debug map will need this. llvm-svn: 239163
* Fix buildbot failure on Windows by relaxing test expectations.Alexey Samsonov2015-06-041-1/+2
| | | | llvm-svn: 239074
* llvm-objdump: return non-zero exit code for certain cases of invalid inputAlexey Samsonov2015-06-041-0/+5
| | | | | | | | * If the input file is missing; * If the type of input object file can't be recognized; * If the object file can't be parsed correctly. llvm-svn: 239065
* Reapply r238941 - [dsymutil] Accept a YAML debug map as input instead of a ↵Frederic Riss2015-06-032-0/+3
| | | | | | | | | | | | | | | | | | | | | binary. With a couple more constructors that GCC thinks are necessary. Original commit message: [dsymutil] Accept a YAML debug map as input instead of a binary. To do this, the user needs to pass the new -y flag. As it wasn't tested before, the debug map YAML deserialization was completely buggy (mainly because the DebugMapObject has a dual mapping that allows to search by name and by address, but only the StringMap got populated). It's fixed and tested in this commit by augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil reads the debug map and pipes it in a second instance that does the actual link without touching the initial binary. llvm-svn: 238959
* Revert "[dsymutil] Accept a YAML debug map as input instead of a binary."Frederic Riss2015-06-032-3/+0
| | | | | | This reverts commit r238941 while I figure out the bot issues. llvm-svn: 238943
* [dsymutil] Accept a YAML debug map as input instead of a binary.Frederic Riss2015-06-032-0/+3
| | | | | | | | | | | | | To do this, the user needs to pass the new -y flag. As it wasn't tested before, the debug map YAML deserialization was completely buggy (mainly because the DebugMapObject has a dual mapping that allows to search by name and by address, but only the StringMap got populated). It's fixed and tested in this commit by augmenting some test with a 2 stage dwarf link: a frist llvm-dsymutil reads the debug map and pipes it in a second instance that does the actual link without touching the initial binary. llvm-svn: 238941
* [dsymutil] Replace -parse-only option with -dump-debug-mapFrederic Riss2015-06-031-5/+5
| | | | | | | | | | As the serialized debug map is becoming a first class citizen, a way to cleanly dump it is required. We used -parse-only combined with -v for that purpose before, but it dumps a lot of unrelated debug stuff. Dumping the debug map was the only use of the -parse-only flag anyway, so replace it with a more useful option. llvm-svn: 238940
* Fix the interpretation of a 0 st_name.Rafael Espindola2015-06-031-1/+1
| | | | | | | | | | | | | | The ELF spec is very clear: ----------------------------------------------------------------------------- If the value is non-zero, it represents a string table index that gives the symbol name. Otherwise, the symbol table entry has no name. -------------------------------------------------------------------------- In particular, a st_name of 0 most certainly doesn't mean that the symbol has the same name as the section. llvm-svn: 238899
* [dsymutil] Use YAMLIO to dump debug map.Frederic Riss2015-06-011-40/+42
| | | | | | | | | | | Doing so will allow us to also accept a YAML debug map in input as using YAMLIO gives us the parsing for free. Being able to have textual debug maps will in turn allow much more control over the tests, because 1/ no need to check-in a binary containing the debug map and 2/ it will allow to use the same objects/IR files with made-up debug-maps to test different scenari. llvm-svn: 238781
* Clarify how the binary file checked in was generated.Davide Italiano2015-05-301-0/+4
| | | | llvm-svn: 238665
* [llvm-readobj/ELF] Teach how to decode DF_1_XXX flagsDavide Italiano2015-05-252-0/+6
| | | | | | | | | | | | | llvm-readobj -dynamic-table output. Before: 0x000000006FFFFFFB unknown After: 0x000000006FFFFFFB FLAGS_1 NOW ORIGIN Differential Revision: http://reviews.llvm.org/D9958 llvm-svn: 238151
* Stop inventing symbol sizes.Rafael Espindola2015-05-221-4/+4
| | | | | | | | | | | | | | | | | | | | | MachO and COFF quite reasonably only define the size for common symbols. We used to try to figure out the "size" by computing the gap from one symbol to the next. This would not be correct in general, since a part of a section can belong to no visible symbol (padding, private globals). It was also really expensive, since we would walk every symbol to find the size of one. If a caller really wants this, it can sort all the symbols once and get all the gaps ("size") in O(n log n) instead of O(n^2). On MachO this also has the advantage of centralizing all the checks for an invalid n_sect. llvm-svn: 238028
* [llvm-readobj] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program headerSimon Atanasyan2015-05-151-5/+17
| | | | llvm-svn: 237451
* InstrProf: Fix display of large numbers in llvm-covJustin Bogner2015-05-134-37/+37
| | | | | | | | llvm-cov was truncating numbers that were larger than a particular fixed width, which is as confusing as it is useless. Instead, we use engineering notation with SI prefix for magnitude. llvm-svn: 237307
* [llvm-readobj] Print .MIPS.abiflags section contentSimon Atanasyan2015-05-073-0/+42
| | | | | | | | | This change adds new flag -mips-abi-flags to the llvm-readobj. This flag forces printing of .MIPS.abiflags section content. https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking#10.2.1._.MIPS.abiflags llvm-svn: 236737
* InstrProf: Give coverage its own errors instead of piggy backing on instrprofJustin Bogner2015-05-061-1/+1
| | | | | | | | | | | | Since the coverage mapping reader and the instrprof reader were emitting a shared set of error codes, the error messages you'd get back from llvm-cov were ambiguous about what was actually wrong. Add another error category to fix this. I've also improved the wording on a couple of the instrprof errors, for consistency. llvm-svn: 236665
* A few fixes for llvm-symbolizer on Windows.Zachary Turner2015-05-066-15/+36
| | | | | | | | | Specifically, this patch correctly respects the -demangle option, and additionally adds a hidden --relative-address option allows input addresses to be relative to the module load address instead of absolute addresses into the image. llvm-svn: 236653
* [llvm-pdbdump] Support dynamic load address and external symbols.Zachary Turner2015-05-013-0/+16
| | | | | | | | | | | This patch adds the --load-address command line option to llvm-pdbdump, which dumps all addresses assuming the module has loaded at the specified address. Additionally, this patch adds an option to llvm-pdbdump to support dumping of public symbols (i.e. symbols with external linkage). llvm-svn: 236342
* For llvm-objdump, with the -archive-headers and -macho options, use the ↵Kevin Enderby2015-04-301-0/+18
| | | | | | | | | | -non-verbose option to print the archive headers using raw numeric values. Also add the -archive-member-offsets for use with these to also trigger printing of the offset of the archive member from the start of the archive. llvm-svn: 236252
* Make llvm-symbolizer work on Windows.Zachary Turner2015-04-276-0/+20
| | | | | | | Differential Revision: http://reviews.llvm.org/D9234 Reviewed By: Alexey Samsonov llvm-svn: 235900
* [Mips] Support DT_MIPS_OPTIONS dynamic section tag in the llvm-readobjSimon Atanasyan2015-04-202-0/+22
| | | | llvm-svn: 235285
* For llvm-objdump, dump the (__OBJC,__protocol) section for Objc1 32-bit ↵Kevin Enderby2015-04-161-0/+139
| | | | | | | | Mach-O files with the -section option as objc_protocol_t structs. llvm-svn: 235141
* For llvm-objdump added support for printing Objc1 32-bit runtime meta dataKevin Enderby2015-04-163-0/+285
| | | | | | with the existing -objc-meta-data and -macho options for Mach-O files. llvm-svn: 235119
* llvm-readobj: teach it to handle MachO Universal Archive correctlyDavid Blaikie2015-04-132-0/+156
| | | | | | | | | | Patch by Chilledheart (rwindz0@gmail.com). Reviewed By: rafael Differential Revision: http://reviews.llvm.org/D8773 llvm-svn: 234758
* Fix failure on builder llvm-clang-lld-x86_64-debian-fast as theKevin Enderby2015-04-061-1/+0
| | | | | | test macho-objc-meta-data.test had a line it shouldn't have had. llvm-svn: 234190
* For llvm-objdump added support for printing Objc2 32-bit runtime meta dataKevin Enderby2015-04-063-0/+410
| | | | | | with the existing -objc-meta-data and -macho options for Mach-O files. llvm-svn: 234185
* Add the option -objc-meta-data to llvm-objdump used with -macho toKevin Enderby2015-04-013-0/+206
| | | | | | | | | | print the Objective-C runtime meta data for Mach-O files. There are three types of Objective-C runtime meta data, Objc2 64-bit, Objc2 32-bit and Objc1 32-bit. This prints the first of these types. The changes to print the others will follow next. llvm-svn: 233840
* [Objdump] Pass the correct subtarget to printInst.Akira Hatanaka2015-03-282-0/+3
| | | | | | This fixes a bug I introduced in r233411. llvm-svn: 233484
* Add a -raw option to the -section mode of llvm-objdump.Adrian Prantl2015-03-271-0/+5
| | | | llvm-svn: 233390
* llvm-cov: Require a subcommand when invoked as llvm-covJustin Bogner2015-03-243-23/+23
| | | | | | | | | | | | | | A while ago llvm-cov gained support for clang's instrumentation based profiling in addition to its gcov support, and subcommands were added to choose which behaviour to use. When no subcommand was specified, we fell back to gcov compatibility with a warning that a subcommand would be required in the future. Now, we require the subcommand. Note that if the basename of llvm-cov is gcov (via symlink or hardlink, for example), we still use the gcov compatible behaviour with no subcommand required. llvm-svn: 233132
* [dsymutil] Temporarily disable some tests on windows.Frederic Riss2015-03-243-0/+3
| | | | | | | | It seems one windows bot fails since I added ilne table linking to llvm-dsymutil (see r232333 commit thread). Disable the affected tests until I can figure out what's happening. llvm-svn: 233130
* Add -m -m elf_x86_64 to gold invocations.Rafael Espindola2015-03-243-4/+5
| | | | | | | | | | Otherwise the tests would fail if the default was not elf_x86_64. This fixes PR22966. Patch by H.J. Lu! llvm-svn: 233124
OpenPOWER on IntegriCloud