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.
12 .section t,"x",@nobits
14 .section r,"w",@nobits
16 .section p,"wx",@nobits
21 .section l,"awx",@nobits
23 .section j,"aw",@nobits
25 .section g,"awT",@nobits
27 .section d,"ax",@nobits
29 .section a,"a",@nobits
32 // For non-executable and non-writable sections, PROGBITS appear after others.
38 // Sections that are both writable and executable appear before
39 // sections that are only writable.
43 // Writable sections appear before TLS and other relro sections.
46 // TLS sections are only sorted on NOBITS.
52 // Non allocated sections are in input order.