File: partition-move-to-main-startstop.s

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (43 lines) | stat: -rw-r--r-- 1,186 bytes parent folder | download | duplicates (20)
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
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -filetype=obj --triple=x86_64-unknown-linux
// RUN: ld.lld %t.o -o %t --export-dynamic --gc-sections
// RUN: llvm-readelf -S %t | FileCheck --implicit-check-not=has_startstop %s

// We can't let the has_startstop section be split by partition because it is
// referenced by __start_ and __stop_ symbols, so the split could result in
// some sections being moved out of the __start_/__stop_ range. Make sure that
// that didn't happen by checking that there is only one section.
//
// It's fine for us to split no_startstop because of the lack of
// __start_/__stop_ symbols.

// CHECK: has_startstop
// CHECK: no_startstop

// CHECK: no_startstop

.section .llvm_sympart.f1,"",@llvm_sympart
.asciz "part1"
.quad f1

.section .text._start,"ax",@progbits
.globl _start
_start:
call __start_has_startstop
call __stop_has_startstop

.section .text.f1,"ax",@progbits
.globl f1
f1:

.section has_startstop,"ao",@progbits,.text._start,unique,1
.quad 1

.section has_startstop,"ao",@progbits,.text.f1,unique,2
.quad 2

.section no_startstop,"ao",@progbits,.text._start,unique,1
.quad 3

.section no_startstop,"ao",@progbits,.text.f1,unique,2
.quad 4