summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-03-17 05:43:26 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-03-17 05:43:26 +0000
commit6f66f0a343256ce8a03890d9a80447592b748137 (patch)
tree45c235c17a001a07eaf73e42bab2e222b597c56c /llvm/test/Object
parent0f53cf1c7f35f063f47e242614d2bd2933e38c7c (diff)
downloadbcm5719-llvm-6f66f0a343256ce8a03890d9a80447592b748137.tar.gz
bcm5719-llvm-6f66f0a343256ce8a03890d9a80447592b748137.zip
[yaml2obj, COFF] Correctly handle section alignment
The section alignment field was marked optional but not provided a default value: initialize it with 0. While we are here, ensure that the section alignment is plausible. llvm-svn: 263692
Diffstat (limited to 'llvm/test/Object')
-rw-r--r--llvm/test/Object/yaml2obj-coff-invalid-alignment.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Object/yaml2obj-coff-invalid-alignment.test b/llvm/test/Object/yaml2obj-coff-invalid-alignment.test
new file mode 100644
index 00000000000..f76f063dc44
--- /dev/null
+++ b/llvm/test/Object/yaml2obj-coff-invalid-alignment.test
@@ -0,0 +1,14 @@
+# RUN: not yaml2obj %s 2>&1 | FileCheck %s
+
+# CHECK: Section alignment is too large
+
+---
+header:
+ Machine: IMAGE_FILE_MACHINE_AMD64
+ Characteristics: []
+sections:
+ - Name: '.text'
+ Characteristics: []
+ SectionData: 00
+ Alignment: 16384
+symbols:
OpenPOWER on IntegriCloud