2015-09-30 00:40:13 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
|
2016-09-24 05:04:56 +08:00
|
|
|
# RUN: ld.lld -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN %s
|
2016-09-08 16:57:51 +08:00
|
|
|
# RUN: llvm-readobj -file-headers %t2 | FileCheck -check-prefix=NOENTRY %s
|
2015-11-20 10:32:35 +08:00
|
|
|
# RUN: ld.lld %t1 -o %t2 -e entry
|
2015-12-12 01:42:38 +08:00
|
|
|
# RUN: llvm-readobj -file-headers %t2 | FileCheck -check-prefix=SYM %s
|
2015-12-12 01:46:46 +08:00
|
|
|
# RUN: ld.lld %t1 -shared -o %t2 -e entry
|
|
|
|
# RUN: llvm-readobj -file-headers %t2 | FileCheck -check-prefix=DSO %s
|
2016-07-05 05:50:50 +08:00
|
|
|
# RUN: ld.lld %t1 -o %t2 --entry=4096
|
2015-10-15 06:20:57 +08:00
|
|
|
# RUN: llvm-readobj -file-headers %t2 | FileCheck -check-prefix=DEC %s
|
2016-07-05 05:50:50 +08:00
|
|
|
# RUN: ld.lld %t1 -o %t2 --entry 0xcafe
|
2015-10-15 06:20:57 +08:00
|
|
|
# RUN: llvm-readobj -file-headers %t2 | FileCheck -check-prefix=HEX %s
|
2015-11-18 14:11:01 +08:00
|
|
|
# RUN: ld.lld %t1 -o %t2 -e 0777
|
2015-10-15 06:20:57 +08:00
|
|
|
# RUN: llvm-readobj -file-headers %t2 | FileCheck -check-prefix=OCT %s
|
|
|
|
|
2016-09-24 05:04:56 +08:00
|
|
|
# WARN: entry symbol foobar not found, assuming 0
|
|
|
|
|
2016-09-08 16:57:51 +08:00
|
|
|
# NOENTRY: Entry: 0x0
|
2015-12-12 01:42:38 +08:00
|
|
|
# SYM: Entry: 0x11000
|
2015-12-12 01:46:46 +08:00
|
|
|
# DSO: Entry: 0x1000
|
2015-10-15 06:20:57 +08:00
|
|
|
# DEC: Entry: 0x1000
|
|
|
|
# HEX: Entry: 0xCAFE
|
|
|
|
# OCT: Entry: 0x1FF
|
|
|
|
|
2015-11-20 10:32:35 +08:00
|
|
|
.globl entry
|
|
|
|
entry:
|