Get the latest tech news

Understanding the Go Compiler: The Linker


In the previous post , we watched the compiler transform optimized SSA into machine code bytes and package them into object files. Each .o file contains the compiled code for one package—complete with machine instructions, symbol definitions, and relocations marking addresses that need fixing. But your program isn’t just one package. Even a simple “hello world” imports fmt, which imports io, os, reflect, and dozens of other packages. Each package is compiled separately into its own object file. None of these files can run on their own.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of compiler

compiler

Photo of linker

linker

Related news:

News photo

Compiler-Driven Static Analysis Locking Context Checking Merged For Linux 7.0

News photo

Show HN: Elysia JIT "Compiler", why it's one of the fastest JavaScript framework

News photo

Ga68, a GNU Algol 68 Compiler