> ?c and ?g use the same calling convention, and segmented stacks are
> implemented by the linker. You don't need cgo in order to call C code
> from Go. Why do you want cgo?
> 
> Look at the various C files in the Go standard library, especially
> inside runtime. Those are compiled with the Plan 9 compiler and Go
> calls it just fine.

Thanks for the reply (you and Pavel Zholkover, so far).  As I
mentioned, it's not that I "want cgo", it's that I need to get my mind
around the issue and it is just too complicated.  It would be a
beneficial side effect if I can get OpenLDAP (client utilities)
working at the same time, but the moment I have a mental image of what
is actually going on, getting down to tacks will be easy enough.

So what I'm asking is for help in understanding how what is already
hard to understand in the GCC context where it is "documented" can in
fact be mirrored in the Plan 9 context, where it ought to be "native".
There are just way too many mirrors in this hall!  And my mind isn't
trained to separate them out.

Sorry to cast my problems at 9fans, I've tried to make sense of it
all, but I haven't been able to separate out the details, my brain
just insists in trying to tie everything together at once.  With a bit
of luck, contributions from here will reveal something I've been
missing.

In passing, dhog's GCC port to Plan 9 clarified a little the issue of
different call conventions, but I think that's adding to my confusion,
now.

++L


Reply via email to