News for hackers. Stuff that matters.
Re:C and Go without CGO by voltagex_ on Wednesday July 30, 2014 @01:17AM (#8106520)
I'd love to know how this works behind the scenes.

In the article, a file called chello.c and a file called gohello.go are created - do the filenames have any significance? How does the go compiler and linker know what to do here?

Re:C and Go without CGO by shanemhansen on Wednesday July 30, 2014 @01:23AM (#8106543)
Run strace -f -eexecve go build to see whats going on under the covers. The filenames are because 6c and 6g both produced an object file named hello.6.

6g,6c, and 6a produce object files on amd64. 6l is the linker which combines them. Honestly I had a little trouble running the commands individually so I just used go build.

Re:C and Go without CGO by 4ad on Wednesday July 30, 2014 @05:56AM (#8107205)
Run

    go build -x
There's no need for strace.