summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump/X86
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objdump] Printing relocations in executable and shared object files. ↵Colin LeMahieu2016-03-212-0/+9
| | | | | | | | | | This partially reverts r215844 by removing test objdump-reloc-shared.test which stated GNU objdump doesn't print relocations, it does. In executable and shared object ELF files, relocations in the file contain the final virtual address rather than section offset so this is adjusted to display section offset. Differential revision: http://reviews.llvm.org/D15965 llvm-svn: 263971
* [llvm-objdump] Move test case to the X86 sub-directory because it depends on ↵Simon Atanasyan2016-03-181-0/+6
| | | | | | X86 target supporting. NFC. llvm-svn: 263781
* For llvm-objdump, add the option -private-header (without the trailing ’s’)Kevin Enderby2016-01-131-0/+6
| | | | | | | | | | | | | | | to only print the first private header. Which for Mach-O files only prints the Mach header and not the subsequent load commands. Which is used by scripts to match what the darwin otool(1) with the -h flag does without the -l flag. For non-Mach-O files it has the same functionality as -private-headers (with the trailing ’s’). rdar://24158331 llvm-svn: 257548
* [llvm-objdump] Use the COFF export table for additional symbolsDavid Majnemer2015-11-182-0/+8
| | | | | | | | | Most linked executables do not have a symbol table in COFF. However, it is pretty typical to have some export entries. Use those entries to inform the disassembler about potential function definitions and call targets. llvm-svn: 253429
* [Object, MachO] Mark symbols from DATA and BSS sections as ST_DataKuba Brecka2015-11-121-3/+3
| | | | | | | | In `MachOObjectFile::getSymbolType` we currently always return `SymbolRef::ST_Function` for symbols from any section. In order for llvm-symbolizer to correctly symbolize Mach-O globals, symbols from data and BSS sections should return `SymbolRef::ST_Data`. Differential Revision: http://reviews.llvm.org/D14576 llvm-svn: 252867
* Tweak to r250117 and change to use ErrorOr and drop isSizeValid forKevin Enderby2015-10-131-7/+0
| | | | | | | | | | ArchiveMemberHeader, suggestion by Rafael Espíndola. Also The clang-x86-win2008-selfhost bot still does not like the malformed-machos 00000031.a test, so removing it for now. All the other bots are fine with it however. llvm-svn: 250222
* The issue with the malformed-machos 00000031.a test is that it needed ↵Kevin Enderby2015-10-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ‘-arch x86_64’ flag as it was a Mach-O universal file. The default as to which architecture slice that is dumped without an -arch flag depends on the host architecture and the contents of the universal file. The malformed archive 00000031.a file has both an x86_64 and i386 slice. So for for x86_64 hosts only that slice is dumped, for non-x86_64 hosts, which is many of the bots both slices are dumped. The test is intended to only check that the malformation of the x86_64 which has a non-decimal characters in the size field of the archive header so it no longer crashes. The problem turned out that the i388 slice of the malformed archive had a different malformation which was causing the non-x86_64 bots to get this error: llvm-objdump -macho -disassemble -arch i386 00000031.a Archive : .00000031.a 00000031.a(c_start.o): LLVM ERROR: Symbol name entry points before beginning or past end of file. and causing the test as it was written to fail. So by adding ‘-arch x86_64’ it should correct the test and the malformation on the i388 slice will not be dumped. Also the removal of the malformed-machos mem-crup-0261.macho was not causing the issue so that is put back in. Sorry for the churn on these tests, Kev llvm-svn: 250184
* Looks like malformed-machos 00000031.a test is just getting a different errorKevin Enderby2015-10-131-6/+0
| | | | | | on some of the bots. I’ll remove this test for now. llvm-svn: 250141
* Remove the correct unstable malformed-machos test mem-crup-0261.macho andKevin Enderby2015-10-131-3/+6
| | | | | | | restore the malformed-machos 00000031.a test. Hopefully this will get all the build bots happy again. I’ll again keep an eye on them. llvm-svn: 250130
* Temporarily remove the test added in r250117 while I investigate why twoKevin Enderby2015-10-121-6/+0
| | | | | | of the build bots get a different error on that malformed file. llvm-svn: 250120
* Fixed bugs in llvm-obdump while parsing Mach-O files from malformed archivesKevin Enderby2015-10-122-0/+6
| | | | | | | | | that caused aborts. This was because of the characters of the ‘Size’ field in the archive header did not contain decimal characters. rdar://22983603 llvm-svn: 250117
* Move llvm-objdump malformed Mach-O tests to X86 test directory.Kevin Enderby2015-10-108-0/+41
| | | | | | rdar://22983603 llvm-svn: 249927
* COFF: Assign the correct symbol type to internal functions.Peter Collingbourne2015-08-062-0/+3
| | | | | | | | | | | The COFFSymbolRef::isFunctionDefinition() function tests for several conditions that are not related to whether a symbol is a function, but rather whether the symbol meets the requirements for a function definition auxiliary record, which excludes certain symbols such as internal functions and undefined references. The test we need to determine the symbol type is much simpler: we only need to compare the complex type against IMAGE_SYM_DTYPE_FUNCTION. llvm-svn: 244195
* Moving tests in to X86 directory.Colin LeMahieu2015-07-232-0/+4
| | | | llvm-svn: 243049
* 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
* 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
* 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
* 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
* 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
* Add the option -no-symbolic-operands to llvm-objdump used with -macho andKevin Enderby2015-03-171-0/+9
| | | | | | -disassemble to not symbolic operands when disassembling. llvm-svn: 232558
* Add the option, -no-leading-addr llvm-objdump used with -macho andKevin Enderby2015-03-172-0/+29
| | | | | | -disassemble or -section to not print the leading addresses on each line. llvm-svn: 232547
* Add the option, -dis-symname to llvm-objdump used with -macho andKevin Enderby2015-03-171-0/+19
| | | | | | -disassemble to disassemble just one symbol’s instructions. llvm-svn: 232503
* Add the options, -dylibs-used and -dylib-id to llvm-objdump used with -machoKevin Enderby2015-03-161-0/+6
| | | | | | | to print the Mach-O dynamic shared libraries used by a linked image or the library id of a shared library. llvm-svn: 232406
* Add the option, -non-verbose to llvm-objdump used with -macho to print thingsKevin Enderby2015-03-138-0/+160
| | | | | | | | | | using numeric values and not their symbolic constant names. The routines that print Mach-O stuff already had a verbose parameter and this change is just changing the passing true to passing !NonVerbose. With just a couple of fixes and a bunch of test case updates. llvm-svn: 232182
* Add the option, -info-plist to llvm-objdump used with -macho to print theKevin Enderby2015-03-111-0/+7
| | | | | | Mach-O info plist section as strings. llvm-svn: 231974
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
OpenPOWER on IntegriCloud