llvm-6502/test/MC/ELF/ARM/bss-non-zero-value.s
Weiming Zhao 09f104fc32 Report error for non-zero data in .bss
User may initialize a var with non-zero value and specify .bss section.
E.g. : int a __attribute__((section(".bss"))) = 2;

This patch converts an assertion to error report for better user
experience.

Differential Revision: http://reviews.llvm.org/D4199


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211455 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-22 00:33:44 +00:00

10 lines
220 B
ArmAsm

// RUN: not llvm-mc -filetype=obj -triple arm-linux-gnu %s -o %t 2>%t.out
// RUN: FileCheck --input-file=%t.out %s
// CHECK: non-zero initializer found in section '.bss'
.bss
.globl a
.align 2
a:
.long 1
.size a, 4