56 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t13 4# RUN: ld.lld -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN1 %s5# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s6 7# WARN1: warning: cannot find entry symbol foobar; not setting start address8 9# RUN: ld.lld %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN2 %s10# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s11# WARN2: warning: cannot find entry symbol _start; not setting start address12 13# RUN: ld.lld -shared -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN3 %s14# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s15# WARN3: warning: cannot find entry symbol foobar; not setting start address16 17# RUN: ld.lld -shared --fatal-warnings -e entry %t1 -o %t218# RUN: ld.lld -shared --fatal-warnings %t1 -o %t219 20# RUN: echo .data > %t.s21# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -n %t.s -o %t322# RUN: ld.lld %t3 -o %t4 2>&1 | FileCheck -check-prefix=WARN4 %s23# RUN: llvm-readobj --file-headers %t4 | FileCheck -check-prefix=NOENTRY %s24 25# WARN4: cannot find entry symbol _start; not setting start address26# NOENTRY: Entry: 0x027 28# RUN: ld.lld -v -r %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN5 %s29# WARN5-NOT: warning: cannot find entry symbol30 31# RUN: ld.lld %t1 -o %t2 -e entry32# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=SYM %s33# SYM: Entry: 0x20112834 35# RUN: ld.lld %t1 --fatal-warnings -shared -o %t2 -e entry36# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DSO %s37# DSO: Entry: 0x124038 39# RUN: ld.lld %t1 -o %t2 --entry=409640# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DEC %s41# DEC: Entry: 0x100042 43# RUN: ld.lld %t1 -o %t2 --entry 0xcafe44# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=HEX %s45# HEX: Entry: 0xCAFE46 47# RUN: ld.lld %t1 -o %t2 -e 077748# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=OCT %s49# OCT: Entry: 0x1FF50 51.globl entry52.text53 .quad 054entry:55 ret56