diff options
Diffstat (limited to 'test/tools/llvm-objdump')
32 files changed, 221 insertions, 33 deletions
diff --git a/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test b/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test index 311ff51fbac4d..4c88b94396bb7 100644 --- a/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test +++ b/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test @@ -7,17 +7,16 @@ OBJ: 000000000000001c adrp x0, L_.str@PAGE OBJ: 0000000000000020 add x0, x0, L_.str@PAGEOFF OBJ: 0000000000000024 bl _printf -EXE: 0000000100007f58 add x0, x0, #4008 ; literal pool for: "Hello world -" +EXE: 0000000100007f58 add x0, x0, #0xfa8 ; literal pool for: "Hello world\n" EXE: 0000000100007f5c bl 0x100007f78 ; symbol stub for: _printf ObjC-OBJ: 000000000000000c adrp x8, L_OBJC_SELECTOR_REFERENCES_3@PAGE ObjC-OBJ: 0000000000000010 add x8, x8, L_OBJC_SELECTOR_REFERENCES_3@PAGEOFF ObjC-OBJ:0000000000000044 bl _objc_msgSend -ObjC-EXE: 0000000100007ed0 add x8, x8, #80 ; Objc selector ref: date -ObjC-EXE: 0000000100007ed8 add x9, x9, #96 ; Objc class ref: _OBJC_CLASS_$_NSDate +ObjC-EXE: 0000000100007ed0 add x8, x8, #0x50 ; Objc selector ref: date +ObjC-EXE: 0000000100007ed8 add x9, x9, #0x60 ; Objc class ref: _OBJC_CLASS_$_NSDate ObjC-EXE: 0000000100007f04 bl 0x100007f50 ; Objc message: +[NSObject new] ObjC-EXE: 0000000100007f1c bl 0x100007f50 ; Objc message: -[x0 new] -ObjC-EXE: 0000000100007f2c add x0, x0, #32 ; Objc cfstring ref: @"The current date and time is: %@" +ObjC-EXE: 0000000100007f2c add x0, x0, #0x20 ; Objc cfstring ref: @"The current date and time is: %@" ObjC-EXE: 0000000100007f30 bl 0x100007f44 ; symbol stub for: _NSLog diff --git a/test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm b/test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm Binary files differnew file mode 100755 index 0000000000000..5e738294163d4 --- /dev/null +++ b/test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm diff --git a/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test b/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test index f741f6cb27a13..fab64f549ef4d 100644 --- a/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test +++ b/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test @@ -10,7 +10,11 @@ nop .arm _a: nop +.long 0xf8765432 +nop @ CHECK: 00 bf nop @ CHECK-NEXT: 00 bf nop -@ CHECK: 00 f0 20 e3 nop +@ CHECK: 00 f0 20 e3 nop +@ CHECK-NEXT: .long 0xf8765432 +@ CHECK-NEXT: nop diff --git a/test/tools/llvm-objdump/ARM/macho-symbolized-disassembly.test b/test/tools/llvm-objdump/ARM/macho-symbolized-disassembly.test index eeeab526cf81c..2b7e44e940bb3 100644 --- a/test/tools/llvm-objdump/ARM/macho-symbolized-disassembly.test +++ b/test/tools/llvm-objdump/ARM/macho-symbolized-disassembly.test @@ -1,8 +1,8 @@ // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.obj.macho-arm | FileCheck %s -check-prefix=OBJ // RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.macho-arm | FileCheck %s -check-prefix=EXE -OBJ: 00000006 movw r3, :lower16:((54-14)-4) -OBJ: 0000000a movt r3, :upper16:((54-14)-4) -OBJ: 00000024 bl _printf +OBJ: 00000006 40 f2 24 03 movw r3, :lower16:((54-14)-4) +OBJ: 0000000a c0 f2 00 03 movt r3, :upper16:((54-14)-4) +OBJ: 00000024 ff f7 ec ff bl _printf -EXE: 0000bfa8 blx 0xbffc @ symbol stub for: _printf +EXE: 0000bfa8 00 f0 28 e8 blx 0xbffc @ symbol stub for: _printf diff --git a/test/tools/llvm-objdump/ARM/macho-v7m.test b/test/tools/llvm-objdump/ARM/macho-v7m.test new file mode 100644 index 0000000000000..3ba1122056159 --- /dev/null +++ b/test/tools/llvm-objdump/ARM/macho-v7m.test @@ -0,0 +1,14 @@ +@ RUN: llvm-mc < %s -triple thumbv7m-apple-macho -filetype=obj | llvm-objdump -macho -d - | FileCheck %s +@ RUN: llvm-mc < %s -triple thumbv7em-apple-macho -filetype=obj | llvm-objdump -macho -d - | FileCheck %s + + .thumb + .thumb_func _t +_t: + @ A nice Cortex-M only instruction to make sure the default CPU is sound. + msr msp, r0 + .short 0xf000 + b _t + +@ CHECK: msr msp, r0 +@ CHECK: .short 0xf000 +@ CHECK: b _t diff --git a/test/tools/llvm-objdump/ARM/mh_dylib_header.test b/test/tools/llvm-objdump/ARM/mh_dylib_header.test new file mode 100644 index 0000000000000..474080392c83f --- /dev/null +++ b/test/tools/llvm-objdump/ARM/mh_dylib_header.test @@ -0,0 +1,7 @@ +RUN: llvm-objdump -d -macho %p/Inputs/mh_dylib_header.macho-arm + +CHECK: _t1: +CHECK: movw r0, #4133 + +CHECK: _a1: +CHECK: bx lr diff --git a/test/tools/llvm-objdump/Inputs/LLVM-bundle.macho-x86_64 b/test/tools/llvm-objdump/Inputs/LLVM-bundle.macho-x86_64 Binary files differnew file mode 100755 index 0000000000000..8a7e4ef39e11c --- /dev/null +++ b/test/tools/llvm-objdump/Inputs/LLVM-bundle.macho-x86_64 diff --git a/test/tools/llvm-objdump/Inputs/eh_frame.elf-mipsel b/test/tools/llvm-objdump/Inputs/eh_frame.elf-mipsel Binary files differnew file mode 100755 index 0000000000000..64a5440a74e91 --- /dev/null +++ b/test/tools/llvm-objdump/Inputs/eh_frame.elf-mipsel diff --git a/test/tools/llvm-objdump/Inputs/empty.macho-armv7 b/test/tools/llvm-objdump/Inputs/empty.macho-armv7 Binary files differnew file mode 100644 index 0000000000000..ab6c053e73751 --- /dev/null +++ b/test/tools/llvm-objdump/Inputs/empty.macho-armv7 diff --git a/test/tools/llvm-objdump/Inputs/file-aux-record.yaml b/test/tools/llvm-objdump/Inputs/file-aux-record.yaml index d19afaf68a855..98e5ae64df974 100644 --- a/test/tools/llvm-objdump/Inputs/file-aux-record.yaml +++ b/test/tools/llvm-objdump/Inputs/file-aux-record.yaml @@ -1,3 +1,4 @@ +!COFF header: !Header Machine: IMAGE_FILE_MACHINE_I386 # (0x14c) Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ] diff --git a/test/tools/llvm-objdump/Inputs/section.macho-armv7 b/test/tools/llvm-objdump/Inputs/section.macho-armv7 Binary files differnew file mode 100644 index 0000000000000..810d5c52d3392 --- /dev/null +++ b/test/tools/llvm-objdump/Inputs/section.macho-armv7 diff --git a/test/tools/llvm-objdump/Inputs/tls.exe.coff-x86_64 b/test/tools/llvm-objdump/Inputs/tls.exe.coff-x86_64 Binary files differnew file mode 100644 index 0000000000000..f2fe798d0281c --- /dev/null +++ b/test/tools/llvm-objdump/Inputs/tls.exe.coff-x86_64 diff --git a/test/tools/llvm-objdump/X86/Inputs/codesig.macho-x86_64 b/test/tools/llvm-objdump/X86/Inputs/codesig.macho-x86_64 Binary files differnew file mode 100755 index 0000000000000..396926a06527b --- /dev/null +++ b/test/tools/llvm-objdump/X86/Inputs/codesig.macho-x86_64 diff --git a/test/tools/llvm-objdump/X86/Inputs/hello.exe.stripped.macho-x86_64 b/test/tools/llvm-objdump/X86/Inputs/hello.exe.stripped.macho-x86_64 Binary files differnew file mode 100755 index 0000000000000..9c52d168befb5 --- /dev/null +++ b/test/tools/llvm-objdump/X86/Inputs/hello.exe.stripped.macho-x86_64 diff --git a/test/tools/llvm-objdump/X86/Inputs/macho-universal64.x86_64.i386 b/test/tools/llvm-objdump/X86/Inputs/macho-universal64.x86_64.i386 Binary files differnew file mode 100755 index 0000000000000..add12e44a354d --- /dev/null +++ b/test/tools/llvm-objdump/X86/Inputs/macho-universal64.x86_64.i386 diff --git a/test/tools/llvm-objdump/X86/Inputs/stubbed.dylib.macho-x86_64 b/test/tools/llvm-objdump/X86/Inputs/stubbed.dylib.macho-x86_64 Binary files differnew file mode 100755 index 0000000000000..144738bc97d6e --- /dev/null +++ b/test/tools/llvm-objdump/X86/Inputs/stubbed.dylib.macho-x86_64 diff --git a/test/tools/llvm-objdump/X86/Inputs/truncated-section.dylib.macho-x86_64 b/test/tools/llvm-objdump/X86/Inputs/truncated-section.dylib.macho-x86_64 Binary files differnew file mode 100755 index 0000000000000..a099ee2d3790d --- /dev/null +++ b/test/tools/llvm-objdump/X86/Inputs/truncated-section.dylib.macho-x86_64 diff --git a/test/tools/llvm-objdump/X86/hex-displacement.test b/test/tools/llvm-objdump/X86/hex-displacement.test new file mode 100644 index 0000000000000..dd2332e572f0f --- /dev/null +++ b/test/tools/llvm-objdump/X86/hex-displacement.test @@ -0,0 +1,6 @@ +# Check that target displacement has '0x' prefix +# to accent hex format of the number. + +# RUN: llvm-objdump -d %p/Inputs/hello.exe.macho-i386 | FileCheck %s + +# CHECK: 1f47: e8 00 00 00 00 calll 0 <_main+0xC> diff --git a/test/tools/llvm-objdump/X86/macho-dis-symname.test b/test/tools/llvm-objdump/X86/macho-dis-symname.test index 39d16ecba6f80..9e4f2e3c71f28 100644 --- a/test/tools/llvm-objdump/X86/macho-dis-symname.test +++ b/test/tools/llvm-objdump/X86/macho-dis-symname.test @@ -17,3 +17,9 @@ # CHECK-NOT: __start: # CHECK-NOT: 0000000100000d22 # CHECK-NOT: _main: + +# not RUN: llvm-objdump -m -d %p/Inputs/exeThread.macho-x86_64 -dis-symname _environ 2>&1 | FileCheck -check-prefix BAD-SYMAME-1 %s +BAD-SYMAME-1: -dis-symname: _environ not in the section + +# not RUN: llvm-objdump -m -d %p/Inputs/exeThread.macho-x86_64 -dis-symname __mh_execute_header 2>&1 | FileCheck -check-prefix BAD-SYMAME-2 %s +BAD-SYMAME-2: -dis-symname: __mh_execute_header not in any section diff --git a/test/tools/llvm-objdump/X86/macho-disassembly-stripped.test b/test/tools/llvm-objdump/X86/macho-disassembly-stripped.test new file mode 100644 index 0000000000000..fab86f8b9794a --- /dev/null +++ b/test/tools/llvm-objdump/X86/macho-disassembly-stripped.test @@ -0,0 +1,6 @@ +// RUN: llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex %p/Inputs/hello.exe.stripped.macho-x86_64 | FileCheck %s + +CHECK: (__TEXT,__text) section +CHECK: 0000000100000f30 pushq %rbp +CHECK: 0000000100000f31 movq %rsp, %rbp +CHECK: 0000000100000f34 subq $0x20, %rsp diff --git a/test/tools/llvm-objdump/X86/macho-private-headers.test b/test/tools/llvm-objdump/X86/macho-private-headers.test index ff45b1823fff2..e0c68d7cd97a8 100644 --- a/test/tools/llvm-objdump/X86/macho-private-headers.test +++ b/test/tools/llvm-objdump/X86/macho-private-headers.test @@ -21,6 +21,8 @@ // RUN: | FileCheck %s -check-prefix=FATi386 // RUN: llvm-objdump -p -non-verbose %p/Inputs/hello.obj.macho-x86_64 \ // RUN: | FileCheck %s -check-prefix=NON_VERBOSE +// RUN: llvm-objdump -p %p/Inputs/codesig.macho-x86_64 \ +// RUN: | FileCheck %s -check-prefix=CODESIG CHECK: Mach header CHECK: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags @@ -537,3 +539,8 @@ NON_VERBOSE: extreloff 0 NON_VERBOSE: nextrel 0 NON_VERBOSE: locreloff 0 NON_VERBOSE: nlocrel 0 + +CODESIG: cmd LC_CODE_SIGNATURE +CODESIG: cmdsize 16 +CODESIG: dataoff 8496 +CODESIG: datasize 64 diff --git a/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test b/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test index 260e9aa341e8c..9089716f7a5ed 100644 --- a/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test +++ b/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test @@ -6,6 +6,8 @@ RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -universal-headers -m \ RUN: | FileCheck %s -check-prefix FAT RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -universal-headers -m \ RUN: -non-verbose | FileCheck %s -check-prefix NON-VERBOSE +RUN: llvm-objdump %p/Inputs/macho-universal64.x86_64.i386 -universal-headers \ +RUN: -m | FileCheck %s -check-prefix FAT-64 UEXE-all: macho-universal.x86_64.i386 (architecture x86_64): UEXE-all: (__TEXT,__text) section @@ -62,3 +64,7 @@ NON-VERBOSE: capabilities 0x0 NON-VERBOSE: offset 12288 NON-VERBOSE: size 4336 NON-VERBOSE: align 2^12 (4096) + +FAT-64: Fat headers +FAT-64: fat_magic FAT_MAGIC_64 +FAT-64: nfat_arch 2 diff --git a/test/tools/llvm-objdump/X86/stubbed-dylib.test b/test/tools/llvm-objdump/X86/stubbed-dylib.test new file mode 100644 index 0000000000000..6f7f7221eb166 --- /dev/null +++ b/test/tools/llvm-objdump/X86/stubbed-dylib.test @@ -0,0 +1,5 @@ +RUN: llvm-objdump -macho -d %p/Inputs/stubbed.dylib.macho-x86_64 | FileCheck %s + +CHECK: (__TEXT,__text) section +CHECK-NOT: func +CHECK-NOT: func2 diff --git a/test/tools/llvm-objdump/X86/truncated-section.test b/test/tools/llvm-objdump/X86/truncated-section.test new file mode 100644 index 0000000000000..e9fe75da71afd --- /dev/null +++ b/test/tools/llvm-objdump/X86/truncated-section.test @@ -0,0 +1,7 @@ +RUN: llvm-objdump -macho -d %p/Inputs/truncated-section.dylib.macho-x86_64 | FileCheck %s + +CHECK: _func: +CHECK: retq +CHECK: retq + +CHECK: section data ends, _func2 lies outside valid range diff --git a/test/tools/llvm-objdump/coff-private-headers.test b/test/tools/llvm-objdump/coff-private-headers.test index 51bf4435389c9..e6006dfff6160 100644 --- a/test/tools/llvm-objdump/coff-private-headers.test +++ b/test/tools/llvm-objdump/coff-private-headers.test @@ -43,6 +43,18 @@ EXPORT-NEXT: Ordinal RVA Name EXPORT-NEXT: 5 0x2008 EXPORT-NEXT: 6 0x2010 exportfn2 +// RUN: llvm-objdump -p %p/Inputs/tls.exe.coff-x86_64 | \ +// RUN: FileCheck -check-prefix=TLS %s + +TLS: TLS directory: +TLS-NEXT: StartAddressOfRawData: 0x00000000000000 +TLS-NEXT: EndAddressOfRawData: 0x00000000000000 +TLS-NEXT: AddressOfIndex: 0x00000000000000 +TLS-NEXT: AddressOfCallBacks: 0x00000000000000 +TLS-NEXT: SizeOfZeroFill: 0 +TLS-NEXT: Characteristics: 0 +TLS-NEXT: Alignment: 0 + // RUN: llvm-objdump -p %p/Inputs/nop.exe.coff-i386 | \ // RUN: FileCheck -check-prefix=LOADCFG %s diff --git a/test/tools/llvm-objdump/eh_frame-arm64.test b/test/tools/llvm-objdump/eh_frame-arm64.test index f25e035a266ec..f6d2db8852212 100644 --- a/test/tools/llvm-objdump/eh_frame-arm64.test +++ b/test/tools/llvm-objdump/eh_frame-arm64.test @@ -1,23 +1,23 @@ -# RUN: llvm-objdump -unwind-info %p/Inputs/eh_frame.macho-arm64 2>/dev/null | FileCheck %s +# RUN: llvm-objdump -dwarf=frames %p/Inputs/eh_frame.macho-arm64 2>/dev/null | FileCheck %s -# CHECK: Contents of __eh_frame section: -# CHECK: CIE: -# CHECK: Length: 16 -# CHECK: CIE ID: 0 -# CHECK: Version: 1 -# CHECK: Augmentation String: zR -# CHECK: Code Alignment Factor: 1 -# CHECK: Data Alignment Factor: -8 -# CHECK: Return Address Register: 30 -# CHECK: Augmentation Data Length: 1 -# CHECK: FDE Address Pointer Encoding: 16 -# CHECK: Instructions: -# CHECK: 0c 1f 00 -# CHECK: FDE: -# CHECK: Length: 32 -# CHECK: CIE Offset: 0 -# CHECK: PC Begin: ffffffffffffffe4 -# CHECK: PC Range: 0000000000000020 -# CHECK: Augmentation Data Length: 0 -# CHECK: Instructions: -# CHECK: 48 0e 10 9e 01 9d 02 00 00 00 00 +# CHECK: .eh_frame contents: + +# CHECK: 00000000 00000010 ffffffff CIE +# CHECK: Version: 1 +# CHECK: Augmentation: "zR" +# CHECK: Code alignment factor: 1 +# CHECK: Data alignment factor: -8 +# CHECK: Return address column: 30 +# CHECK: Augmentation data: 10 + +# CHECK: DW_CFA_def_cfa: reg31 +0 + +# CHECK: 00000014 00000020 00000018 FDE cie=00000018 pc=ffffffe4...00000004 +# CHECK: DW_CFA_advance_loc: 8 +# CHECK: DW_CFA_def_cfa_offset: +16 +# CHECK: DW_CFA_offset: reg30 -8 +# CHECK: DW_CFA_offset: reg29 -16 +# CHECK: DW_CFA_nop: +# CHECK: DW_CFA_nop: +# CHECK: DW_CFA_nop: +# CHECK: DW_CFA_nop: diff --git a/test/tools/llvm-objdump/eh_frame-mipsel.test b/test/tools/llvm-objdump/eh_frame-mipsel.test new file mode 100644 index 0000000000000..0592c8c212e89 --- /dev/null +++ b/test/tools/llvm-objdump/eh_frame-mipsel.test @@ -0,0 +1,27 @@ +# RUN: llvm-objdump -dwarf=frames %p/Inputs/eh_frame.elf-mipsel | FileCheck %s + +# CHECK: .eh_frame contents: + +# CHECK: 00000000 00000018 ffffffff CIE +# CHECK: Version: 1 +# CHECK: Augmentation: "zPLR" +# CHECK: Code alignment factor: 1 +# CHECK: Data alignment factor: -4 +# CHECK: Return address column: 31 +# CHECK: Augmentation data: 80 90 0B 41 00 00 0B + +# CHECK: DW_CFA_def_cfa: reg29 +0 + +# CHECK: 0000001c 00000018 00000020 FDE cie=00000020 pc=00400890...004008dc +# CHECK: DW_CFA_advance_loc: 4 +# CHECK: DW_CFA_def_cfa_offset: +24 +# CHECK: DW_CFA_advance_loc: 4 +# CHECK: DW_CFA_offset: reg31 -4 +# CHECK: DW_CFA_nop: + +# CHECK: 00000038 00000000 ffffffff CIE +# CHECK: Version: 0 +# CHECK: Augmentation: "" +# CHECK: Code alignment factor: 0 +# CHECK: Data alignment factor: 0 +# CHECK: Return address column: 0 diff --git a/test/tools/llvm-objdump/eh_frame_zero_cie.test b/test/tools/llvm-objdump/eh_frame_zero_cie.test new file mode 100644 index 0000000000000..7b345c9d55a91 --- /dev/null +++ b/test/tools/llvm-objdump/eh_frame_zero_cie.test @@ -0,0 +1,10 @@ +# RUN: llvm-objdump -dwarf=frames %p/Inputs/eh_frame_zero_cie.o 2>/dev/null | FileCheck %s + +# CHECK: .eh_frame contents: + +# CHECK: 00000000 00000000 ffffffff CIE +# CHECK: Version: 0 +# CHECK: Augmentation: "" +# CHECK: Code alignment factor: 0 +# CHECK: Data alignment factor: 0 +# CHECK: Return address column: 0 diff --git a/test/tools/llvm-objdump/macho-LLVM-bundle.test b/test/tools/llvm-objdump/macho-LLVM-bundle.test new file mode 100644 index 0000000000000..b7134307257e5 --- /dev/null +++ b/test/tools/llvm-objdump/macho-LLVM-bundle.test @@ -0,0 +1,60 @@ +# REQUIRES: xar +# RUN: llvm-objdump -macho -archive-headers -section __LLVM,__bundle %p/Inputs/LLVM-bundle.macho-x86_64 | FileCheck %s + +# CHECK: For (__LLVM,__bundle) section: xar header +# CHECK: magic XAR_HEADER_MAGIC +# CHECK: size 28 +# CHECK: version 1 +# CHECK: toc_length_compressed 542 +# CHECK: toc_length_uncompressed 1250 +# CHECK: cksum_alg XAR_CKSUM_SHA1 +# CHECK: For (__LLVM,__bundle) section: xar archive files: +# CHECK: 1664 1 +# CHECK: For (__LLVM,__bundle) section: xar table of contents: +# CHECK: <?xml version="1.0" encoding="UTF-8"?> +# CHECK: <xar> +# CHECK: <subdoc subdoc_name="Ld"> +# CHECK: <version>1.0</version> +# CHECK: <architecture>x86_64</architecture> +# CHECK: <platform>MacOSX</platform> +# CHECK: <sdkversion>10.11.0</sdkversion> +# CHECK: <dylibs> +# CHECK: <lib>libSystem.dylib</lib> +# CHECK: </dylibs> +# CHECK: <link-options> +# CHECK: <option>-execute</option> +# CHECK: <option>-macosx_version_min</option> +# CHECK: <option>10.11.0</option> +# CHECK: <option>-e</option> +# CHECK: <option>_main</option> +# CHECK: <option>-executable_path</option> +# CHECK: <option>hello</option> +# CHECK: </link-options> +# CHECK: </subdoc> +# CHECK: <toc> +# CHECK: <checksum style="sha1"> +# CHECK: <size>20</size> +# CHECK: <offset>0</offset> +# CHECK: </checksum> +# CHECK: <creation-time>2016-05-23T20:49:10</creation-time> +# CHECK: <file id="1"> +# CHECK: <name>1</name> +# CHECK: <type>file</type> +# CHECK: <data> +# CHECK: <archived-checksum style="sha1">a319940ff5f5248ca8b44cf7b4b65e7dd49a47ab</archived-checksum> +# CHECK: <extracted-checksum style="sha1">a319940ff5f5248ca8b44cf7b4b65e7dd49a47ab</extracted-checksum> +# CHECK: <size>1664</size> +# CHECK: <offset>20</offset> +# CHECK: <encoding style="application/octet-stream"/> +# CHECK: <length>1664</length> +# CHECK: </data> +# CHECK: <file-type>Bitcode</file-type> +# CHECK: <clang> +# CHECK: <cmd>-triple</cmd> +# CHECK: <cmd>x86_64-apple-macosx10.11.0</cmd> +# CHECK: <cmd>-emit-obj</cmd> +# CHECK: <cmd>-disable-llvm-optzns</cmd> +# CHECK: </clang> +# CHECK: </file> +# CHECK: </toc> +# CHECK: </xar> diff --git a/test/tools/llvm-objdump/macho-objc-meta-data.test b/test/tools/llvm-objdump/macho-objc-meta-data.test new file mode 100644 index 0000000000000..e659e7e577115 --- /dev/null +++ b/test/tools/llvm-objdump/macho-objc-meta-data.test @@ -0,0 +1,3 @@ +# RUN: llvm-objdump -macho -objc-meta-data %p/Inputs/empty.macho-armv7 | FileCheck %s + +# CHECK: empty.macho-armv7: diff --git a/test/tools/llvm-objdump/macho-sections.test b/test/tools/llvm-objdump/macho-sections.test index 07c2b52ebfc85..7b0d89ce50530 100644 --- a/test/tools/llvm-objdump/macho-sections.test +++ b/test/tools/llvm-objdump/macho-sections.test @@ -1,3 +1,11 @@ # RUN: llvm-objdump -macho -section=__data %p/Inputs/bind2.macho-x86_64 | FileCheck %s # CHECK: bind2.macho-x86_64: + +# RUN: llvm-objdump -macho -section=__data %p/Inputs/section.macho-armv7 | FileCheck -check-prefix CHECK-ADDR %s + +# CHECK-ADDR: 00000004 00000001 00000002 + +# RUN: llvm-objdump -macho -section=__const %p/Inputs/section.macho-armv7 | FileCheck -check-prefix CHECK-BYTES %s + +# CHECK-BYTES: 0000000c 00000003 04 05 06 diff --git a/test/tools/llvm-objdump/malformed-macho.test b/test/tools/llvm-objdump/malformed-macho.test index e96945d91125b..0bc2ce8e898ff 100644 --- a/test/tools/llvm-objdump/malformed-macho.test +++ b/test/tools/llvm-objdump/malformed-macho.test @@ -1,2 +1,2 @@ RUN: not llvm-objdump -macho -s %p/Inputs/malformed-macho.bin 2>&1 | FileCheck %s -check-prefix=MALFORMED -MALFORMED: '{{.*}}': The file was not recognized as a valid object file +MALFORMED: The file was not recognized as a valid object file |