diff options
| author | Eric Christopher <echristo@gmail.com> | 2018-06-25 23:53:54 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2018-06-25 23:53:54 +0000 |
| commit | b7a52bb28a75615369369d2d88554b0df084d05a (patch) | |
| tree | 8a819743bb1e0f0d16b6303a986eb5cebdd7f7f2 /llvm/test | |
| parent | 802c31cc283e7cb85a9eddc19a82af9f0602077d (diff) | |
| download | bcm5719-llvm-b7a52bb28a75615369369d2d88554b0df084d05a.tar.gz bcm5719-llvm-b7a52bb28a75615369369d2d88554b0df084d05a.zip | |
Add a warning if someone attempts to add extra section flags to sections
with well defined semantics like .rodata.
llvm-svn: 335558
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/MC/ELF/extra-section-flags.s | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/MC/ELF/extra-section-flags.s b/llvm/test/MC/ELF/extra-section-flags.s new file mode 100644 index 00000000000..c96516ee482 --- /dev/null +++ b/llvm/test/MC/ELF/extra-section-flags.s @@ -0,0 +1,10 @@ +# RUN: llvm-mc -triple x86_64-unknown-unknown -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s + +.section .rodata, "ax" +# CHECK: warning: setting incorrect section attributes for .rodata +nop + +.section .rodata, "a" +# CHECK-NOT: warning: +nop + |

