[PATCH] D12625: [llgo] Force exporting __morestack from llgoi

Andrew Wilkins via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 20:08:41 PDT 2015


axw created this revision.
axw added a reviewer: pcc.
axw added a subscriber: llvm-commits.
Herald added a subscriber: axw.

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.

http://reviews.llvm.org/D12625

Files:
  cmd/llgoi/llgoi.go

Index: cmd/llgoi/llgoi.go
===================================================================
--- cmd/llgoi/llgoi.go
+++ cmd/llgoi/llgoi.go
@@ -38,6 +38,12 @@
 	"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 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12625.34009.patch
Type: text/x-patch
Size: 493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150904/2d5f11dc/attachment.bin>


More information about the llvm-commits mailing list