File: entry.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (55 lines) | stat: -rw-r--r-- 2,046 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1

# RUN: ld.lld -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN1 %s
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s

# WARN1: warning: cannot find entry symbol foobar; not setting start address

# RUN: ld.lld %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN2 %s
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s
# WARN2: warning: cannot find entry symbol _start; not setting start address

# RUN: ld.lld -shared -e foobar %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN3 %s
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=NOENTRY %s
# WARN3: warning: cannot find entry symbol foobar; not setting start address

# RUN: ld.lld -shared --fatal-warnings -e entry %t1 -o %t2
# RUN: ld.lld -shared --fatal-warnings %t1 -o %t2

# RUN: echo .data > %t.s
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -n %t.s -o %t3
# RUN: ld.lld %t3 -o %t4 2>&1 | FileCheck -check-prefix=WARN4 %s
# RUN: llvm-readobj --file-headers %t4 | FileCheck -check-prefix=NOENTRY %s

# WARN4: cannot find entry symbol _start; not setting start address
# NOENTRY: Entry: 0x0

# RUN: ld.lld -v -r %t1 -o %t2 2>&1 | FileCheck -check-prefix=WARN5 %s
# WARN5-NOT: warning: cannot find entry symbol

# RUN: ld.lld %t1 -o %t2 -e entry
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=SYM %s
# SYM: Entry: 0x201128

# RUN: ld.lld %t1 --fatal-warnings -shared -o %t2 -e entry
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DSO %s
# DSO: Entry: 0x1240

# RUN: ld.lld %t1 -o %t2 --entry=4096
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=DEC %s
# DEC: Entry: 0x1000

# RUN: ld.lld %t1 -o %t2 --entry 0xcafe
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=HEX %s
# HEX: Entry: 0xCAFE

# RUN: ld.lld %t1 -o %t2 -e 0777
# RUN: llvm-readobj --file-headers %t2 | FileCheck -check-prefix=OCT %s
# OCT: Entry: 0x1FF

.globl entry
.text
	.quad 0
entry:
	ret