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.
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?