On Tue, Aug 18, 2020 at 6:20 PM Yonatan Gizachew <emeg...@gmail.com> wrote:
>
> But may I know what gccgo's runtime package?

https://go.googlesource.com/gofrontend/+/refs/heads/master/libgo/go/runtime/
https://go.googlesource.com/gofrontend/+/refs/heads/master/libgo/runtime/

Ian


> 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 <eme...@gmail.com> wrote:
>> >
>> > 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
>> > https://github.com/golang/go/blob/a745171e6b30394b661a040d04e8807b4bd0c7da/src/runtime/proc.go#L199
>> > In my case, I build my go program with -buildmode=c-shared mode and I 
>> > loaded it dynamically to my program written in C. So as to load the 
>> > runtime go libraries dynamically, I preferred to use the gccgo compiler 
>> > instead of gc compiler. Here is how I built my go code.
>> >
>> > $ go build -o libgotest.so -buildmode=c-shared -compiler=gccgo test.go
>> >
>> > I was hoping the linker would set the islibrary flag to True and as a 
>> > result the main function in proc.go would return at line 202. But it 
>> > wasn't the case.
>> >
>> > I was wondering why islibrary was set false.
>>
>> Note that gccgo uses a different runtime package. Your link is to the
>> gc runtime package, not the gccgo runtime package.
>>
>> gccgo sets isarchive for both c-archive and c-shared. As this is an
>> internal runtime variable, it shouldn't make any difference. Does it
>> ever make a difference to your code that gccgo sets isarchive rather
>> than islibrary?
>>
>> Ian
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/39b98200-4b70-4c1e-8604-b98e2cad43f4n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVDT06L3RDmwChTJkXmQC5OkR5KkO%3DwH%3DTcjdJrYY5sRA%40mail.gmail.com.

Reply via email to