Lines Matching full:section

1 ; Test that global values with the same specified section produces multiple
9 ; Normal function goes in .text, or in it's own named section with -function-sections.
14 ; FNSECTIONS: .section .text.fn_text,"ax",@progbits{{$}}
19 ; It should be emitted to a new section with a new name, not expected to require unique.
24 ; FNSECTIONS: .section .text.fn_text2,"ax",@progbits{{$}}
29 define i32 @fn_s1() section "s1" {
33 ; CHECK: .section s1,"ax",@progbits{{$}}
37 define i32 @fn_s2() section "s2" {
41 ; CHECK: .section s2,"ax",@progbits{{$}}
45 ; A second function in s2 should share the same .section
46 define i32 @fn2_s2() section "s2" {
50 ; CHECK-NOT: .section
54 ; Values that share a section name with a function are placed in different sections without executable flag
55 @rw_s1 = global i32 10, section "s1", align 4
56 @ro_s2 = constant i32 10, section "s2", align 4
57 ; CHECK: .section s1,"aw",@progbits,unique,[[#UNIQUE_S1_aw:]]
60 ; CHECK: .section s2,"a",@progbits,unique,[[#UNIQUE_S2_a:]]
64 ; Placing another value in the same section with the same flags uses the same unique ID
65 @rw2_s1 = global i32 10, section "s1", align 4
66 @ro2_s2 = constant i32 10, section "s2", align 4
67 ; CHECK: .section s1,"aw",@progbits,unique,[[#UNIQUE_S1_aw]]
70 ; CHECK: .section s2,"a",@progbits,unique,[[#UNIQUE_S2_a]]
74 ; Normal user defined section, first is the generic section, second should be unique
75 @ro_s3 = constant i32 10, section "s3", align 4
76 @rw_s3 = global i32 10, section "s3", align 4
77 ; CHECK: .section s3,"a",@progbits{{$}}
80 ; CHECK: .section s3,"aw",@progbits,unique,[[#U:]]
90 ; CHECK: .section .rodata,"a",@progbits{{$}}
94 ; Explicitly placed in .rodata with writeable set. The writable section should be uniqued, not the default ro section, even if it comes first.
95 @rw_rodata = global [2 x i32] zeroinitializer, section ".rodata", align 4
96 @ro_rodata = constant [2 x i32] zeroinitializer, section ".rodata", align 4
97 ; CHECK: .section .rodata,"aw",@progbits,unique,[[#U+1]]{{$}}
100 ; CHECK: .section .rodata,"a",@progbits{{$}}
105 @w_sdata = global [4 x i32] zeroinitializer, section ".sdata", align 4
106 @w_sbss = global [4 x i32] zeroinitializer, section ".sbss", align 4
107 ; CHECK: .section .sdata,"aw",@progbits{{$}}
110 ; CHECK: .section .sbss,"aw",@nobits{{$}}
115 @rw_text = global i32 10, section ".text", align 4
116 @ro_text = constant i32 10, section ".text", align 4
117 ; CHECK: .section .text,"aw",@progbits,unique,[[#U+2]]
120 ; CHECK: .section .text,"a",@progbits,unique,[[#U+3]]
124 ; A read-only .data section is emitted
125 @ro_data = constant i32 10, section ".data", align 4
126 ; CHECK: .section .data,"a",@progbits,unique,[[#U+4]]
130 ; TLS and non-TLS symbols cannot live in the same section
131 @tls_var = thread_local global i32 10, section "s4", align 4
132 @non_tls_var = global i32 10, section "s4", align 4
133 ; CHECK: .section s4,"awT",@progbits{{$}}
136 ; CHECK: .section s4,"aw",@progbits,unique,[[#U+5]]