Open GoogleCodeExporter opened 9 years ago
3. even with gcc 4.5.0 it still occurs
a way to "get through" this fase is to change the name of the func in 386.S,
adding a underscore to crosscall_386:
.globl EXT(_crosscall_386)
EXT(_crosscall_386):
instead of
.globl EXT(crosscall_386)
EXT(crosscall_386):
that way, when linking, gcc will find the symbol _crosscall_386
(the problem seems to be gcc is adding the leading underscore to the symbol
table in linux_386.c where crosscall_386 is called. watch:
$ nm linux_386.o
00000000 b .bss
00000000 d .data
00000000 t .text
U _crosscall_386
U _free
00000060 T _initcgo
00000070 T _libcgo_sys_thread_start
U _pthread_attr_getstacksize
U _pthread_attr_init
U _pthread_create
00000000 t _threadentry
(maybe it's supposed to do it)
and not doing the same to the func definition in 386.S (could it be the awkward
definition using, it seems, machine instructions?)
#define EXT(s) s
.globl EXT(_crosscall_386)
EXT(_crosscall_386):
pushl %ebp
movl %esp, %ebp
anyway, changing there works.
Original comment by luis.agu...@gmail.com
on 26 Dec 2010 at 9:59
Original issue reported on code.google.com by
jeru.sh...@gmail.com
on 28 Jan 2010 at 1:41