By “Machine Code” I mean that “go build” or “go install” generates an 
executable file that is ready for the target operating system and CPU to run 
directly. On Windows, it generates a .EXE file. On Unix-like operating systems 
it generates a “binary executable” file (which is basically the same thing, but 
it doesn’t have a suffix to identify the file type like Windows uses). 

(Internally, this process is divided into two steps, called “compile” and 
“link.” The compile step generates the machine code needed by the target CPU; 
the link step arranges this machine code into the file format that the target 
operating system expects.)

Andy

> On Dec 13, 2017, at 9:31 AM, Compiler <erfangnuli...@gmail.com> wrote:
> 
> Machine Code?!
> 
> please show me github link source file then at they is generate sample 
> binary... at GOLANG sources.
> 
> On Wednesday, December 13, 2017 at 8:48:30 PM UTC+3:30, Andy Balholm wrote:
> No, the Go compiler doesn’t actually generate ASM. It generates machine code. 
> So it doesn’t need the help of another compiler or assembler.
> 
> Andy
> 
>> On Dec 13, 2017, at 9:00 AM, Compiler <erfang...@gmail.com <>> wrote:
>> 
>> i am undrestand compiler steps.
>> only have problem in code generation step.
>> so best way is this then compiler generate code is ASM.
>> GOLANG also generate ASM.
>> 
>> yeah?
>> 
>> On Wednesday, December 13, 2017 at 8:27:41 PM UTC+3:30, Bruno Albuquerque 
>> wrote:
>> It directly generates a binary suitable for the target platform, yes. Again, 
>> you do not need a C compiler to compile a Go program unless you are using 
>> CGO.
>> 
>> -- 
>> 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...@googlegroups.com <>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> 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 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to