Imported Upstream version 6.10.0.49

Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-16 16:38:04 +00:00
parent d94e79959b
commit 468663ddbb
48518 changed files with 2789335 additions and 61176 deletions

View File

@ -0,0 +1,20 @@
; RUN: llvm-as %s -o=%t1
; RUN: rm -f %t2
; RUN: llvm-ar rcs %t2 %t1
; RUN: llvm-nm -M %t2 | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
module asm ".global global_asm_sym"
module asm "global_asm_sym:"
module asm "local_asm_sym:"
module asm ".long undef_asm_sym"
; CHECK: Archive map
; CHECK-NEXT: global_asm_sym in archive-ir-asm.ll
; CHECK: archive-ir-asm.ll
; CHECK-NEXT: T global_asm_sym
; CHECK-NEXT: t local_asm_sym
; CHECK-NEXT: U undef_asm_sym

View File

@ -0,0 +1,19 @@
# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
# RUN: rm -f %t
# RUN: llvm-ar rcs %t %t.o
# RUN: llvm-nm -M %t | FileCheck %s
# Test that weak undefined symbols don't show up in the archive symbol
# table.
.global foo
foo:
.weak bar
.quad bar
# CHECK: Archive map
# CHECK-NEXT: foo in archive-symbol-table.s.tmp.o
# CHECK-NOT: in
# CHECK: archive-symbol-table.s.tmp.o
# CHECK-NEXT: w bar
# CHECK-NEXT: T foo

View File

@ -0,0 +1,15 @@
; RUN: llvm-as < %s -o - | llvm-nm - | FileCheck %s
target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
target triple = "i386-apple-macosx10.8.0"
; Verify that llvm-nm handles correctly module level ASM, including "lazy_reference"
; CHECK: U .objc_class_name_Bar
; CHECK: U .objc_class_name_Foo
; CHECK: T .objc_class_name_FooSubClass
module asm "\09.objc_class_name_FooSubClass=0"
module asm "\09.globl .objc_class_name_FooSubClass"
module asm "\09.lazy_reference .objc_class_name_Foo"
module asm "\09.lazy_reference .objc_class_name_Bar"

View File

@ -0,0 +1,17 @@
; Check that we correctly handle the case where we have inline asm and the
; target is not registered. In this case we shouldn't emit an irsymtab.
; RUN: llvm-as -o %t %s
; RUN: llvm-bcanalyzer -dump %t | FileCheck --check-prefix=AS %s
; AS-NOT: <SYMTAB_BLOCK
; RUN: opt -o %t2 %s
; RUN: llvm-bcanalyzer -dump %t2 | FileCheck --check-prefix=OPT %s
; OPT: <SYMTAB_BLOCK
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
module asm "ret"

View File

@ -0,0 +1,15 @@
; Check that we do not create an irsymtab for modules with malformed IR.
; RUN: opt -o %t %s
; RUN: llvm-bcanalyzer -dump %t | FileCheck %s
; CHECK-NOT: <SYMTAB_BLOCK
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@g1 = global i32 1
@g2 = global i32 2
@a = alias i32, inttoptr(i32 sub (i32 ptrtoint (i32* @g1 to i32),
i32 ptrtoint (i32* @g2 to i32)) to i32*)

View File

@ -0,0 +1,33 @@
; RUN: env LLVM_OVERRIDE_PRODUCER=producer opt -o %t %s
; RUN: llvm-bcanalyzer -dump -show-binary-blobs %t | FileCheck --check-prefix=BCA %s
; Same producer, does not require upgrade.
; RUN: env LLVM_OVERRIDE_PRODUCER=producer llvm-lto2 dump-symtab %t | FileCheck --check-prefix=SYMTAB %s
; Different producer, requires upgrade.
; RUN: env LLVM_OVERRIDE_PRODUCER=consumer llvm-lto2 dump-symtab %t | FileCheck --check-prefix=SYMTAB %s
; BCA: <SYMTAB_BLOCK
; Version stored at offset 0.
; BCA-NEXT: <BLOB abbrevid=4/> blob data = '\x01\x00\x00\x00\x06\x00\x00\x00\x08\x00\x00\x00D\x00\x00\x00\x01\x00\x00\x00P\x00\x00\x00\x00\x00\x00\x00P\x00\x00\x00\x02\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x0E\x00\x00\x00\x18\x00\x00\x00&\x00\x00\x00\x0B\x00\x00\x001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\xFF\xFF\xFF\xFF\x00$\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\xFF\xFF\xFF\xFF\x08$\x00\x00'
; BCA-NEXT: </SYMTAB_BLOCK>
; BCA-NEXT: <STRTAB_BLOCK
; BCA-NEXT: <BLOB abbrevid=4/> blob data = 'foobarproducerx86_64-unknown-linux-gnuirsymtab.ll'
; BCA-NEXT: </STRTAB_BLOCK>
; SYMTAB: version: 1
; SYMTAB-NEXT: producer: producer
; SYMTAB-NEXT: target triple: x86_64-unknown-linux-gnu
; SYMTAB-NEXT: source filename: irsymtab.ll
; SYMTAB-NEXT: D------X foo
; SYMTAB-NEXT: DU-----X bar
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
source_filename = "irsymtab.ll"
define void @foo() {
ret void
}
declare void @bar()

View File

@ -0,0 +1,3 @@
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -0,0 +1,3 @@
RUN: llvm-objdump -disassemble %p/../Inputs/macho-text-sections.macho-x86_64 | FileCheck %s
CHECK: Disassembly of section __notext,__notext

View File

@ -0,0 +1,13 @@
; RUN: llvm-as %s -o=%t1
; RUN: llvm-nm %t1 | FileCheck %s
; Check that __libc_blah is reported as defined weak.
; CHECK: W __libc_blah
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-freebsd11.0"
module asm ".weak __libc_blah"
module asm ".equ __libc_blah, blah"
module asm ".globl blah"
module asm "blah: ret"

View File

@ -0,0 +1,9 @@
// RUN: llvm-mc %s -o %t -filetype=obj -triple=x86_64-pc-win32
// RUN: llvm-nm --undefined-only %t | FileCheck %s
// CHECK: w foo
g:
movl foo(%rip), %eax
retq
.weak foo

View File

@ -0,0 +1,52 @@
; RUN: llvm-as %s -o - | llvm-nm - | FileCheck %s
; CHECK: D a1
; CHECK-NEXT: d a2
; CHECK-NEXT: T f1
; CHECK-NEXT: t f2
; CHECK-NEXT: W f3
; CHECK-NEXT: U f4
; CHECK-NEXT: w f5
; CHECK-NEXT: D g1
; CHECK-NEXT: d g2
; CHECK-NEXT: C g3
; CHECK-NOT: g4
; CHECK-NEXT: T global_asm_sym
; CHECK-NEXT: T ifunc_f1
; CHECK-NEXT: t local_asm_sym
; CHECK-NEXT: U undef_asm_sy
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
module asm ".global global_asm_sym"
module asm "global_asm_sym:"
module asm "local_asm_sym:"
module asm ".long undef_asm_sym"
@g1 = global i32 42
@g2 = internal global i32 42
@g3 = common global i32 0
@g4 = private global i32 42
@a1 = alias i32, i32* @g1
@a2 = internal alias i32, i32* @g1
define void @f1() {
call void @f5()
ret void
}
@ifunc_f1 = ifunc void (), void ()* @f1
define internal void @f2() {
ret void
}
define linkonce_odr void @f3() {
ret void
}
declare void @f4()
declare extern_weak void @f5()

View File

@ -0,0 +1,9 @@
// RUN: llvm-mc %s -o %t -filetype=obj -triple=x86_64-apple-darwin
// RUN: llvm-nm -n %t | FileCheck %s
// CHECK: 0000000000000000 t _f
// CHECK: 0000000000000004 C _a
_f:
retq
.comm _a,4

View File

@ -0,0 +1,18 @@
// RUN: llvm-mc %s -o %t -filetype=obj -triple=x86_64-pc-linux
// RUN: llvm-nm --print-size %t | FileCheck %s
// CHECK: 0000000000000000 ffffffffffffffff n a
// CHECK: 0000000000000000 0000000000000000 N b
// CHECK: 0000000000000004 0000000000000004 C c
// CHECK: ffffffffffffffff 0000000000000000 a d
.section foo
a:
.size a, 0xffffffffffffffff
.global b
b:
.comm c,4,8
d = 0xffffffffffffffff

View File

@ -0,0 +1,10 @@
; RUN: llvm-as %s -o=%t1
; RUN: llvm-nm %t1 | FileCheck %s
; Check that patatino is reported as undefined weak.
; CHECK: w patatino
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-freebsd11.0"
module asm ".weak patatino"

View File

@ -0,0 +1,9 @@
RUN: llvm-objdump -d %p/../Inputs/no-start-symbol.elf-x86_64 | FileCheck %s
Test that we disassemble the start of the section.
CHECK: Disassembly of section .text:
CHECK-NEXT: .text:
CHECK-NEXT: 0: 90 nop
CHECK: foo:
CHECK-NEXT: 1: 90 nop

View File

@ -0,0 +1,28 @@
# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
# RUN: obj2yaml %t.o | FileCheck %s
# CHECK: Sections:
# CHECK: - Name: .group{{$}}
# CHECK: Members:
# CHECK: - SectionOrType: .text.foo{{$}}
# CHECK: - SectionOrType: .rela.text.foo{{$}}
# CHECK: - Name: .text.foo{{$}}
# CHECK: - Name: .rela.text.foo{{$}}
# CHECK: Info: .text.foo{{$}}
# CHECK: - Name: .group1{{$}}
# CHECK: Members:
# CHECK: - SectionOrType: .text.foo2{{$}}
# CHECK: - SectionOrType: .rela.text.foo3{{$}}
# CHECK: - Name: .text.foo2{{$}}
# CHECK: - Name: .rela.text.foo3{{$}}
# CHECK: Info: .text.foo2{{$}}
# CHECK: Symbols:
# CHECK: Section: .group{{$}}
# CHECK: Section: .group1{{$}}
.section .text.foo,"axG",@progbits,sym1,comdat
.quad undef
.section .text.foo,"axG",@progbits,sym2,comdat
.quad undef

View File

@ -0,0 +1,9 @@
# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
# RUN: obj2yaml %t.o | FileCheck %s
# CHECK: Relocations:
# CHECK: Symbol: .text
# CHECK: Symbols:
# CHECK: - Name: .text
.quad .text

View File

@ -0,0 +1,102 @@
RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-i386 \
RUN: | FileCheck %s -check-prefix COFF-i386
RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.coff-x86-64 \
RUN: | FileCheck %s -check-prefix COFF-x86-64
RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.macho-i386 \
RUN: | FileCheck %s -check-prefix MACHO-i386
RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.macho-x86-64 \
RUN: | FileCheck %s -check-prefix MACHO-x86-64
RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF-i386
RUN: llvm-objdump -d -r %p/../Inputs/trivial-object-test.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF-x86-64
COFF-i386: file format COFF-i386
COFF-i386: Disassembly of section .text:
COFF-i386: 0: 83 ec 0c subl $12, %esp
COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp)
COFF-i386: e: IMAGE_REL_I386_DIR32 L_.str
COFF-i386: 12: e8 00 00 00 00 calll 0
COFF-i386: 13: IMAGE_REL_I386_REL32 _puts
COFF-i386: 17: e8 00 00 00 00 calll 0
COFF-i386: 18: IMAGE_REL_I386_REL32 _SomeOtherFunction
COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax
COFF-i386: 20: 83 c4 0c addl $12, %esp
COFF-i386: 23: c3 ret
COFF-x86-64: file format COFF-x86-64
COFF-x86-64: Disassembly of section .text:
COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp
COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp)
COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx
COFF-x86-64: f: IMAGE_REL_AMD64_REL32 L.str
COFF-x86-64: 13: e8 00 00 00 00 callq 0
COFF-x86-64: 14: IMAGE_REL_AMD64_REL32 puts
COFF-x86-64: 18: e8 00 00 00 00 callq 0
COFF-x86-64: 19: IMAGE_REL_AMD64_REL32 SomeOtherFunction
COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax
COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp
COFF-x86-64: 25: c3 ret
MACHO-i386: file format Mach-O 32-bit i386
MACHO-i386: Disassembly of section __TEXT,__text:
MACHO-i386: _main:
MACHO-i386: 0: 83 ec 0c subl $12, %esp
MACHO-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
MACHO-i386: b: c7 04 24 24 00 00 00 movl $36, (%esp)
MACHO-i386: e: GENERIC_RELOC_VANILLA __cstring
MACHO-i386: 12: e8 1f 00 00 00 calll 31
MACHO-i386: 13: GENERIC_RELOC_VANILLA __jump_table
MACHO-i386: 17: e8 15 00 00 00 calll 21
MACHO-i386: 18: GENERIC_RELOC_VANILLA __jump_table
MACHO-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax
MACHO-i386: 20: 83 c4 0c addl $12, %esp
MACHO-i386: 23: c3 ret
MACHO-x86-64: file format Mach-O 64-bit x86-64
MACHO-x86-64: Disassembly of section __TEXT,__text:
MACHO-x86-64: _main:
MACHO-x86-64: 0: 48 83 ec 08 subq $8, %rsp
MACHO-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
MACHO-x86-64: c: 48 8d 3d 00 00 00 00 leaq (%rip), %rdi
MACHO-x86-64: f: X86_64_RELOC_SIGNED L_.str
MACHO-x86-64: 13: e8 00 00 00 00 callq 0
MACHO-x86-64: 14: X86_64_RELOC_BRANCH _puts
MACHO-x86-64: 18: 30 c0 xorb %al, %al
MACHO-x86-64: 1a: e8 00 00 00 00 callq 0
MACHO-x86-64: 1b: X86_64_RELOC_BRANCH _SomeOtherFunction
MACHO-x86-64: 1f: 8b 44 24 04 movl 4(%rsp), %eax
MACHO-x86-64: 23: 48 83 c4 08 addq $8, %rsp
MACHO-x86-64: 27: c3 ret
ELF-i386: file format ELF32-i386
ELF-i386: Disassembly of section .text:
ELF-i386: main:
ELF-i386: 0: 83 ec 0c subl $12, %esp
ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp)
ELF-i386: e: R_386_32 .rodata.str1.1
ELF-i386: 12: e8 fc ff ff ff calll -4
ELF-i386: 13: R_386_PC32 puts
ELF-i386: 17: e8 fc ff ff ff calll -4
ELF-i386: 18: R_386_PC32 SomeOtherFunction
ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax
ELF-i386: 20: 83 c4 0c addl $12, %esp
ELF-i386: 23: c3 ret
ELF-x86-64: file format ELF64-x86-64
ELF-x86-64: Disassembly of section .text:
ELF-x86-64: main:
ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp
ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
ELF-x86-64: c: bf 00 00 00 00 movl $0, %edi
ELF-x86-64: d: R_X86_64_32S .rodata.str1.1+0
ELF-x86-64: 11: e8 00 00 00 00 callq 0
ELF-x86-64: 12: R_X86_64_PC32 puts-4-P
ELF-x86-64: 16: 30 c0 xorb %al, %al
ELF-x86-64: 18: e8 00 00 00 00 callq 0
ELF-x86-64: 19: R_X86_64_PC32 SomeOtherFunction-4-P
ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax
ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp
ELF-x86-64: 25: c3 ret

View File

@ -0,0 +1,10 @@
RUN: llvm-objdump -d %p/../Inputs/trivial-label-test.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF-x86-64
ELF-x86-64: file format ELF64-x86-64
ELF-x86-64: Disassembly of section .text:
ELF-x86-64: foo:
ELF-x86-64: 0: 90 nop
ELF-x86-64: bum:
ELF-x86-64: 1: 90 nop

View File

@ -0,0 +1,54 @@
RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-i386 \
RUN: | FileCheck %s -check-prefix COFF-i386
RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.coff-x86-64 \
RUN: | FileCheck %s -check-prefix COFF-x86-64
RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF-i386
RUN: llvm-objdump -d %p/../Inputs/trivial-object-test.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF-x86-64
COFF-i386: file format COFF-i386
COFF-i386: Disassembly of section .text:
COFF-i386: 0: 83 ec 0c subl $12, %esp
COFF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
COFF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp)
COFF-i386: 12: e8 00 00 00 00 calll 0
COFF-i386: 17: e8 00 00 00 00 calll 0
COFF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax
COFF-i386: 20: 83 c4 0c addl $12, %esp
COFF-i386: 23: c3 ret
COFF-x86-64: file format COFF-x86-64
COFF-x86-64: Disassembly of section .text:
COFF-x86-64: 0: 48 83 ec 28 subq $40, %rsp
COFF-x86-64: 4: c7 44 24 24 00 00 00 00 movl $0, 36(%rsp)
COFF-x86-64: c: 48 8d 0d 00 00 00 00 leaq (%rip), %rcx
COFF-x86-64: 13: e8 00 00 00 00 callq 0
COFF-x86-64: 18: e8 00 00 00 00 callq 0
COFF-x86-64: 1d: 8b 44 24 24 movl 36(%rsp), %eax
COFF-x86-64: 21: 48 83 c4 28 addq $40, %rsp
COFF-x86-64: 25: c3 ret
ELF-i386: file format ELF32-i386
ELF-i386: Disassembly of section .text:
ELF-i386: 0: 83 ec 0c subl $12, %esp
ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp)
ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp)
ELF-i386: 12: e8 fc ff ff ff calll -4
ELF-i386: 17: e8 fc ff ff ff calll -4
ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax
ELF-i386: 20: 83 c4 0c addl $12, %esp
ELF-i386: 23: c3 ret
ELF-x86-64: file format ELF64-x86-64
ELF-x86-64: Disassembly of section .text:
ELF-x86-64: 0: 48 83 ec 08 subq $8, %rsp
ELF-x86-64: 4: c7 44 24 04 00 00 00 00 movl $0, 4(%rsp)
ELF-x86-64: c: bf 00 00 00 00 movl $0, %edi
ELF-x86-64: 11: e8 00 00 00 00 callq 0
ELF-x86-64: 16: 30 c0 xorb %al, %al
ELF-x86-64: 18: e8 00 00 00 00 callq 0
ELF-x86-64: 1d: 8b 44 24 04 movl 4(%rsp), %eax
ELF-x86-64: 21: 48 83 c4 08 addq $8, %rsp
ELF-x86-64: 25: c3 ret

Some files were not shown because too many files have changed in this diff Show More