diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2014-06-22 00:33:44 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2014-06-22 00:33:44 +0000 |
commit | 09f104fc323ff9b8cfcecd1f0ec7b470b38c69a1 (patch) | |
tree | 23a761858fb05d09bcb11ee86ff3a7ef6be1d29d /test/MC | |
parent | 427afb91d38252b1abf0afaa08099f1f8cda3b66 (diff) | |
download | llvm-09f104fc323ff9b8cfcecd1f0ec7b470b38c69a1.tar.gz llvm-09f104fc323ff9b8cfcecd1f0ec7b470b38c69a1.tar.bz2 llvm-09f104fc323ff9b8cfcecd1f0ec7b470b38c69a1.tar.xz |
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
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/ELF/ARM/bss-non-zero-value.s | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/MC/ELF/ARM/bss-non-zero-value.s b/test/MC/ELF/ARM/bss-non-zero-value.s new file mode 100644 index 0000000000..999b8b019c --- /dev/null +++ b/test/MC/ELF/ARM/bss-non-zero-value.s @@ -0,0 +1,9 @@ +// 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 |