summaryrefslogtreecommitdiff
path: root/llgo
diff options
context:
space:
mode:
authorAndrew Wilkins <axwalk@gmail.com>2015-11-27 04:46:46 +0000
committerAndrew Wilkins <axwalk@gmail.com>2015-11-27 04:46:46 +0000
commit20ad5f0fc6c7c1d101a0b0410e92566333a09dd3 (patch)
tree91feb9f371fb7ad820c5f7ae92402c8712180d00 /llgo
parent44e7082826d6171004a26d129bd643d2cc9b93e7 (diff)
[llgo] Force exporting __morestack from llgoi
Summary: Force exporting __morestack from llgoi, so that the symbol is available to the execution engine when linking with libLLVM.so. The engine does not reference __morestack explicitly, so must be provided by the host program. Reviewers: pcc Subscribers: axw, llvm-commits Differential Revision: http://reviews.llvm.org/D12625
Diffstat (limited to 'llgo')
-rw-r--r--llgo/cmd/llgoi/llgoi.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/llgo/cmd/llgoi/llgoi.go b/llgo/cmd/llgoi/llgoi.go
index e6e021be233..401e8f34df2 100644
--- a/llgo/cmd/llgoi/llgoi.go
+++ b/llgo/cmd/llgoi/llgoi.go
@@ -38,6 +38,12 @@ import (
"llvm.org/llvm/bindings/go/llvm"
)
+// /* Force exporting __morestack if it's available, so that it is
+// available to the engine when linking with libLLVM.so. */
+//
+// void *__morestack __attribute__((weak));
+import "C"
+
func getInstPrefix() (string, error) {
path, err := exec.LookPath(os.Args[0])
if err != nil {