summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2018-04-10 20:16:35 +0000
committerSteven Wu <stevenwu@apple.com>2018-04-10 20:16:35 +0000
commitd0804aa6dc476f75017a74d5fd77e737efe9a9ea (patch)
tree63f04a66107c24bc5694b7164efcccac0e6dcb30 /llvm/test
parentc0f879bcecd4058732aad6c1e113adf78990f5a3 (diff)
downloadbcm5719-llvm-d0804aa6dc476f75017a74d5fd77e737efe9a9ea.tar.gz
bcm5719-llvm-d0804aa6dc476f75017a74d5fd77e737efe9a9ea.zip
[MachO] Emit Weak ReadOnlyWithRel to ConstDataSection
Summary: Darwin dynamic linker can handle weak symbols in ConstDataSection. ReadonReadOnlyWithRel symbols should be emitted in ConstDataSection instead of normal DataSection. rdar://problem/39298457 Reviewers: dexonsmith, kledzik Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45472 llvm-svn: 329752
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/global-sections.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/global-sections.ll b/llvm/test/CodeGen/X86/global-sections.ll
index ea6df468ceb..5f8cd90c8b5 100644
--- a/llvm/test/CodeGen/X86/global-sections.ll
+++ b/llvm/test/CodeGen/X86/global-sections.ll
@@ -329,3 +329,8 @@ bb7:
; WIN32-SECTIONS: .section .bss,"bw",one_only,_G17
; WIN32-SECTIONS: _G17:
; WIN32-SECTIONS:.byte 0
+
+; check weak ReadOnlyWithRel globals.
+@G18 = linkonce_odr unnamed_addr constant i64* @G15
+; DARWIN64: .section __DATA,__const
+; DARWIN64: _G18:
OpenPOWER on IntegriCloud