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 …
unsafe.Pointer reinterprets memory and //go:linkname reaches into other packages’ unexported symbols; the linker enforces an allowlist of linkname pulls and prunes unreachable …