summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2019-08-27 15:22:23 +0000
committerLang Hames <lhames@gmail.com>2019-08-27 15:22:23 +0000
commit70e158e09e9de810dc3254895eecb21bb336bc27 (patch)
treef615515aa0ab33a4f1d3c998a834e1de28abb925 /llvm/test/ExecutionEngine
parentb516f1afdd9ee69c570b40185393fef8a67b42c1 (diff)
downloadbcm5719-llvm-70e158e09e9de810dc3254895eecb21bb336bc27.tar.gz
bcm5719-llvm-70e158e09e9de810dc3254895eecb21bb336bc27.zip
[JITLink] Don't under-align zero-fill sections.
If content sections have lower alignment than zero-fill sections then bump the overall segment alignment to avoid under-aligning the zero-fill sections. llvm-svn: 370072
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r--llvm/test/ExecutionEngine/JITLink/X86/MachO_zero_fill_alignment.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/MachO_zero_fill_alignment.s b/llvm/test/ExecutionEngine/JITLink/X86/MachO_zero_fill_alignment.s
new file mode 100644
index 00000000000..3b3a3853fdc
--- /dev/null
+++ b/llvm/test/ExecutionEngine/JITLink/X86/MachO_zero_fill_alignment.s
@@ -0,0 +1,14 @@
+# RUN: rm -rf %t && mkdir -p %t
+# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t/macho_zero_fill_align.o %s
+# RUN: llvm-jitlink -noexec %t/macho_zero_fill_align.o -entry higher_zero_fill_align
+
+ .section __DATA,__data
+ .globl low_aligned_data
+ .p2align 0
+low_aligned_data:
+ .byte 42
+
+ .globl higher_zero_fill_align
+.zerofill __DATA,__zero_fill,higher_zero_fill_align,8,3
+
+.subsections_via_symbols
OpenPOWER on IntegriCloud