re PR go/46986 (Go is not supported on Darwin)
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 24 Jan 2013 19:44:23 +0000 (19:44 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 24 Jan 2013 19:44:23 +0000 (19:44 +0000)
PR go/46986
all: prepend #__USER_LABEL_PREFIX__ to mangled Go symbols
For old-fashioned Darwin.

From-SVN: r195438

35 files changed:
libgo/go/bytes/indexbyte.c
libgo/go/log/syslog/syslog_c.c
libgo/go/sync/atomic/atomic.c
libgo/go/sync/cas.c
libgo/go/syscall/errno.c
libgo/go/syscall/signame.c
libgo/go/syscall/wait.c
libgo/runtime/chan.c
libgo/runtime/cpuprof.c
libgo/runtime/env_posix.c
libgo/runtime/go-breakpoint.c
libgo/runtime/go-caller.c
libgo/runtime/go-callers.c
libgo/runtime/go-cgo.c
libgo/runtime/go-fieldtrack.c
libgo/runtime/go-getgoroot.c
libgo/runtime/go-now.c
libgo/runtime/go-reflect-map.c
libgo/runtime/go-setenv.c
libgo/runtime/go-signal.c
libgo/runtime/go-typestring.c
libgo/runtime/go-unsafe-new.c
libgo/runtime/go-unsafe-newarray.c
libgo/runtime/go-unsafe-pointer.c
libgo/runtime/goc2c.c
libgo/runtime/lfstack.c
libgo/runtime/malloc.goc
libgo/runtime/malloc.h
libgo/runtime/mgc0.c
libgo/runtime/mprof.goc
libgo/runtime/panic.c
libgo/runtime/parfor.c
libgo/runtime/proc.c
libgo/runtime/runtime.c
libgo/runtime/runtime.h

index 1f4399c446ad905a54a3cb3cd738055647cfa5a0..cbc7847efe87a3c8835d02ac2aa6b5300678dc4b 100644 (file)
@@ -14,7 +14,7 @@
    library function, which shouldn't need much stack space.  */
 
 intgo IndexByte (struct __go_open_array, char)
-  asm ("bytes.IndexByte")
+  __asm__ (GOSYM_PREFIX "bytes.IndexByte")
   __attribute__ ((no_split_stack));
 
 intgo
@@ -31,7 +31,7 @@ IndexByte (struct __go_open_array s, char b)
 /* Comparison.  */
 
 _Bool Equal (struct __go_open_array a, struct __go_open_array b)
-  asm ("bytes.Equal")
+  __asm__ (GOSYM_PREFIX "bytes.Equal")
   __attribute__ ((no_split_stack));
 
 _Bool
index d79cba3757b5e48cd908137f94c198b4353aee0f..5b33d78288b95ee4d34c8beef1541d8987906b2f 100644 (file)
@@ -12,7 +12,7 @@
    can't represent a C varargs function in Go.  */
 
 void syslog_c(intgo, const char*)
-  asm ("log_syslog.syslog_c");
+  __asm__ (GOSYM_PREFIX "log_syslog.syslog_c");
 
 void
 syslog_c (intgo priority, const char *msg)
index 14bc7895621e3a7b429b1205899faee3cd4e8d6c..32430df2ba29d6fd79cbbe691d609a368349f233 100644 (file)
@@ -6,8 +6,10 @@
 
 #include <stdint.h>
 
+#include "runtime.h"
+
 _Bool CompareAndSwapInt32 (int32_t *, int32_t, int32_t)
-  asm ("sync_atomic.CompareAndSwapInt32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapInt32");
 
 _Bool
 CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
@@ -16,7 +18,7 @@ CompareAndSwapInt32 (int32_t *val, int32_t old, int32_t new)
 }
 
 _Bool CompareAndSwapInt64 (int64_t *, int64_t, int64_t)
-  asm ("sync_atomic.CompareAndSwapInt64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapInt64");
 
 _Bool
 CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
@@ -25,7 +27,7 @@ CompareAndSwapInt64 (int64_t *val, int64_t old, int64_t new)
 }
 
 _Bool CompareAndSwapUint32 (uint32_t *, uint32_t, uint32_t)
-  asm ("sync_atomic.CompareAndSwapUint32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapUint32");
 
 _Bool
 CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
@@ -34,7 +36,7 @@ CompareAndSwapUint32 (uint32_t *val, uint32_t old, uint32_t new)
 }
 
 _Bool CompareAndSwapUint64 (uint64_t *, uint64_t, uint64_t)
-  asm ("sync_atomic.CompareAndSwapUint64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapUint64");
 
 _Bool
 CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
@@ -43,7 +45,7 @@ CompareAndSwapUint64 (uint64_t *val, uint64_t old, uint64_t new)
 }
 
 _Bool CompareAndSwapUintptr (uintptr_t *, uintptr_t, uintptr_t)
-  asm ("sync_atomic.CompareAndSwapUintptr");
+  __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapUintptr");
 
 _Bool
 CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
@@ -52,7 +54,7 @@ CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
 }
 
 _Bool CompareAndSwapPointer (void **, void *, void *)
-  asm ("sync_atomic.CompareAndSwapPointer");
+  __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapPointer");
 
 _Bool
 CompareAndSwapPointer (void **val, void *old, void *new)
@@ -61,7 +63,7 @@ CompareAndSwapPointer (void **val, void *old, void *new)
 }
 
 int32_t AddInt32 (int32_t *, int32_t)
-  asm ("sync_atomic.AddInt32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.AddInt32");
 
 int32_t
 AddInt32 (int32_t *val, int32_t delta)
@@ -70,7 +72,7 @@ AddInt32 (int32_t *val, int32_t delta)
 }
 
 uint32_t AddUint32 (uint32_t *, uint32_t)
-  asm ("sync_atomic.AddUint32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.AddUint32");
 
 uint32_t
 AddUint32 (uint32_t *val, uint32_t delta)
@@ -79,7 +81,7 @@ AddUint32 (uint32_t *val, uint32_t delta)
 }
 
 int64_t AddInt64 (int64_t *, int64_t)
-  asm ("sync_atomic.AddInt64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.AddInt64");
 
 int64_t
 AddInt64 (int64_t *val, int64_t delta)
@@ -88,7 +90,7 @@ AddInt64 (int64_t *val, int64_t delta)
 }
 
 uint64_t AddUint64 (uint64_t *, uint64_t)
-  asm ("sync_atomic.AddUint64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.AddUint64");
 
 uint64_t
 AddUint64 (uint64_t *val, uint64_t delta)
@@ -97,7 +99,7 @@ AddUint64 (uint64_t *val, uint64_t delta)
 }
 
 uintptr_t AddUintptr (uintptr_t *, uintptr_t)
-  asm ("sync_atomic.AddUintptr");
+  __asm__ (GOSYM_PREFIX "sync_atomic.AddUintptr");
 
 uintptr_t
 AddUintptr (uintptr_t *val, uintptr_t delta)
@@ -106,7 +108,7 @@ AddUintptr (uintptr_t *val, uintptr_t delta)
 }
 
 int32_t LoadInt32 (int32_t *addr)
-  asm ("sync_atomic.LoadInt32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.LoadInt32");
 
 int32_t
 LoadInt32 (int32_t *addr)
@@ -120,7 +122,7 @@ LoadInt32 (int32_t *addr)
 }
 
 int64_t LoadInt64 (int64_t *addr)
-  asm ("sync_atomic.LoadInt64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.LoadInt64");
 
 int64_t
 LoadInt64 (int64_t *addr)
@@ -134,7 +136,7 @@ LoadInt64 (int64_t *addr)
 }
 
 uint32_t LoadUint32 (uint32_t *addr)
-  asm ("sync_atomic.LoadUint32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.LoadUint32");
 
 uint32_t
 LoadUint32 (uint32_t *addr)
@@ -148,7 +150,7 @@ LoadUint32 (uint32_t *addr)
 }
 
 uint64_t LoadUint64 (uint64_t *addr)
-  asm ("sync_atomic.LoadUint64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.LoadUint64");
 
 uint64_t
 LoadUint64 (uint64_t *addr)
@@ -162,7 +164,7 @@ LoadUint64 (uint64_t *addr)
 }
 
 uintptr_t LoadUintptr (uintptr_t *addr)
-  asm ("sync_atomic.LoadUintptr");
+  __asm__ (GOSYM_PREFIX "sync_atomic.LoadUintptr");
 
 uintptr_t
 LoadUintptr (uintptr_t *addr)
@@ -176,7 +178,7 @@ LoadUintptr (uintptr_t *addr)
 }
 
 void *LoadPointer (void **addr)
-  asm ("sync_atomic.LoadPointer");
+  __asm__ (GOSYM_PREFIX "sync_atomic.LoadPointer");
 
 void *
 LoadPointer (void **addr)
@@ -190,7 +192,7 @@ LoadPointer (void **addr)
 }
 
 void StoreInt32 (int32_t *addr, int32_t val)
-  asm ("sync_atomic.StoreInt32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.StoreInt32");
 
 void
 StoreInt32 (int32_t *addr, int32_t val)
@@ -203,7 +205,7 @@ StoreInt32 (int32_t *addr, int32_t val)
 }
 
 void StoreInt64 (int64_t *addr, int64_t val)
-  asm ("sync_atomic.StoreInt64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.StoreInt64");
 
 void
 StoreInt64 (int64_t *addr, int64_t val)
@@ -216,7 +218,7 @@ StoreInt64 (int64_t *addr, int64_t val)
 }
 
 void StoreUint32 (uint32_t *addr, uint32_t val)
-  asm ("sync_atomic.StoreUint32");
+  __asm__ (GOSYM_PREFIX "sync_atomic.StoreUint32");
 
 void
 StoreUint32 (uint32_t *addr, uint32_t val)
@@ -229,7 +231,7 @@ StoreUint32 (uint32_t *addr, uint32_t val)
 }
 
 void StoreUint64 (uint64_t *addr, uint64_t val)
-  asm ("sync_atomic.StoreUint64");
+  __asm__ (GOSYM_PREFIX "sync_atomic.StoreUint64");
 
 void
 StoreUint64 (uint64_t *addr, uint64_t val)
@@ -242,7 +244,7 @@ StoreUint64 (uint64_t *addr, uint64_t val)
 }
 
 void StoreUintptr (uintptr_t *addr, uintptr_t val)
-  asm ("sync_atomic.StoreUintptr");
+  __asm__ (GOSYM_PREFIX "sync_atomic.StoreUintptr");
 
 void
 StoreUintptr (uintptr_t *addr, uintptr_t val)
@@ -255,7 +257,7 @@ StoreUintptr (uintptr_t *addr, uintptr_t val)
 }
 
 void StorePointer (void **addr, void *val)
-  asm ("sync_atomic.StorePointer");
+  __asm__ (GOSYM_PREFIX "sync_atomic.StorePointer");
 
 void
 StorePointer (void **addr, void *val)
index ffcd133cb3a86480107ba9fe9d92312b14072125..7571c64ddc4c4730a6a863495f62dc83174a3bef 100644 (file)
@@ -6,7 +6,9 @@
 
 #include <stdint.h>
 
-_Bool cas (int32_t *, int32_t, int32_t) asm ("libgo_sync.sync.cas");
+#include "runtime.h"
+
+_Bool cas (int32_t *, int32_t, int32_t) __asm__ (GOSYM_PREFIX "libgo_sync.sync.cas");
 
 _Bool
 cas (int32_t *ptr, int32_t old, int32_t new)
index d01f4c973d7a4660e5fe1c1953c12e68ffc64dc2..5cdc7730445e9ab933dc4b32c4e45cbdfe2f0ede 100644 (file)
@@ -3,15 +3,16 @@
    Copyright 2010 The Go Authors. All rights reserved.
    Use of this source code is governed by a BSD-style
    license that can be found in the LICENSE file.  */
-
 #include <errno.h>
 #include <stdint.h>
 
+#include "runtime.h"
+
 /* errno is typically a macro. These functions set 
    and get errno specific to the libc being used.  */
 
-uintptr_t GetErrno() asm ("syscall.GetErrno");
-void SetErrno(uintptr_t) asm ("syscall.SetErrno");
+uintptr_t GetErrno() __asm__ (GOSYM_PREFIX "syscall.GetErrno");
+void SetErrno(uintptr_t) __asm__ (GOSYM_PREFIX "syscall.SetErrno");
 
 uintptr_t
 GetErrno()
index c2d3b9fac707e9f47ae295d7895ec181cc406b08..6f5c2972bab93fa926766c41772095b20d119106 100644 (file)
@@ -10,7 +10,7 @@
 #include "arch.h"
 #include "malloc.h"
 
-String Signame (intgo sig) asm ("syscall.Signame");
+String Signame (intgo sig) __asm__ (GOSYM_PREFIX "syscall.Signame");
 
 String
 Signame (intgo sig)
index 98ad245c2c4cfdb7a83c4acbf8867af24246a684..8c3b53fa4567750d9d8a8b672ed49e0995b5390b 100644 (file)
 #include <stdint.h>
 #include <sys/wait.h>
 
+#include "runtime.h"
+
 extern _Bool Exited (uint32_t *w)
-  __asm__ ("syscall.Exited.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.Exited.N18_syscall.WaitStatus");
 
 _Bool
 Exited (uint32_t *w)
@@ -20,7 +22,7 @@ Exited (uint32_t *w)
 }
 
 extern _Bool Signaled (uint32_t *w)
-  __asm__ ("syscall.Signaled.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.Signaled.N18_syscall.WaitStatus");
 
 _Bool
 Signaled (uint32_t *w)
@@ -29,7 +31,7 @@ Signaled (uint32_t *w)
 }
 
 extern _Bool Stopped (uint32_t *w)
-  __asm__ ("syscall.Stopped.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.Stopped.N18_syscall.WaitStatus");
 
 _Bool
 Stopped (uint32_t *w)
@@ -38,7 +40,7 @@ Stopped (uint32_t *w)
 }
 
 extern _Bool Continued (uint32_t *w)
-  __asm__ ("syscall.Continued.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.Continued.N18_syscall.WaitStatus");
 
 _Bool
 Continued (uint32_t *w)
@@ -47,7 +49,7 @@ Continued (uint32_t *w)
 }
 
 extern _Bool CoreDump (uint32_t *w)
-  __asm__ ("syscall.CoreDump.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.CoreDump.N18_syscall.WaitStatus");
 
 _Bool
 CoreDump (uint32_t *w)
@@ -56,7 +58,7 @@ CoreDump (uint32_t *w)
 }
 
 extern int ExitStatus (uint32_t *w)
-  __asm__ ("syscall.ExitStatus.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.ExitStatus.N18_syscall.WaitStatus");
 
 int
 ExitStatus (uint32_t *w)
@@ -67,7 +69,7 @@ ExitStatus (uint32_t *w)
 }
 
 extern int Signal (uint32_t *w)
-  __asm__ ("syscall.Signal.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.Signal.N18_syscall.WaitStatus");
 
 int
 Signal (uint32_t *w)
@@ -78,7 +80,7 @@ Signal (uint32_t *w)
 }
 
 extern int StopSignal (uint32_t *w)
-  __asm__ ("syscall.StopSignal.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.StopSignal.N18_syscall.WaitStatus");
 
 int
 StopSignal (uint32_t *w)
@@ -89,7 +91,7 @@ StopSignal (uint32_t *w)
 }
 
 extern int TrapCause (uint32_t *w)
-  __asm__ ("syscall.TrapCause.N18_syscall.WaitStatus");
+  __asm__ (GOSYM_PREFIX "syscall.TrapCause.N18_syscall.WaitStatus");
 
 int
 TrapCause (uint32_t *w __attribute__ ((unused)))
index ceee42c5d6f5a27e0a5260e61d4051bba0e8d618..a79ee9e18b3da26c7cff57e793af120cf51aeae1 100644 (file)
@@ -118,7 +118,7 @@ runtime_makechan_c(ChanType *t, int64 hint)
 // For reflect
 //     func makechan(typ *ChanType, size uint64) (chan)
 uintptr reflect_makechan(ChanType *, uint64)
-  asm ("reflect.makechan");
+  __asm__ (GOSYM_PREFIX "reflect.makechan");
 
 uintptr
 reflect_makechan(ChanType *t, uint64 size)
@@ -508,7 +508,7 @@ __go_receive_big(ChanType *t, Hchan* c, byte* p)
 }
 
 _Bool runtime_chanrecv2(ChanType *t, Hchan* c, byte* p)
-  __asm__("runtime.chanrecv2");
+  __asm__ (GOSYM_PREFIX "runtime.chanrecv2");
 
 _Bool
 runtime_chanrecv2(ChanType *t, Hchan* c, byte* p)
@@ -613,7 +613,7 @@ runtime_selectnbrecv2(ChanType *t, byte *v, _Bool *received, Hchan *c)
 // the actual data if it fits, or else a pointer to the data.
 
 _Bool reflect_chansend(ChanType *, Hchan *, uintptr, _Bool)
-  __asm__("reflect.chansend");
+  __asm__ (GOSYM_PREFIX "reflect.chansend");
 
 _Bool
 reflect_chansend(ChanType *t, Hchan *c, uintptr val, _Bool nb)
@@ -650,7 +650,7 @@ struct chanrecv_ret
 };
 
 struct chanrecv_ret reflect_chanrecv(ChanType *, Hchan *, _Bool)
-  __asm__("reflect.chanrecv");
+  __asm__ (GOSYM_PREFIX "reflect.chanrecv");
 
 struct chanrecv_ret
 reflect_chanrecv(ChanType *t, Hchan *c, _Bool nb)
@@ -686,7 +686,7 @@ static void newselect(int32, Select**);
 
 // newselect(size uint32) (sel *byte);
 
-void* runtime_newselect(int32) __asm__("runtime.newselect");
+void* runtime_newselect(int32) __asm__ (GOSYM_PREFIX "runtime.newselect");
 
 void*
 runtime_newselect(int32 size)
@@ -732,7 +732,7 @@ static void selectsend(Select *sel, Hchan *c, int index, void *elem);
 // selectsend(sel *byte, hchan *chan any, elem *any) (selected bool);
 
 void runtime_selectsend(Select *, Hchan *, void *, int32)
-  __asm__("runtime.selectsend");
+  __asm__ (GOSYM_PREFIX "runtime.selectsend");
 
 void
 runtime_selectsend(Select *sel, Hchan *c, void *elem, int32 index)
@@ -772,7 +772,7 @@ static void selectrecv(Select *sel, Hchan *c, int index, void *elem, bool*);
 // selectrecv(sel *byte, hchan *chan any, elem *any) (selected bool);
 
 void runtime_selectrecv(Select *, Hchan *, void *, int32)
-  __asm__("runtime.selectrecv");
+  __asm__ (GOSYM_PREFIX "runtime.selectrecv");
 
 void
 runtime_selectrecv(Select *sel, Hchan *c, void *elem, int32 index)
@@ -787,7 +787,7 @@ runtime_selectrecv(Select *sel, Hchan *c, void *elem, int32 index)
 // selectrecv2(sel *byte, hchan *chan any, elem *any, received *bool) (selected bool);
 
 void runtime_selectrecv2(Select *, Hchan *, void *, bool *, int32)
-  __asm__("runtime.selectrecv2");
+  __asm__ (GOSYM_PREFIX "runtime.selectrecv2");
 
 void
 runtime_selectrecv2(Select *sel, Hchan *c, void *elem, bool *received, int32 index)
@@ -827,7 +827,7 @@ static void selectdefault(Select*, int);
 
 // selectdefault(sel *byte) (selected bool);
 
-void runtime_selectdefault(Select *, int32) __asm__("runtime.selectdefault");
+void runtime_selectdefault(Select *, int32) __asm__ (GOSYM_PREFIX "runtime.selectdefault");
 
 void
 runtime_selectdefault(Select *sel, int32 index)
@@ -898,7 +898,7 @@ static int selectgo(Select**);
 
 // selectgo(sel *byte);
 
-int runtime_selectgo(Select *) __asm__("runtime.selectgo");
+int runtime_selectgo(Select *) __asm__ (GOSYM_PREFIX "runtime.selectgo");
 
 int
 runtime_selectgo(Select *sel)
@@ -1181,7 +1181,7 @@ struct rselect_ret {
 // func rselect(cases []runtimeSelect) (chosen int, word uintptr, recvOK bool)
 
 struct rselect_ret reflect_rselect(Slice)
-     asm("reflect.rselect");
+     __asm__ (GOSYM_PREFIX "reflect.rselect");
 
 struct rselect_ret
 reflect_rselect(Slice cases)
@@ -1309,7 +1309,7 @@ __go_builtin_close(Hchan *c)
 // For reflect
 //     func chanclose(c chan)
 
-void reflect_chanclose(uintptr) __asm__("reflect.chanclose");
+void reflect_chanclose(uintptr) __asm__ (GOSYM_PREFIX "reflect.chanclose");
 
 void
 reflect_chanclose(uintptr c)
@@ -1320,7 +1320,7 @@ reflect_chanclose(uintptr c)
 // For reflect
 //     func chanlen(c chan) (len int)
 
-intgo reflect_chanlen(uintptr) __asm__("reflect.chanlen");
+intgo reflect_chanlen(uintptr) __asm__ (GOSYM_PREFIX "reflect.chanlen");
 
 intgo
 reflect_chanlen(uintptr ca)
@@ -1345,7 +1345,7 @@ __go_chan_len(Hchan *c)
 // For reflect
 //     func chancap(c chan) (cap intgo)
 
-intgo reflect_chancap(uintptr) __asm__("reflect.chancap");
+intgo reflect_chancap(uintptr) __asm__ (GOSYM_PREFIX "reflect.chancap");
 
 intgo
 reflect_chancap(uintptr ca)
index 3b7f572d5a50fd002524132a2a2933a81eae9ec8..3ef08ef51461195010da739423f79dfd6998ba2c 100644 (file)
@@ -125,7 +125,7 @@ static void LostProfileData(void) {
 }
 
 extern void runtime_SetCPUProfileRate(intgo)
-     __asm__("runtime.SetCPUProfileRate");
+     __asm__ (GOSYM_PREFIX "runtime.SetCPUProfileRate");
 
 // SetCPUProfileRate sets the CPU profiling rate.
 // The user documentation is in debug.go.
@@ -436,7 +436,7 @@ breakflush:
 }
 
 extern Slice runtime_CPUProfile(void)
-     __asm__("runtime.CPUProfile");
+     __asm__ (GOSYM_PREFIX "runtime.CPUProfile");
 
 // CPUProfile returns the next cpu profile block as a []byte.
 // The user documentation is in debug.go.
index 31f417935304ae46c26e0dbea6c93468306d7992..7f3fa0d8e0f2265b73914d001c95ca0ee0a2bdb7 100644 (file)
@@ -7,7 +7,7 @@
 #include "runtime.h"
 #include "array.h"
 
-extern Slice syscall_Envs asm ("syscall.Envs");
+extern Slice syscall_Envs __asm__ (GOSYM_PREFIX "syscall.Envs");
 
 const byte*
 runtime_getenv(const char *s)
index 5eebe188bbe7152500c1e70c3d49f4a30058ba2d..e403a2a967a2702206595589f889c4fee34ca852 100644 (file)
@@ -6,7 +6,9 @@
 
 #include <sched.h>
 
-void Breakpoint (void) asm ("runtime.Breakpoint");
+#include "runtime.h"
+
+void Breakpoint (void) __asm__ (GOSYM_PREFIX "runtime.Breakpoint");
 
 void
 Breakpoint (void)
index d73a408334f51feb91450247c3accfed33e9646d..63b45f368c29bc69710332786d8cc21933ea889e 100644 (file)
@@ -156,9 +156,9 @@ struct caller_ret
   _Bool ok;
 };
 
-struct caller_ret Caller (int n) asm ("runtime.Caller");
+struct caller_ret Caller (int n) __asm__ (GOSYM_PREFIX "runtime.Caller");
 
-Func *FuncForPC (uintptr_t) asm ("runtime.FuncForPC");
+Func *FuncForPC (uintptr_t) __asm__ (GOSYM_PREFIX "runtime.FuncForPC");
 
 /* Implement runtime.Caller.  */
 
@@ -216,7 +216,7 @@ struct funcline_go_return
 
 struct funcline_go_return
 runtime_funcline_go (Func *f, uintptr targetpc)
-  __asm__ ("runtime.funcline_go");
+  __asm__ (GOSYM_PREFIX "runtime.funcline_go");
 
 struct funcline_go_return
 runtime_funcline_go (Func *f __attribute__((unused)), uintptr targetpc)
index 1dd3e71c8efda563c7b434f5705cb69a4e0d9909..a19e79f053b6a47ad8f7ec8bd49e9f9dfd090720 100644 (file)
@@ -60,7 +60,7 @@ runtime_callers (int32 skip, uintptr *pcbuf, int32 m)
 }
 
 int Callers (int, struct __go_open_array)
-  __asm__ ("runtime.Callers");
+  __asm__ (GOSYM_PREFIX "runtime.Callers");
 
 int
 Callers (int skip, struct __go_open_array pc)
index 47ee014181a99b98b3e7ba0dfaac214d68062d36..46eb1827a93e7a5a53c461c5ef8cb03974cd1774 100644 (file)
    */
 
 /* We let Go code call these via the syscall package.  */
-void syscall_cgocall(void) __asm__ ("syscall.Cgocall");
-void syscall_cgocalldone(void) __asm__ ("syscall.CgocallDone");
-void syscall_cgocallback(void) __asm__ ("syscall.CgocallBack");
-void syscall_cgocallbackdone(void) __asm__ ("syscall.CgocallBackDone");
+void syscall_cgocall(void) __asm__ (GOSYM_PREFIX "syscall.Cgocall");
+void syscall_cgocalldone(void) __asm__ (GOSYM_PREFIX "syscall.CgocallDone");
+void syscall_cgocallback(void) __asm__ (GOSYM_PREFIX "syscall.CgocallBack");
+void syscall_cgocallbackdone(void) __asm__ (GOSYM_PREFIX "syscall.CgocallBackDone");
 
 void
 syscall_cgocall ()
@@ -119,7 +119,7 @@ _cgo_allocate (size_t n)
 }
 
 extern const struct __go_type_descriptor string_type_descriptor
-  asm ("__go_tdn_string");
+  __asm__ (GOSYM_PREFIX "__go_tdn_string");
 
 void
 _cgo_panic (const char *p)
@@ -152,7 +152,7 @@ _cgo_panic (const char *p)
 
 /* Return the number of CGO calls.  */
 
-int64 runtime_NumCgoCall (void) __asm__ ("runtime.NumCgoCall");
+int64 runtime_NumCgoCall (void) __asm__ (GOSYM_PREFIX "runtime.NumCgoCall");
 
 int64
 runtime_NumCgoCall (void)
index 62b36dc7bc00c5c7d753d365b108b8920a32f293..a7e2c133440e17685ad4144802c93f4a8e35628d 100644 (file)
@@ -34,7 +34,7 @@ extern const char _edata[] __attribute__ ((weak));
 extern const char __edata[] __attribute__ ((weak));
 extern const char __bss_start[] __attribute__ ((weak));
 
-void runtime_Fieldtrack (struct __go_map *) __asm__ ("runtime.Fieldtrack");
+void runtime_Fieldtrack (struct __go_map *) __asm__ (GOSYM_PREFIX "runtime.Fieldtrack");
 
 void
 runtime_Fieldtrack (struct __go_map *m)
index 3cb447e4ce886b3ad1d4d487543b2f686f2e1bde..1b52d44043837bf0218d95676c3a8dd0702b4ac5 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "runtime.h"
 
-String getgoroot (void) asm ("runtime.getgoroot");
+String getgoroot (void) __asm__ (GOSYM_PREFIX "runtime.getgoroot");
 
 String
 getgoroot ()
index ede4493b8f3afbb9cfd436c8bb828890d30b408f..73cc1602df78ba333a405e152c3d68a1fc4324be 100644 (file)
@@ -6,6 +6,8 @@
 #include <stdint.h>
 #include <sys/time.h>
 
+#include "runtime.h"
+
 // Return current time.  This is the implementation of time.now().
 
 struct time_now_ret
@@ -15,7 +17,7 @@ struct time_now_ret
 };
 
 struct time_now_ret now()
-  __asm__ ("time.now")
+  __asm__ (GOSYM_PREFIX "time.now")
   __attribute__ ((no_split_stack));
 
 struct time_now_ret
index 7ef632cfe133a647bca4729e5db10d406d8294db..369753749162e0985987f26d303e7fe5443372c8 100644 (file)
@@ -24,7 +24,7 @@ struct mapaccess_ret
 
 extern struct mapaccess_ret mapaccess (struct __go_map_type *, uintptr_t,
                                       uintptr_t)
-  asm ("reflect.mapaccess");
+  __asm__ (GOSYM_PREFIX "reflect.mapaccess");
 
 struct mapaccess_ret
 mapaccess (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i)
@@ -77,7 +77,7 @@ mapaccess (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i)
 
 extern void mapassign (struct __go_map_type *, uintptr_t, uintptr_t,
                       uintptr_t, _Bool)
-  asm ("reflect.mapassign");
+  __asm__ (GOSYM_PREFIX "reflect.mapassign");
 
 void
 mapassign (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i,
@@ -118,7 +118,7 @@ mapassign (struct __go_map_type *mt, uintptr_t m, uintptr_t key_i,
 }
 
 extern int32_t maplen (uintptr_t)
-  asm ("reflect.maplen");
+  __asm__ (GOSYM_PREFIX "reflect.maplen");
 
 int32_t
 maplen (uintptr_t m)
@@ -131,7 +131,7 @@ maplen (uintptr_t m)
 }
 
 extern unsigned char *mapiterinit (struct __go_map_type *, uintptr_t)
-  asm ("reflect.mapiterinit");
+  __asm__ (GOSYM_PREFIX "reflect.mapiterinit");
 
 unsigned char *
 mapiterinit (struct __go_map_type *mt, uintptr_t m)
@@ -145,7 +145,7 @@ mapiterinit (struct __go_map_type *mt, uintptr_t m)
 }
 
 extern void mapiternext (unsigned char *)
-  asm ("reflect.mapiternext");
+  __asm__ (GOSYM_PREFIX "reflect.mapiternext");
 
 void
 mapiternext (unsigned char *it)
@@ -160,7 +160,7 @@ struct mapiterkey_ret
 };
 
 extern struct mapiterkey_ret mapiterkey (unsigned char *)
-  asm ("reflect.mapiterkey");
+  __asm__ (GOSYM_PREFIX "reflect.mapiterkey");
 
 struct mapiterkey_ret
 mapiterkey (unsigned char *ita)
@@ -203,7 +203,7 @@ mapiterkey (unsigned char *ita)
 /* Make a new map.  We have to build our own map descriptor.  */
 
 extern uintptr_t makemap (const struct __go_map_type *)
-  asm ("reflect.makemap");
+  __asm__ (GOSYM_PREFIX "reflect.makemap");
 
 uintptr_t
 makemap (const struct __go_map_type *t)
index 41f14d4b7343c9acf2b5fbffe74e5342d3e70489..53ef2d396d46ac434dcd34c7ad634a1ea67ded14 100644 (file)
@@ -14,7 +14,7 @@
 
 /* Set the C environment from Go.  This is called by syscall.Setenv.  */
 
-void setenv_c (String, String) __asm__ ("syscall.setenv_c");
+void setenv_c (String, String) __asm__ (GOSYM_PREFIX "syscall.setenv_c");
 
 void
 setenv_c (String k, String v)
index 6ac33d7fc1e11d63cce174865c420ef98f491a7c..1965e058816cd6611bae06f84cbacd17ae358002 100644 (file)
@@ -457,7 +457,7 @@ runtime_setsig (int32 i, bool def __attribute__ ((unused)), bool restart)
 
 /* Used by the os package to raise SIGPIPE.  */
 
-void os_sigpipe (void) __asm__ ("os.sigpipe");
+void os_sigpipe (void) __asm__ (GOSYM_PREFIX "os.sigpipe");
 
 void
 os_sigpipe (void)
index 712c333e7cb94aac58ae9a917b70501b0979c0cf..0a90e84bc1ee72b8bb93cc13eb8ec452a7d920ec 100644 (file)
@@ -8,7 +8,7 @@
 #include "interface.h"
 #include "go-type.h"
 
-String typestring(struct __go_empty_interface) asm ("runtime.typestring");
+String typestring(struct __go_empty_interface) __asm__ (GOSYM_PREFIX "runtime.typestring");
 
 String
 typestring (struct __go_empty_interface e)
index 8ed52343bfb4293185d3b5a5b8e3f48f3f53c18b..54788f19688bb2f0c09d68371aa5352c657a9c83 100644 (file)
@@ -13,7 +13,7 @@
 /* Implement unsafe_New, called from the reflect package.  */
 
 void *unsafe_New (const struct __go_type_descriptor *)
-  asm ("reflect.unsafe_New");
+  __asm__ (GOSYM_PREFIX "reflect.unsafe_New");
 
 /* The dynamic type of the argument will be a pointer to a type
    descriptor.  */
index 47dcd847e64b82217d640f83298322a0cb12d551..e4fb3366bd72de7ba814ce27f5bebe9353a8fbda 100644 (file)
@@ -13,7 +13,7 @@
 /* Implement unsafe_NewArray, called from the reflect package.  */
 
 void *unsafe_NewArray (const struct __go_type_descriptor *, intgo)
-  asm ("reflect.unsafe_NewArray");
+  __asm__ (GOSYM_PREFIX "reflect.unsafe_NewArray");
 
 /* The dynamic type of the argument will be a pointer to a type
    descriptor.  */
index e3a55b4dfb241e377a2373e8f650e25a82c5f973..ca1d2536412d0c65ddc268c6d652e95ebc4c0d5c 100644 (file)
@@ -15,7 +15,7 @@
    descriptor.  */
 
 extern const struct __go_type_descriptor unsafe_Pointer
-  asm ("__go_tdn_unsafe.Pointer");
+  __asm__ (GOSYM_PREFIX "__go_tdn_unsafe.Pointer");
 
 /* Used to determine the field alignment.  */
 struct field_align
@@ -61,7 +61,7 @@ const struct __go_type_descriptor unsafe_Pointer =
    it to be defined elsewhere.  */
 
 extern const struct __go_ptr_type pointer_unsafe_Pointer
-  asm ("__go_td_pN14_unsafe.Pointer");
+  __asm__ (GOSYM_PREFIX "__go_td_pN14_unsafe.Pointer");
 
 /* The reflection string.  */
 #define PREFLECTION "*unsafe.Pointer"
index 22295360a4b9663cf9a76c56be90fd9a56f7af62..f3e8f3809286ecd24b93e92a83989e132e3b727e 100644 (file)
@@ -488,7 +488,7 @@ write_gcc_func_header(char *package, char *name, struct params *params,
        printf(" %s_%s(", package, name);
        first = 1;
        write_params(params, &first);
-       printf(") asm (\"");
+       printf(") __asm__ (GOSYM_PREFIX \"");
        if (pkgpath != NULL)
          printf("%s", pkgpath);
        else if (prefix != NULL)
index c805be8932bea58b48270337a36148a107944585..0f8ea6ea6bc331bfba6b3c0e59f7f08df113b830 100644 (file)
@@ -57,7 +57,7 @@ runtime_lfstackpop(uint64 *head)
 }
 
 LFNode* runtime_lfstackpop2(uint64*)
-  asm("runtime.lfstackpop2");
+  __asm__ (GOSYM_PREFIX "runtime.lfstackpop2");
 
 LFNode*
 runtime_lfstackpop2(uint64 *head)
index 2a614e5a186d03ce6b4ea9ab8f06ff5f8f8b39f6..48460b17959786c6c7e797b78ab5f3a9f5879b3c 100644 (file)
@@ -23,7 +23,7 @@ MHeap runtime_mheap;
 extern MStats mstats;  // defined in zruntime_def_$GOOS_$GOARCH.go
 
 extern volatile intgo runtime_MemProfileRate
-  __asm__ ("runtime.MemProfileRate");
+  __asm__ (GOSYM_PREFIX "runtime.MemProfileRate");
 
 // Allocate an object of at least size bytes.
 // Small objects are allocated from the per-thread cache's free lists.
@@ -308,7 +308,7 @@ runtime_purgecachedstats(MCache *c)
 }
 
 extern uintptr runtime_sizeof_C_MStats
-  __asm__ ("runtime.Sizeof_C_MStats");
+  __asm__ (GOSYM_PREFIX "runtime.Sizeof_C_MStats");
 
 #define MaxArena32 (2U<<30)
 
index 710484edecf33042fca131108d07ff1b9ee71d47..172d81d5c3132880c7d9b792ba270fc7bc0cdd93 100644 (file)
@@ -247,7 +247,7 @@ struct MStats
 };
 
 extern MStats mstats
-  __asm__ ("runtime.VmemStats");
+  __asm__ (GOSYM_PREFIX "runtime.VmemStats");
 
 
 // Size classes.  Computed and initialized by InitSizes.
index 698400b0c50eb79849e715e5082324f572c75747..99063653013dd730f8216a7d4f725f9a3eac6eda 100644 (file)
@@ -1449,7 +1449,7 @@ gc(struct gc_args *args)
 }
 
 void runtime_ReadMemStats(MStats *)
-  __asm__("runtime.ReadMemStats");
+  __asm__ (GOSYM_PREFIX "runtime.ReadMemStats");
 
 void
 runtime_ReadMemStats(MStats *stats)
index 8b3a195b8906af7da50128fc98a746fcc3a9c551..2cf2afba4336f4f4f8357713c588793198ad216c 100644 (file)
@@ -285,7 +285,7 @@ runtime_MProf_Free(void *p, uintptr size)
 
 int64 runtime_blockprofilerate;  // in CPU ticks
 
-void runtime_SetBlockProfileRate(intgo) asm("runtime.SetBlockProfileRate");
+void runtime_SetBlockProfileRate(intgo) __asm__ (GOSYM_PREFIX "runtime.SetBlockProfileRate");
 
 void
 runtime_SetBlockProfileRate(intgo rate)
index 1af9639245648d18c85005c356ca20dcc1a383c6..85a56087c0832dbd299b6e25c1208d5f1a89ff20 100644 (file)
@@ -106,7 +106,7 @@ runtime_panicstring(const char *s)
        runtime_panic(err);
 }
 
-void runtime_Goexit (void) asm ("runtime.Goexit");
+void runtime_Goexit (void) __asm__ (GOSYM_PREFIX "runtime.Goexit");
 
 void
 runtime_Goexit(void)
index 98ebdebc559e98a6b8ea594ef40ef6c0694fc2f3..591b968c0396c67dcab417e95ee62ca7e5019456 100644 (file)
@@ -37,7 +37,7 @@ runtime_parforalloc(uint32 nthrmax)
 // func parforalloc2(nthrmax uint32) *ParFor
 
 ParFor *runtime_parforalloc2(uint32)
-   asm("runtime.parforalloc2");
+   __asm__ (GOSYM_PREFIX "runtime.parforalloc2");
 
 ParFor *
 runtime_parforalloc2(uint32 nthrmax)
@@ -78,7 +78,7 @@ runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, v
 // func parforsetup2(desc *ParFor, nthr, n uint32, ctx *byte, wait bool, body func(*ParFor, uint32))
 
 void runtime_parforsetup2(ParFor *, uint32, uint32, void *, bool, void *)
-  asm("runtime.parforsetup2");
+  __asm__ (GOSYM_PREFIX "runtime.parforsetup2");
 
 void
 runtime_parforsetup2(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, void *body)
@@ -219,7 +219,7 @@ struct parforiters_ret {
 };
 
 struct parforiters_ret runtime_parforiters(ParFor *, uintptr)
-  asm("runtime.parforiters");
+  __asm__ (GOSYM_PREFIX "runtime.parforiters");
 
 struct parforiters_ret
 runtime_parforiters(ParFor *desc, uintptr tid)
index 9b229d6bf462bfcef427a4d5e8bdf9a0981f8693..754c68e0bcd5f0875b86f653afbc155070b07770 100644 (file)
@@ -503,8 +503,8 @@ runtime_schedinit(void)
                runtime_raceinit();
 }
 
-extern void main_init(void) __asm__ ("__go_init_main");
-extern void main_main(void) __asm__ ("main.main");
+extern void main_init(void) __asm__ (GOSYM_PREFIX "__go_init_main");
+extern void main_main(void) __asm__ (GOSYM_PREFIX "main.main");
 
 // The main goroutine.
 void
@@ -1500,7 +1500,7 @@ runtime_malg(int32 stacksize, byte** ret_stack, size_t* ret_stacksize)
 /* For runtime package testing.  */
 
 void runtime_testing_entersyscall(void)
-  __asm__("runtime.entersyscall");
+  __asm__ (GOSYM_PREFIX "runtime.entersyscall");
 
 void
 runtime_testing_entersyscall()
@@ -1509,7 +1509,7 @@ runtime_testing_entersyscall()
 }
 
 void runtime_testing_exitsyscall(void)
-  __asm__("runtime.exitsyscall");
+  __asm__ (GOSYM_PREFIX "runtime.exitsyscall");
 
 void
 runtime_testing_exitsyscall()
@@ -1609,7 +1609,7 @@ gfget(void)
        return gp;
 }
 
-void runtime_Gosched (void) asm ("runtime.Gosched");
+void runtime_Gosched (void) __asm__ (GOSYM_PREFIX "runtime.Gosched");
 
 void
 runtime_Gosched(void)
@@ -1688,7 +1688,7 @@ runtime_lockedOSThread(void)
 // for testing of callbacks
 
 _Bool runtime_golockedOSThread(void)
-  asm("runtime.golockedOSThread");
+  __asm__ (GOSYM_PREFIX "runtime.golockedOSThread");
 
 _Bool
 runtime_golockedOSThread(void)
@@ -1704,7 +1704,7 @@ runtime_mid()
 }
 
 intgo runtime_NumGoroutine (void)
-  __asm__ ("runtime.NumGoroutine");
+  __asm__ (GOSYM_PREFIX "runtime.NumGoroutine");
 
 intgo
 runtime_NumGoroutine()
index ecd804de6863961eac83375aaf2ba687347a094e..b090169bbb7805c27cb99a0d7c3c49752df5a1a1 100644 (file)
@@ -24,8 +24,8 @@ runtime_gotraceback(void)
 static int32   argc;
 static byte**  argv;
 
-extern Slice os_Args asm ("os.Args");
-extern Slice syscall_Envs asm ("syscall.Envs");
+extern Slice os_Args __asm__ (GOSYM_PREFIX "os.Args");
+extern Slice syscall_Envs __asm__ (GOSYM_PREFIX "syscall.Envs");
 
 void (*runtime_sysargs)(int32, uint8**);
 
@@ -172,7 +172,7 @@ runtime_tickspersecond(void)
 }
 
 int64 runtime_pprof_runtime_cyclesPerSecond(void)
-     asm("runtime_pprof.runtime_cyclesPerSecond");
+     __asm__ (GOSYM_PREFIX "runtime_pprof.runtime_cyclesPerSecond");
 
 int64
 runtime_pprof_runtime_cyclesPerSecond(void)
index c5cd3a08f4583c4dcf27947860507f61c1a176df..4a0ebf2bd040105c910610655b9d362ffa7574d1 100644 (file)
 #include "interface.h"
 #include "go-alloc.h"
 
+#define _STRINGIFY2_(x) #x
+#define _STRINGIFY_(x) _STRINGIFY2_(x)
+#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
+
 /* This file supports C files copied from the 6g runtime library.
    This is a version of the 6g runtime.h rewritten for gccgo's version
    of the code.  */
@@ -387,8 +391,8 @@ void        runtime_park(void(*)(Lock*), Lock*, const char*);
 void   runtime_tsleep(int64, const char*);
 M*     runtime_newm(void);
 void   runtime_goexit(void);
-void   runtime_entersyscall(void) __asm__("syscall.Entersyscall");
-void   runtime_exitsyscall(void) __asm__("syscall.Exitsyscall");
+void   runtime_entersyscall(void) __asm__ (GOSYM_PREFIX "syscall.Entersyscall");
+void   runtime_exitsyscall(void) __asm__ (GOSYM_PREFIX "syscall.Exitsyscall");
 void   siginit(void);
 bool   __go_sigsend(int32 sig);
 int32  runtime_callers(int32, uintptr*, int32);
@@ -453,7 +457,7 @@ void        runtime_futexwakeup(uint32*, uint32);
  * so they can be garbage collected if there are no other pointers to nodes.
  */
 void   runtime_lfstackpush(uint64 *head, LFNode *node)
-  asm("runtime.lfstackpush");
+  __asm__ (GOSYM_PREFIX "runtime.lfstackpush");
 LFNode*        runtime_lfstackpop(uint64 *head);
 
 /*
@@ -466,7 +470,7 @@ LFNode*     runtime_lfstackpop(uint64 *head);
  */
 ParFor*        runtime_parforalloc(uint32 nthrmax);
 void   runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, void (*body)(ParFor*, uint32));
-void   runtime_parfordo(ParFor *desc) asm("runtime.parfordo");
+void   runtime_parfordo(ParFor *desc) __asm__ (GOSYM_PREFIX "runtime.parfordo");
 
 /*
  * low level C-called
@@ -514,7 +518,7 @@ void        runtime_printcomplex(__complex double);
 struct __go_func_type;
 void reflect_call(const struct __go_func_type *, const void *, _Bool, _Bool,
                  void **, void **)
-  asm ("reflect.call");
+  __asm__ (GOSYM_PREFIX "reflect.call");
 
 /* Functions.  */
 #define runtime_panic __go_panic
@@ -562,11 +566,11 @@ void      runtime_usleep(uint32);
  * runtime c-called (but written in Go)
  */
 void   runtime_printany(Eface)
-     __asm__("runtime.Printany");
+     __asm__ (GOSYM_PREFIX "runtime.Printany");
 void   runtime_newTypeAssertionError(const String*, const String*, const String*, const String*, Eface*)
-     __asm__("runtime.NewTypeAssertionError");
+     __asm__ (GOSYM_PREFIX "runtime.NewTypeAssertionError");
 void   runtime_newErrorString(String, Eface*)
-     __asm__("runtime.NewErrorString");
+     __asm__ (GOSYM_PREFIX "runtime.NewErrorString");
 
 /*
  * wrapped for go users
@@ -577,8 +581,8 @@ void        runtime_semrelease(uint32 volatile *);
 int32  runtime_gomaxprocsfunc(int32 n);
 void   runtime_procyield(uint32);
 void   runtime_osyield(void);
-void   runtime_LockOSThread(void) __asm__("runtime.LockOSThread");
-void   runtime_UnlockOSThread(void) __asm__("runtime.UnlockOSThread");
+void   runtime_LockOSThread(void) __asm__ (GOSYM_PREFIX "runtime.LockOSThread");
+void   runtime_UnlockOSThread(void) __asm__ (GOSYM_PREFIX "runtime.UnlockOSThread");
 
 bool   runtime_showframe(String);