[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / section-layout.s
blobccd59129e31d620a153d6418f96c202ff724494d
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: ld.lld %t -o %tout
4 # RUN: llvm-readobj --sections %tout | FileCheck %s
6 # Check that sections are laid out in the correct order.
8 .global _start
9 .text
10 _start:
12 .section t,"x",@nobits
13 .section s,"x"
14 .section r,"w",@nobits
15 .section q,"w"
16 .section p,"wx",@nobits
17 .section o,"wx"
18 .section n,"",@nobits
19 .section m,""
21 .section l,"awx",@nobits
22 .section k,"awx"
23 .section j,"aw",@nobits
24 .section i,"aw"
25 .section g,"awT",@nobits
26 .section e,"awT"
27 .section d,"ax",@nobits
28 .section c,"ax"
29 .section a,"a",@nobits
30 .section b,"a"
32 // For non-executable and non-writable sections, PROGBITS appear after others.
33 // CHECK: Name: a
34 // CHECK: Name: b
36 // CHECK: Name: c
37 // CHECK: Name: d
39 // Sections that are both writable and executable appear before
40 // sections that are only writable.
41 // CHECK: Name: k
42 // CHECK: Name: l
44 // TLS sections are only sorted on NOBITS.
45 // CHECK: Name: e
46 // CHECK: Name: g
48 // Writable sections appear after TLS and other relro sections.
49 // CHECK: Name: i
51 // CHECK: Name: j
53 // Non allocated sections are in input order.
54 // CHECK: Name: t
55 // CHECK: Name: s
56 // CHECK: Name: r
57 // CHECK: Name: q
58 // CHECK: Name: p
59 // CHECK: Name: o
60 // CHECK: Name: n
61 // CHECK: Name: m