2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
4 # RUN: ld.lld -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN1 %s
5 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s
7 # WARN1: warning: cannot find entry symbol foobar; not setting start address
9 # RUN: ld.lld %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN2 %s
10 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s
11 # WARN2: warning: cannot find entry symbol _start; not setting start address
13 # RUN: ld.lld -shared -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN3 %s
14 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s
15 # WARN3: warning: cannot find entry symbol foobar; not setting start address
17 # RUN: ld.lld -shared --fatal-warnings -e entry %t1 -o %t2
18 # RUN: ld.lld -shared --fatal-warnings %t1 -o %t2
20 # RUN: echo .data > %t.s
21 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -n %t.s -o %t3
22 # RUN: ld.lld %t3 -o %t4 2>&1 | FileCheck -check-prefix=WARN4 %s
23 # RUN: llvm-readobj --file-headers %t4 | FileCheck -check-prefix=NOENTRY %s
25 # WARN4: cannot find entry symbol _start; not setting start address
28 # RUN: ld.lld -v -r %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN5 %s
29 # WARN5-NOT: warning: cannot find entry symbol
31 # RUN: ld.lld %t1 -o %t2 -e entry
32 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=SYM %s
33 # SYM: Entry: 0x201128
35 # RUN: ld.lld %t1 --fatal-warnings -shared -o %t2 -e entry
36 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DSO %s
39 # RUN: ld.lld %t1 -o %t2 --entry=4096
40 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DEC %s
43 # RUN: ld.lld %t1 -o %t2 --entry 0xcafe
44 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=HEX %s
47 # RUN: ld.lld %t1 -o %t2 -e 0777
48 # RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=OCT %s