2 ## Test quotation when specifying section names.
4 # RUN: rm -rf %t && split-file %s %t && cd %t
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o
6 # RUN: ld.lld -T a.t a.o
7 # RUN: llvm-readelf -S -s a.out | FileCheck %s
9 # CHECK: Name Type Address Off Size ES Flg Lk Inf Al
10 # CHECK-NEXT: NULL 0000000000000000 000000 000000 00 0 0 0
11 # CHECK-NEXT: .text {{.*}}
12 # CHECK-NEXT: .data {{.*}}
13 # CHECK: Num: Value Size Type Bind Vis Ndx Name
14 # CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
15 # CHECK-NEXT: 1: 0000000000000009 0 NOTYPE GLOBAL DEFAULT ABS text_size
16 # CHECK-NEXT: 2: 0000000000000009 0 NOTYPE GLOBAL DEFAULT ABS data_size
27 ## Check quoted section names are accepted and quotes are removed in the
28 ## output binary section name.
30 ## Also check that functions taking a section name as parameter work correctly
31 ## when quoted section names are provided as inputs.
32 ".text" : AT(ADDR(".text")) {
33 LONG (ALIGNOF(".text"))
34 LONG (LOADADDR(".text"))
37 text_size = SIZEOF(".text");
39 ## Check that functions that take a section name can correctly match a quoted
40 ## section name input parameter against a non-quoted section definition.
41 .data : AT(ADDR(".data")) {
42 LONG (ALIGNOF(".data"))
43 LONG (LOADADDR(".data"))
46 data_size = SIZEOF(".data");