Re: [go-nuts] how to pass the following compiler/linker flags using -gccgoflags build flag

2020-12-22 Thread Yonatan Gizachew
Yonatan Gizachew wrote: > # command-line-arguments > /usr/bin/ld: unrecognized option '--split-stack-adjust-size=0x8000' > /usr/bin/ld: use the --help option for usage information > collect2: error: ld returned 1 exit status > > On Wednesday, December 23, 2020 at 3:38:44 PM UTC+9 Ian

Re: [go-nuts] how to pass the following compiler/linker flags using -gccgoflags build flag

2020-12-22 Thread Yonatan Gizachew
020 at 10:30 PM Yonatan Gizachew > wrote: > > > > I want to pass the '-Wl,--split-stack-adjust-size=0x8000' to the gold > linker as follows: > > > > go build -o libgotest.so -buildmode=c-shared -compiler=gccgo > -gccgoflags='-Wl,--split-stack-adjust-size=

[go-nuts] how to pass the following compiler/linker flags using -gccgoflags build flag

2020-12-22 Thread Yonatan Gizachew
Hello, I want to pass the '-Wl,--split-stack-adjust-size=0x8000' to the gold linker as follows: go build -o libgotest.so -buildmode=c-shared -compiler=gccgo -gccgoflags='-Wl,--split-stack-adjust-size=0x8000' test_mmap.go But there s "unrecognized option" error. Could you please tell me the

[go-nuts] Debug symbol when using gccgo

2020-10-13 Thread Yonatan Gizachew
I am building a C-shared library from go code like below: > go build -o awesome.so -buildmode=c-shared myprog.go How can I build the C_shared library in debug mode? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] gccgo compiler and gold linker

2020-10-13 Thread Yonatan Gizachew
Does installing gccgo as: > sudo apt-get install gccgo enable the gold linker by default? If not, how can I enable it? I am using Ubuntu 18.04 machine -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] Running golang C-shared library in an OS that uses cooperative scheduling.

2020-09-10 Thread Yonatan Gizachew
Also, is there a way to print the values of runtime.g? On Thursday, September 10, 2020 at 12:15:04 PM UTC+9 Ian Lance Taylor wrote: > On Wed, Sep 9, 2020 at 7:39 PM Yonatan Gizachew wrote: > > > > This might be trivial, but could you explain me the relationship between > th

Re: [go-nuts] Running golang C-shared library in an OS that uses cooperative scheduling.

2020-09-10 Thread Yonatan Gizachew
itself? On Thursday, September 10, 2020 at 12:15:04 PM UTC+9 Ian Lance Taylor wrote: > On Wed, Sep 9, 2020 at 7:39 PM Yonatan Gizachew wrote: > > > > This might be trivial, but could you explain me the relationship between > the following? > > 1. value returned by __tls_ge

Re: [go-nuts] Running golang C-shared library in an OS that uses cooperative scheduling.

2020-09-09 Thread Yonatan Gizachew
:26 PM Yonatan Gizachew wrote: > > > > Is there any known problems that could appear when we run golang > C-shared libraries in an OS that uses a non-preemptive scheduling > mechanism. I am experiencing some problems related to TLS (more > specifically runtime.m0 and runt

Re: [go-nuts] Running golang C-shared library in an OS that uses cooperative scheduling.

2020-09-09 Thread Yonatan Gizachew
. On Thursday, September 10, 2020 at 11:31:21 AM UTC+9 Ian Lance Taylor wrote: > On Wed, Sep 9, 2020 at 7:26 PM Yonatan Gizachew wrote: > > > > Is there any known problems that could appear when we run golang > C-shared libraries in an OS that uses a non-preemptive scheduling

[go-nuts] Running golang C-shared library in an OS that uses cooperative scheduling.

2020-09-09 Thread Yonatan Gizachew
Is there any known problems that could appear when we run golang C-shared libraries in an OS that uses a non-preemptive scheduling mechanism. I am experiencing some problems related to TLS (more specifically runtime.m0 and runtime.g0). FYI - the C-shared library was built suing the gccgo

Re: [go-nuts] Asynchronous preemption

2020-09-07 Thread Yonatan Gizachew
Got it. Thank you! On Saturday, September 5, 2020 at 12:01:03 PM UTC+9 Ian Lance Taylor wrote: > On Wed, Sep 2, 2020 at 9:11 PM Yonatan Gizachew wrote: > > > > I see. If that is so, what is the job of sysmon thread? > > The sysmon thread is not related to asynchronous pre

Re: [go-nuts] Asynchronous preemption

2020-09-02 Thread Yonatan Gizachew
I see. If that is so, what is the job of sysmon thread? On Thursday, September 3, 2020 at 12:35:26 PM UTC+9 Ian Lance Taylor wrote: > On Wed, Sep 2, 2020 at 7:14 PM Yonatan Gizachew wrote: > > > > Is it possible to stop the asynchronous preemption like: > > GODEBUG=asyncpre

Re: [go-nuts] Asynchronous preemption

2020-09-02 Thread Yonatan Gizachew
Ok, thanks for the clarification. On Thu, Sep 3, 2020, 11:27 AM Kurtis Rader wrote: > On Wed, Sep 2, 2020 at 7:14 PM Yonatan Gizachew wrote: > >> Is it possible to stop the asynchronous preemption like: >> GODEBUG=asyncpreemptoff=1 go build -o libgotest.so -buildmode=c-s

[go-nuts] Asynchronous preemption

2020-09-02 Thread Yonatan Gizachew
Is it possible to stop the asynchronous preemption like: GODEBUG=asyncpreemptoff=1 go build -o libgotest.so -buildmode=c-shared -compiler=gccgo test.go I am using gccgo compiler. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

Re: [go-nuts] Possible reasons for a segmentation fault inside mallocgc during package importing

2020-08-24 Thread Yonatan Gizachew
25, 2020 at 12:05:53 PM UTC+9 Ian Lance Taylor wrote: > On Mon, Aug 24, 2020 at 7:05 PM Yonatan Gizachew wrote: > > > > We were trying to run a go c-shared library on a emulator (Written in > C/C++). We use gccgo compiler to create .so file from test.go file, so that > the

[go-nuts] Possible reasons for a segmentation fault inside mallocgc during package importing

2020-08-24 Thread Yonatan Gizachew
We were trying to run a go c-shared library on a emulator (Written in C/C++). We use gccgo compiler to create .so file from test.go file, so that the runtime could be liked dynamically. Currently we are facing a problem while

Re: [go-nuts] Why was islibrary not set correctly when using -buildmode=c-shared with gccgo compiler

2020-08-18 Thread Yonatan Gizachew
Oh, thanks for clarification. For your question, not for now. On Wednesday, August 19, 2020 at 8:52:48 AM UTC+9 Ian Lance Taylor wrote: > On Mon, Aug 17, 2020 at 10:42 PM Yonatan Gizachew > wrote: > > > > Sorry I couldn't provide code to reproduce the case, but I just

Re: [go-nuts] Why was islibrary not set correctly when using -buildmode=c-shared with gccgo compiler

2020-08-18 Thread Yonatan Gizachew
But may I know what gccgo's runtime package? On Wednesday, August 19, 2020 at 8:52:48 AM UTC+9 Ian Lance Taylor wrote: > On Mon, Aug 17, 2020 at 10:42 PM Yonatan Gizachew > wrote: > > > > Sorry I couldn't provide code to reproduce the case, but I just wanted > to know if

[go-nuts] Why was islibrary not set correctly when using -buildmode=c-shared with gccgo compiler

2020-08-17 Thread Yonatan Gizachew
Sorry I couldn't provide code to reproduce the case, but I just wanted to know if there are known cases for my issue. >From the golang source code, in the runtime library proc.go file there is this code snippet

Re: [go-nuts] Is it possible to interpose exported functions.

2020-08-07 Thread Yonatan Gizachew
Yeah, but my question is if it is possible to interpose the exported function On Friday, August 7, 2020 at 4:25:06 PM UTC+9 Lutz Horn wrote: > Am 07.08.20 um 09:05 schrieb Yonatan Gizachew: > > //export Test > > func Test() { > > fmt.Println("test code") > &

Re: [go-nuts] Is it possible to interpose exported functions.

2020-08-07 Thread Yonatan Gizachew
Okay, thanks for that. What about now? package main import ( "C" "fmt" ) //export Test func Test() { fmt.Println("test code") } func main() { } On Friday, August 7, 2020 at 3:47:38 PM UTC+9 Lutz Horn wrote: > Am 07.08.20 um 05:00 schrieb eme...@gmail.com: > > //export test > > func test()