summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
Commit message (Collapse)AuthorAgeFilesLines
...
* Stop suppress error messages in test case to see why one buildbot is failingNick Kledzik2014-09-121-1/+1
| | | | llvm-svn: 217715
* [llvm-objdump] support -rebase option for mach-o to dump rebasing infoNick Kledzik2014-09-122-0/+15
| | | | | | | | | | Similar to my previous -exports-trie option, the -rebase option dumps info from the LC_DYLD_INFO load command. The rebasing info is a list of the the locations that dyld needs to adjust if a mach-o image is not loaded at its preferred address. Since ASLR is now the default, images almost never load at their preferred address, and thus need to be rebased by dyld. llvm-svn: 217709
* llvm-objdump: don't crash when __compact_unwind has no relocs.Tim Northover2014-09-092-0/+8
| | | | llvm-svn: 217433
* Removed the ctime printed “time stamp” from macho-private-headers.test ↵Kevin Enderby2014-09-041-1/+0
| | | | | | to fix the builds. llvm-svn: 217175
* Adds the next bit of support for llvm-objdump’s -private-headers for ↵Kevin Enderby2014-09-042-0/+243
| | | | | | | | | executable Mach-O files. This adds the printing of more load commands, so that the normal load commands in a typical X86 Mach-O executable can all be printed. llvm-svn: 217172
* Fix test case to match correct llvm-objdump outputNick Kledzik2014-09-031-3/+3
| | | | llvm-svn: 217006
* Object/llvm-objdump: allow dumping of mach-o exports trieNick Kledzik2014-08-302-0/+11
| | | | | | | | | | | | | | | | | | MachOObjectFile in lib/Object currently has no support for parsing the rebase, binding, and export information from the LC_DYLD_INFO load command in final linked mach-o images. This patch adds support for parsing the exports trie data structure. It also adds an option to llvm-objdump to dump that export info. I did the exports parsing first because it is the hardest. The information is encoded in a trie structure, but the standard ObjectFile way to inspect content is through iterators. So I needed to make an iterator that would do a non-recursive walk through the trie and maintain the concatenation of edges needed for the current string prefix. I plan to add similar support in MachOObjectFile and llvm-objdump to parse/display the rebasing and binding info too. llvm-svn: 216808
* Next bit of support for llvm-objdump’s -private-headers for Mach-O files.Kevin Enderby2014-08-291-0/+92
| | | | | | | This adds the printing of the LC_SEGMENT load command and sections, LC_SYMTAB and LC_DYSYMTAB load commands. llvm-svn: 216795
* Add the start of the support for llvm-objdump’s -private-headers for ↵Kevin Enderby2014-08-222-0/+5
| | | | | | | | Mach-O files. This adds the printing of the mach header. Load command printing will be next. llvm-svn: 216285
* Make llvm-objdump handle both arm and thumb disassembly from the same Mach-OKevin Enderby2014-08-181-0/+15
| | | | | | | | | | file with -macho, the Mach-O specific object file parser option. After some discussion I chose to do this implementation contained in the logic of llvm-objdump’s MachODump.cpp using a second disassembler for thumb when needed and with updates mostly contained in the MachOObjectFile class. llvm-svn: 215931
* llvm-objdump: print contents of MachO __unwind_info sectionsTim Northover2014-08-124-0/+57
| | | | llvm-svn: 215437
* llvm/test/tools/llvm-objdump: Reorganize target-dependent some tests.NAKAMURA Takumi2014-08-078-0/+2
| | | | llvm-svn: 215122
* Add the -mcpu= option to llvm-objdump for use with the disassemblers.Kevin Enderby2014-08-062-0/+15
| | | | | | | Also make the disassembler created with the Mach-O parser (the -m option) pick up the Target specific attributes specified with -mattr option. llvm-svn: 215032
* llvm-objdump: implement printing for MachO __compact_unwind info.Tim Northover2014-08-014-0/+54
| | | | llvm-svn: 214509
* llvm-objdump: Handle BSS sections larger than the object fileDavid Majnemer2014-07-142-0/+6
| | | | | | | | | The size of the uninitialized sections, like BSS, can exceed the size of the object file. Do not attempt to grab the contents of such sections. llvm-svn: 212953
* Reduce verbiage of lit.local.cfg filesAlp Toker2014-06-091-2/+1
| | | | | | We can just split targets_to_build in one place and make it immutable. llvm-svn: 210496
* tools: fix heap-buffer-overrun detected via ASANSaleem Abdulrasool2014-04-141-0/+1
| | | | | | | | | | Once the auxiliary fields relating to the filename have been inspected, any following auxiliary fields need not be visited as they have been consumed (the following fields comprise the filepath as a single unit). Adjust the test to catch this even if ASAN is not enabled. llvm-svn: 206190
* tools: address possible non-null terminated filenamesSaleem Abdulrasool2014-04-142-0/+26
| | | | | | | | | If a filename is a multiple of 18 characters, there will be no null-terminator. This will result in an invalid access by the constructed StringRef. Add a test case to exercise this and fix that handling. Address this same vulnerability in llvm-readobj as well. llvm-svn: 206145
* tools: teach objdump about FILE aux recordsSaleem Abdulrasool2014-04-132-0/+5
| | | | | | | | | Add support for file auxiliary symbol entries in COFF symbol tables. A COFF symbol table with a FILE entry is followed by sizeof(__FILE__) / 18 auxiliary symbol records which contain the filename. Read them and form the original filename that the record contains. Then display the name in the output. llvm-svn: 206126
* Object/COFF: Support large relocation table.Rui Ueyama2014-03-212-0/+14
| | | | | | | | | | | | | | | | NumberOfRelocations field in COFF section table is only 16-bit wide. If an object has more than 65535 relocations, the number of relocations is stored to VirtualAddress field in the first relocation field, and a special flag (IMAGE_SCN_LNK_NRELOC_OVFL) is set to Characteristics field. In test we cheated a bit. I made up a test file so that it has IMAGE_SCN_LNK_NRELOC_OVFL flag but the number of relocations is much smaller than 65535. This is to avoid checking in a large test file just to test a file with many relocations. Differential Revision: http://llvm-reviews.chandlerc.com/D3139 llvm-svn: 204418
* llvm-objdump output hex to match binutils' objdumpGreg Fitzgerald2014-03-201-0/+17
| | | | | | Patch by Ted Woodward llvm-svn: 204409
* llvm-objdump: Indent unwind info contents.Rui Ueyama2014-03-041-80/+80
| | | | | | | | | | | Unwind info contents were indented at the same level as function table contents. That's a bit confusing because the unwind info is pointed by function table. In other places we usually increment indentation depth by one when dereferncing a pointer. This patch also removes extraneous newlines between function tables. llvm-svn: 202879
* llvm-objdump: Fix typo in output.Rui Ueyama2014-03-041-4/+4
| | | | llvm-svn: 202875
* llvm-objdump: Print x64 unwind info in executable.Rui Ueyama2014-03-043-50/+105
| | | | | | | | | | | | | | | | | | The original code does not work correctly on executable files because the code is written in such a way that only object files are assumed to be given to llvm-objdump. Contents of RuntimeFunction are different between executables and objects. In executables, fields in RuntimeFunction have actual addresses to unwind info structures. On the other hand, in object files, the fields have zero value, but instead there are relocations pointing to the fields, so that Linker will fill them at link-time. So, when we are reading an object file, we need to use relocation info to find the location of unwind info. When executable, we should just look at the values in RuntimeFunction. llvm-svn: 202785
* Make a test for llvm-objdump a little bit more readable.Rui Ueyama2014-03-041-44/+44
| | | | llvm-svn: 202783
* llvm-objdump: Do not attempt to disassemble symbols outside of sectionSimon Atanasyan2014-02-243-0/+28
| | | | | | | | | | | | | | boundaries. It is possible to create an ELF executable where symbol from say .text section 'points' to the address outside the section boundaries. It does not have a sense to disassemble something outside the section. Without this fix llvm-objdump prints finite or infinite (depends on the executable file architecture) number of 'invalid instruction encoding' warnings. llvm-svn: 202083
* llvm-objdump/COFF: Print SEH table addresses.Rui Ueyama2014-02-201-0/+1
| | | | | | | SEH table addresses are VA in COFF file. In this patch we convert VA to RVA before printing it, because dumpbin prints them as RVAs. llvm-svn: 201760
* Object/COFF: Fix padding between CSDVersion and EditList.Rui Ueyama2014-02-201-3/+3
| | | | llvm-svn: 201756
* llvm-objdump/COFF: Print load configuration table.Rui Ueyama2014-02-192-4/+52
| | | | | | | | | | | | Load Configuration Table may contain a pointer to SEH table. This patch is to print the offset to the table. Printing SEH table contents is a TODO. The layout of Layout Configuration Table is described in Microsoft PE/COFF Object File Format Spec, but the table's offset/size descriptions seems to be totally wrong, at least in revision 8.3 of the spec. I believe the table in this patch is the correct one. llvm-svn: 201638
* llvm-objdump/COFF: Print ordinal base number.Rui Ueyama2014-01-171-0/+1
| | | | llvm-svn: 199518
* llvm-objdump/COFF: Print DLL name in the export table header.Rui Ueyama2014-01-161-0/+1
| | | | llvm-svn: 199422
* llmv-objdump/COFF: Print export table contents.Rui Ueyama2014-01-162-6/+13
| | | | | | | | | | | | | | | | This patch adds the capability to dump export table contents. An example output is this: Export Table: Ordinal RVA Name 5 0x2008 exportfn1 6 0x2010 exportfn2 By adding this feature to llvm-objdump, we will be able to use it to check export table contents in LLD's tests. Currently we are doing binary comparison in the tests, which is fragile and not readable to humans. llvm-svn: 199358
* Resurrect lit.local.cfg to un-break hexagon buildbot.Rui Ueyama2013-09-271-0/+3
| | | | llvm-svn: 191565
* Re-submit r191472 with a fix for big endian.Rui Ueyama2013-09-2710-125/+128
| | | | | llvm-objdump: Dump COFF import table if -private-headers option is given. llvm-svn: 191557
* Revert "llvm-objdump: Dump COFF import table if -private-headers option is ↵Rui Ueyama2013-09-2710-128/+125
| | | | | | | | given." This reverts commit r191472 because it's failing on BE machine. llvm-svn: 191480
* llvm-objdump: Dump COFF import table if -private-headers option is given.Rui Ueyama2013-09-2710-125/+128
| | | | | | | | | | | | | | | | This is a patch to add capability to llvm-objdump to dump COFF Import Table entries, so that we can write tests for LLD checking Import Table contents. llvm-objdump did not print anything but just file name if the format is COFF and -private-headers option is given. This is a patch adds capability for dumping DLL Import Table, which is specific to the COFF format. In this patch I defined a new iterator to iterate over import table entries. Also added a few functions to COFFObjectFile.cpp to access fields of the entry. Differential Revision: http://llvm-reviews.chandlerc.com/D1719 llvm-svn: 191472
* Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEHKai Nacke2013-09-151-10/+10
| | | | | | | | | | | | | | data structures. The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding the VK_COFF_IMGREL32 modifier to the symbol reference. Change also references to start and end of the SEH range of a function as offsets to start of the function. Reviewed by Jim Grosbach, Charles Davis and Nico Rieck. llvm-svn: 190766
* Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-08-271-1/+1
| | | | | | | | | | | | The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Jim Grosbach, Charles Davis and Nico Rieck. llvm-svn: 189309
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-2/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* Revert: Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-081-1/+1
| | | | llvm-svn: 185793
* Revert: Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEH data structures.Kai Nacke2013-07-081-10/+10
| | | | llvm-svn: 185791
* Generate IMAGE_REL_AMD64_ADDR32NB relocations for SEHKai Nacke2013-07-061-10/+10
| | | | | | | | | | | | | | data structures. The Win64 EH data structures must be of type IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32. This is easiely achieved by adding the VK_COFF_IMGREL32 modifier to the symbol reference. Change also references to start and end of the SEH range of a function as offsets to start of the function. Reviewed by Charles Davis and Nico Rieck. llvm-svn: 185759
* Fix wrong code offset for unwind code SET_FPREG.Kai Nacke2013-07-061-1/+1
| | | | | | | | | | | | The code offset for unwind code SET_FPREG is wrong because it is set to constant 0. The fix is to do the same as for the other unwind codes: emit a label and later the absolute difference between the label and the begin of the prologue. Also enables the failing test case MC/COFF/seh.s Reviewed by Charles Davis and Nico Rieck. llvm-svn: 185758
* Add dump of Win64 EH unwind data.Michael J. Spencer2012-12-051-0/+106
| | | | | | | | | | The new command line option -unwind-info dumps the Win64 EH unwind data to the console. This is a nice feature if you need to debug generated EH data (e.g. from LLVM). Includes a test case. Initial patch by João Matos, extensions and rework by Kai Nacke. llvm-svn: 169415
* Add a tests for the new -no-show-raw-insn option of llvm-objdump.Eli Bendersky2012-11-202-0/+21
This also initiates a test/tools directory where tools-specific tests can be placed. llvm-svn: 168397
OpenPOWER on IntegriCloud