1 // REQUIRES: x86-registered-target
3 // RUN: %clang_cc1 -triple x86_64-pc-linux -S -o - < %s | FileCheck %s
4 // RUN: %clang_cc1 -triple x86_64-pc-linux -S -fseparate-named-sections -o - < %s | FileCheck %s --check-prefix=SEPARATE
6 __attribute__((section("custom_text"))) void f(void) {}
7 __attribute__((section("custom_text"))) void g(void) {}
9 // CHECK: .section custom_text,"ax",@progbits{{$}}
13 // SEPARATE: .section custom_text,"ax",@progbits,unique,1{{$}}
15 // SEPARATE: .section custom_text,"ax",@progbits,unique,2{{$}}
18 __attribute__((section("custom_data"))) int i
= 0;
19 __attribute__((section("custom_data"))) int j
= 0;
21 // CHECK: .section custom_data,"aw",@progbits{{$}}
25 // SEPARATE: .section custom_data,"aw",@progbits,unique,3{{$}}
27 // SEPARATE: .section custom_data,"aw",@progbits,unique,4{{$}}