xref: /llvm-project/llvm/test/MC/ELF/section-type-changed.s (revision bf60953faf3a0b80876e7345462d959586250daf)
1# RUN: not llvm-mc -triple=x86_64 %s -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error:
2
3.section .foo,"a",@progbits
4
5# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section type for .foo, expected: 0x1
6.section .foo,"a",@init_array
7
8# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section type for .foo, expected: 0x1
9.pushsection .foo,"a",@nobits
10
11.pushsection .foo,"a",@progbits
12
13## GNU as emits SHT_PROGBITS .eh_frame for .cfi_* directives. Don't error.
14.section .eh_frame,"a",@progbits
15.section .eh_frame,"a",@unwind
16.pushsection .eh_frame,"a",@progbits
17
18# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section type for .eh_frame, expected: 0x70000001
19.section .eh_frame,"a",@nobits
20