diff mbox

libgo patch committed: Update to weekly.2012-02-22 release

Message ID mcrd38rdlic.fsf@dhcp-172-18-216-180.mtv.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor March 5, 2012, 5:07 p.m. UTC
Uros Bizjak <ubizjak@gmail.com> writes:

> It looks that this patch introduced:
>
> /home/uros/gcc-build-go/x86_64-unknown-linux-gnu/32/libgo/.libs/libgo.so:
> undefined reference to `libgo_runtime.runtime.Callers'
> collect2: error: ld returned 1 exit status
>
> All libgo tests fail due to this undefined reference.

I guess I'm not seeing it because your system is defaulting to
-Wl,-z,now.

Fixed with this patch.  Sorry about that.

Bootstrapped on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian
diff mbox

Patch

diff -r 2f1b1ab1b4d9 libgo/runtime/go-callers.c
--- a/libgo/runtime/go-callers.c	Sun Mar 04 22:37:34 2012 -0800
+++ b/libgo/runtime/go-callers.c	Mon Mar 05 09:06:45 2012 -0800
@@ -55,3 +55,12 @@ 
   _Unwind_Backtrace (backtrace, &arg);
   return arg.index;
 }
+
+int Callers (int, struct __go_open_array)
+  __asm__ ("libgo_runtime.runtime.Callers");
+
+int
+Callers (int skip, struct __go_open_array pc)
+{
+  return runtime_callers (skip, (uintptr *) pc.__values, pc.__count);
+}