Skip to content
Opensource internals
  • Posts

Linker

Go's Linker Deletes Code You Never Call: Method Pruning and Reachability

Oct 21, 2026 13 min read Jay Hubbert

The Go linker flood-fills symbols from main.main, prunes type method tables unless an interface or reflection can reach them, and drops DWARF and the symbol table with -ldflags=-w …

GoInternalsLinkerCompilerPerformance

Read more →

unsafe.Pointer and //go:linkname: The Escape Hatches That Break Abstraction

Oct 21, 2026 20 min read Jay Hubbert

unsafe.Pointer reinterprets memory and //go:linkname reaches into other packages’ unexported symbols; the linker enforces an allowlist of linkname pulls and prunes unreachable …

GoInternalsUnsafeLinkerLinkname

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·