D73999 / commit 75af9da755
added for LLVM 11 a check that sh_flags and sh_entsize (and sh_type)
changes are an error, in line with GNU assembler.
However, GNU assembler accepts and GCC generates an abbreviated form:
while the first .section contains the flags and entsize, subsequent
sections simply contain the name without repeating entsize or flags.
Do likewise for better compatibility.
See https://bugs.llvm.org/show_bug.cgi?id=48201
Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D92052
16 lines
523 B
ArmAsm
16 lines
523 B
ArmAsm
# RUN: not llvm-mc -triple=x86_64 %s -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error:
|
|
|
|
foo:
|
|
.section .foo,"ax",@progbits
|
|
|
|
# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section flags for .foo, expected: 0x6
|
|
.section .foo,"awx",@progbits
|
|
|
|
# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section flags for .foo, expected: 0x6
|
|
.pushsection .foo,"a",@progbits
|
|
|
|
# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section flags for .foo, expected: 0x6
|
|
.section .foo,"",@progbits
|
|
|
|
.pushsection .foo,"ax",@progbits
|