Go 1.15
The new linker: dev.link’s conversion to the loader is complete and the old object format is deleted. Static lock ranking. Lock-free mcentral. Typed aux and the rulegen rewrite. Small-integer interface conversions without allocation. darwin/386 and darwin/arm removed.
Each area lists the stage every thread reached in this release (with what was left open afterwards), then changes that are not part of a thread. Thread names link to the full thread on its topic page.
Memory management
From Memory management: GC and allocator (Go 1.0–1.17)
Lock-free spanSet-based mcentral, offset-address ranges, zombie-slot detection, scavenger watermarks, preemptible dedicated mark workers.
- Concurrent sweep and proportional sweep — Done:
markrootSpansdriven by a per-page “has specials” bitmap rather than the sweep buffers (eacdf76b93); small-object sweeping while allocating bounded to 100 spans (08bf64a81e); zombie-slot detection (ea2de3346f); every marked object also marks its span (886caba73c, fixing missed marks fromgcmarknewobject/wbBufFlush1). Left open: nothing noted. - Decentralized GC state machine and mark termination simplification — Done: dedicated mark workers can be preempted for STW (
79b43fa819), clearing the way to allow STW during mark;gcStartpreemption window closed (03ba6b070d). Left open: nothing noted. - Precise heap scanning: type information, the heap bitmap and GC programs — Done: only scan up to
ptrdata, not size (08dd4ad7e3),materializeGCProgrounding fix (ab5a40c5e3). Left open: nothing noted. - Size classes, tiny allocator and mcache/mcentral — Done: new mcentral (see span-set item);
OnesCount64for allocated counts (67c2dcbc59). Left open: nothing noted. - Span lifecycle in mheap: free lists, treaps, first-fit and the page reclaimer — Done:
spanSetand new mcentral (8af8fa9103,9582b6e8fd,a13691966a,d1798d5aa0,39380e8e01,eacdf76b93), leftover fields removed (9933f665551.16 in 1.16). Left open: nothing noted. - The bitmap page allocator — Done: correctness hardening:
allocToCacheupdates searchAddr validly (287d1ec96c),linearAllocandgrowoverflow (2e455ec2eb,14ae846f54), offset addresses (d69509ff99,ea5f9b666c,796786cd0c,dfd613e0e4),pageAlloc.findvalidation (b56791cdea), a barrier after span allocation (c53b2bdb35), DWARFarenaBaseOffsetfor viewcore (12c01f7698). Left open: nothing noted. - Scavenger: returning memory to the OS — Done: watermark-based search (
dba1205b2f,55ec5182d7), defensive pacing (c7915376ce). Left open: nothing noted. - Finalizers and span specials — Done: bitmap-based
markrootSpans(eacdf76b93). Left open: nothing noted. - Allocation-site profiling and GC debugging modes — Done: zombie slot report (
ea2de3346f). Left open: nothing noted.
Other changes
- Misc internal —
divRoundUp(d965bb6130), page allocator sanity checks (89e13c88e4), write barrier checks (a59465b545),typedmemmovepartial(b4bb47d88f), mcache0 in profilealloc (7ea40f6594), lock rank exceptions (300ff5d8ac).
Scheduler and concurrency
From Scheduler and concurrency runtime (Go 1.0–1.17)
Static lock ranking, Ticker.Reset, Map.LoadAndDelete, timer stealing and poller-local queueing; threads: lock ranking, timers, Map.
- The G-M-P scheduler: from global-lock M:N to per-P run queues, spinning Ms and work stealing — Done: goroutines found by the poller go on the local run queue
2fbca94db7;newproc1no longer starts the goroutineb3863fbbc2;wakepcondition moved inside4e00b4c366;runqputbatchholds sched.lock6b4dcf19fa; startm/checkdead visibility85afa2eb19. - Preemption: cooperative stack-check preemption (1.2) to signal-based asynchronous preemption (1.14) — Done: no preemption signal if one is already pending
0c0e8f224d; preempt-stop cleared in dropm8de0bb77eb1.14; cleantimers returns early if the G is being preempted5d70cb0667;e8be350d78blocks preemption while a timer istimerModifying. - Network poller: from the netFD select loop to the runtime-integrated epoll/kqueue/IOCP poller — Done: converge duplicate
netpollBreakcalls (89% faster)0cc1290174; Windows always uses GQCSExe3cf0525b0; AIX break races78a45d8b45,45f99d85e0;netpollWakeSiguint32245409ea86; error code namesd98023ebb5; pollDesc/netpollunblock refinements33357270f1. - Timers: timerproc goroutine → per-bucket heaps → timers on Ps — Done: user-visible
time.Ticker.Reset6e5652bebe/402ea9e4f9; timers on running Ps can be stolen9b90491e4a; racy timer use no longer panics98858c4380; resetTimer only fromReset5f3354d1bf; wakeNetPoller avoided in timerModifying355f53f0a0; timer/event-handler race0452f9460f. - Channels and select — Done: pack sudog struct
94e61ab94d. - sync.Map, atomic.Value and sync/atomic — Done: user-visible
Map.LoadAndDelete2e8dbae85c;panic64removeda4c48d61f5. - Runtime lock ranking (static lock order checking) — Done: static lock ranking
0a820007e7, partial-order edges1067ab0808,300ff5d8ac,a81bc8e825,0f8fecaba7,f474e9e549,e05695ed4d, Gscan orderingf9640b88c7, explicit direction646b4ac065; the experiment itself arrives via095ba225971.17 (GOEXPERIMENT parsing simplification, 1.17). Left open: not enabled by default and requires the experiment build. - Goroutine and M lifecycle: caches, ids, LockOSThread, Goexit, cgo extra Ms, deadlock detection — Done: debug call injection on a new goroutine
3633d2c545.
Other changes
- Misc internal —
3093959ee1,85162292af,588ee7987d,ab5a40c5e3,01a9cf8487,11b3730a02,c847589ad0,9340bd610b. - reflect.Select panics early user-visible — reflect.Select now panics early on excessive input cases. (
7802b55176)
Data structures and type metadata
From Runtime data structures and type metadata (Go 1.0–1.17)
Cheap-checks-first generated equality algorithms, small-integer interface conversions without allocation, typehash equal to compiler hashes, quiet NaNs in softfloat.
- Hash functions and algorithm tables: memhash, AES hash, fallback hash — Done: interface pointer hashing fast path (
afd691c579),typehashequals compiler hash (2b8e60d464). - Compiler-generated equality and hash functions — Done: cheap-checks-first eq algs (
79648bde2d,daae72e88e,5029c3671d,f4e13b83aa,1cc7be89a9,7eab9506c9,1c4e9b2eda,c9591d73ef,8c8045fd38,ab3bd2c15f). - Interface values, itabs and type assertions — Done: small-int conversions without allocation (
9828c43288), interface hashing (afd691c579), more printable panics: values of named basic kinds are printed (972df38445). - reflect.Call, MakeFunc, method values and argument-frame GC precision — Done: zeroing before barrier writes (
3dec253783),Selectallocations on stack for up to 4 cases (17d5cef257, Select/1 -18%). - reflect performance, caches and API additions — Done: float32 conversion keeps signaling NaNs (
7485050c0f,7ffbea9fd8), unexported embedded method invocation disallowed (0eb694e9c2),Value.AddrRO flags (4c003f6b78),unsafeheaderconsolidation (da382a3978), DeepEqual flagIndir (d872bbcfec). - memmove, memclr, duff routines and pointer-write atomicity — Done: ppc64 short moves (
cbd421f75b), MIPS64x memclr (918d4d46cd),7939c43748. - internal/bytealg and string/byte comparison primitives — Done: IndexAny/LastIndexAny and Rabin-Karp move (
3af92acb9f,18a6fd44bb). - Slices and append: growslice, makeslice and string/slice conversions — Done: no bulkBarrierPreWrite when dst length is zero (
6ffca22602), race reorder (089e482b3d). - Strings: concatenation, conversion and printing helpers — Done:
staticuint64sreplacesstaticbytes(bda42a7a78), panic value printing (972df38445), nostring(int)in runtime (6052838bc3). - Soft-float, 64-bit division and complex arithmetic helpers — Done: quiet NaNs in softfloat (
d8bf079751). - internal/reflectlite and checkptr — Done:
f4ddc00345,08dd4ad7e3,1f231d74f6.
Other changes
- Misc internal — user-visible method name in reflect panics (
f6b30e53bb), file permission fix (58ba0f9dcd).
Diagnostics and knobs
From Diagnostics and knobs (Go 1.0–1.17)
Max RSS in heap profiles, goroutine profile labels, block/mutex seconds parameter, race .syso rebuilds.
- Race detector integration — Done:
.sysorebuilds for netbsd and withoutgetauxval(3afa74115b,fffe622963,e49b2308a5). Left open:a14efb1be31.14 says the tsan library and.sysofiles must still be rebuilt to complete #33309. - CPU profiler and runtime/pprof writers (legacy format to compressed protobuf) — Done: user-visible max RSS in memory profiles (
fb1cd94222, units fixed197a2a3799); goroutine profile plumbs labels (38c2c12bc1);net/http/pprofsecondsparameter for block and mutex, viainternal/profilemerge (2ff1e3ebf5); faster CPU profile shutdown (1f0738c157); final stack frame expansion (fadbf7404d); fake overflow record PC (4a8b9bd264); recursive inline heuristic (ce52871948); mcaches flushed before reading memstats (0ddde4ada2). Left open: nothing noted. - Profile labels — Done: labels in goroutine profiles via
goroutineProfileWithLabels(38c2c12bc1, 1.15). Left open: OS-thread creation profiles do not capture labels (38c2c12bc1). - Heap profile accounting and MemStats — Done: mcaches flushed to mcentral before reading memstats (
0ddde4ada2). Left open: nothing noted. - GODEBUG, runtime/debug, debug log and traceback knobs — Done: debuglog traceback fix (
45cd312394);invalidptrdocumented (3c35eec618). Left open: nothing noted. - GDB runtime support — Done: repair of slice/string/channel printing for several gdb versions (
ee776b4126,3949cae441,429d2c548d). Left open: nothing noted.
Other changes
- Misc internal —
debug=0documented as emitting proto (251f3e5b9c),modloadBuildInfo records the replacement for the main module (e092fc352a);string(i)vet cleanup (6052838bc3); profile errors (2172b229b9); trace license and examples (000636fdb5,b424a312ea).
OS layer, stacks and panics
From OS interface, stacks and panics (Go 1.5–1.17)
conservative-scanned debug calls, darwin/arm and 386 removed, open-coded defer stale-entry fix, larger stack growth for large frames, Plan 9 env cache.
- New and ported OS/arch targets, 1.5–1.17 — Done: darwin/arm and darwin/386 removed (
da8591b61c,f7e6ab44b4,8b4cbcc320,d5e1b7ca68); cgo for riscv64 follows in 1.16. - Goroutine stack growth, shrinking, GC stack barriers and stack objects — Done: grow more than 2x if the new frame is large (
b1760f3a27). - Tracebacks, symbol tables and
runtime.Callers/CallersFrames— Done: print instruction bytes on SIGILL (63f1bc5992),expandFinalInlineFramehandles an empty stack (5bc75a3097), crash on SI_USER SigPanic (e5bd6e1c79), riscv64goexitTOPFRAME (a1ffbe9c69). - Defer, panic, recover and Goexit (runtime side) — Done: stale open-coded defer entries removed over the whole chain (
fae87a2223), g0 defer-list pollution fixed (825ae71e56was committed 2020-03 and ships in 1.15). - Signals: masks, forwarding, sigaltstack and the unified Unix signal layer — Done:
SI_USERSigPanic crash (e5bd6e1c79),setgto gsignal beforeadjustSignalStack(d286e61b67), no preempt signal if one is pending (0c0e8f224d), DLL receiving a signal does not exit (5756808ce8), remove runtime sigqueue init (2681efaf0e), mlock don’t crash (b851e51160,71218dbc40), Plan 9 notes enabled later (bb59a1360a). - Asynchronous preemption: signal plumbing, injected calls and per-arch support — Done: preempt/restart some instruction sequences (
ee330385ca), riscv64 (b89f4c6720), skip preempt when disabled (d1015f3e58), no preempt signal when one is pending (0c0e8f224d), WindowsContextallocation tidy (2a029b3f26). - cgo runtime support: pointer checks, callbacks, extra Ms, C-to-Go call path — Done: arm64 infinite cgo callstack fixed with CFA info in
crosscall1(8e121b1587). - Darwin and OpenBSD move to libc; Solaris and AIX libcall; syscall wrapper layer — Done: Security.framework without cgo uses
runtime.syscallNoErrvariants (6f52790a20), dropping darwin/arm and 386 (da8591b61c,8b4cbcc320). - Windows runtime — Done: always use
GetQueuedCompletionStatusEx(e3cf0525b0), float syscall returns (450d0b2f30), DLL signal no-exit (5756808ce8). - CPU feature detection (
internal/cpu), auxv parsing andGODEBUG=cpu.*— Done: MIPS64x features (e48a83f077), anonymous struct feature vars (b79acf97c7), VZEROUPPER guard (c46ffdd2ec). - Assembly-level runtime entry points: memequal/cmp/IndexByte, hashing, atomics and ABI wrappers — Done: CBZ/CBNZ in arm64 asm (
52b457d6f3), Xchg/Xadd arm64 (3103495fa9), MIPS64 memclr (918d4d46cd), ABI-correct float constants (4daf8719e7), FENCE (2a08f3c181). - Debugger function calls and conservative preemption frames — Done: conservative scanning for debug calls (
57d751370c). - Plan 9 and NaCl ports — Done: env cache (
af09ff1981), notes later (bb59a1360a).
Other changes
- cgo and C interop internal — runtime/cgo: fix unsetenv wrapper (
4f074b58d2) - Linux, vDSO, time and auxv internal — user-visible runtime: negate errno value for mips pipe/pipe2 (
20b46c7c69); user-visible runtime: fix dead link in gcc_androd.c file (c9442dc850) - BSD, Solaris, AIX, Plan 9, NaCl internal — user-visible runtime, syscall: correct openbsd/arm and openbsd/arm64 syscalls for OpenBSD 6.7 (
20160b37c6); user-visible runtime: mark OpenBSD raise function nosplit (9699086043)
Compiler frontend
From Compiler frontend (Go 1.10–1.17)
Misplaced-directive diagnostics, new syntax source reader, ODDDARG removal, mid-stack inlining in recursion cycles, slicesym/gdata cleanup.
- dev.regabi: from
*Nodestruct to their.Nodeinterface and concrete node types — Done:ODDDARGremoved by callingfixVariadicCallbefore escape analysis (080a3ee8b2,a44d06d3b4). Left open: nothing noted. - Indexed export format and the export-data lifecycle — Done: fingerprint read cleanups (
8627b4c9b5). Left open: nothing noted. - The syntax package: parser, scanner, source reader, positions and error recovery — Done: new source reader (
4de606b55f), scanner messages (bfb903f252), pragma interface and misplaced directive diagnostics (768201729d). Left open: nothing noted. - Constants: Go 2 number literals, evconst, untyped conversion and go/constant — Done: rune bounds checked as int32 (
173dce8d20), complex conversion fix (34314280e4). Left open: nothing noted. - Language version gating (
-lang) and language changes implemented in the frontend — Done: user-visible multi-valueprintargsaf686da46f. Left open: nothing noted. - Package initialization order, static initialisation and init functions — Done: slicesym refactor and
gdatadeleted (7096b1700d,0a18cbc2e6,12d1c9b863), static arrays markednoalg(2222e0601a,54cbb6b0c2), blank fields not emitted (0f47c12a29). Left open: nothing noted. - Concurrent compilation and frontend performance — Done:
211ee9f07c. Left open: nothing noted. - Directives and pragmas in the frontend (
//go:handling) — Done:768201729d. Left open: nothing noted. - Inlining-related frontend work: export of bodies, type switches, closures, devirtualization — Done:
ed7a8332c4. Left open: nothing noted. - The legacy typechecker: error quality, alias/recursive-type handling and type checking order — Done:
7cbee12444. Left open: nothing noted. - Lowering in order/walk and the shape of runtime calls emitted by the frontend — Done:
6ed4661807,19ed0d993c,b6feb03b24. Left open: the “s must be a variable” restriction of6ed4661807. - checkptr instrumentation and compiler debugging flags — Done:
656f27ebf8. Left open: nothing noted.
Other changes
- Delete old object file format support in compiler internal —
181faef82c,330f53b615. - Small cleanups and diagnostics internal —
4f7053c87f,26de581a70(omit file:pos for non-existent files),7e1028a9ff(avoid range over copy of array),ed5233166f,ab3bd2c15f,415da71c5d,5abf5f831e,62ccee49d6,7711bad100,ea52c78a66,235a7c57be,dad553d92f. - Syntax cleanups internal — Various syntax package cleanups. (
f6a0d72385)
Middle end and SSA optimizer
From Middle end and SSA optimizer (Go 1.10–1.17)
Strongly typed aux/auxint with ellipsis rules across architectures, integer-range fuse+rules replacing walkinrange, mid-stack inlining through recursion cycles, precise method-value escape analysis, and typed-rule conversions (threads: Rulegen, Inlining, Escape, CFG passes).
- Prove pass: unsatisfiability, partial-order facts, loop bounds-check elimination — Done: zero right shift of positive ints by bits-1 (
2cb10d42b7);isNonNegativeuses bit patterns only (5fac45a320); local induction facts only when an edge exists between if block and phi block (7f86080476, completed by the indirect-connection checka6755fc0de1.16 in 1.16). Left open: nothing noted. - Escape analysis: the esc.go fixes, the escape.go rewrite, and the move to package escape — Done: method values analyzed precisely (
2a2423bd05),Escape.tagHolerefactor (1811533695), walkAll pre-allocation (e43239aabe), stricter safety rule #4 (f049d911e9). Left open: nothing noted. - Inlining: budget, mid-stack inlining, closures, and what became inlinable — Done: cycle-of-recursion mid-stack inlining (
ed7a8332c4), intrinsic cost one (956f64888d), cost printed with-m=2(ee46f135a9), inline failure logged (fced302aa1). Left open: nothing noted. - Switch lowering, select, and type switches in walk — Done: better concrete type-switch code (
2db4cc38a0), consistent positions (f5439d4c68,02ab2c040e). Left open: nothing noted. - Rewrite-rule generator, typed Aux/AuxInt, and rule syntax — Done: ellipsis rules (
8484d409ac,a3fc77aa7e), typed aux (28157b3292), conversion of generic/AMD64/s390x/arm64 rules,-d=ssa/check/seed(97a268624c), rule source-line flag (24fa159a2e). Left open: remaining architectures to convert. - Write-barrier elision and the writebarrier pass — Done: no stack maps for barrier calls (
601bc41da2), readonly sym checks simplified (71e0cd815d). Left open: nothing noted. - Memory-op optimizations: memmove, Move/Zero, dead stores, nil checks — Done: ro-sym Move to Zero (
4a7e363288), double zeroing (396833caef), Move/Zero typed aux (32467e677f,4799955004), negative size guard (bc98e35b53). Left open: nothing noted. - Arithmetic strength reduction, divisibility and intrinsics — Done: integer-in-range checks restored in SSA via fuse + rules (
e37cc29863) and walkinrange removed (24343cb886); NaN restrictions; reassociation typed rules;14ad23d1f5zero extensions after 32-bit shifts avoided. Left open: nothing noted. - CFG and control-flow passes: branchelim, fuse, shortcircuit, phiopt — Done: integer ranges (
e37cc29863), shortcircuit phis (ade0811dc8,64dcef3045,0239a5c478,4ad643d208). Left open: nothing noted. - Compiler front of walk/order: ordering fixes and the dev.regabi IR refactor (package walk) — Done: variadic call desugaring in order (
681ba43077,9f4dd09bf5), eqstring/eqinterface factoring (daae72e88e,f4e13b83aa),19ed0d993cstaticuint64s. Left open: nothing noted. - Diagnostics for the optimizer: ssa.html, GOSSAFUNC and optimizer logging — Done: dark mode, combined columns, block auxint, HTMLWriter refactor (
1e9665da8f,afc480bab4,a4451e1143,6736b2fdb2). Left open: nothing noted.
Other changes
- Rulegen tooling and typed-aux tail internal — coverage script (
7855d6835d), commutativity helper (715e8bbe63), whitespace normalization (4084c125cc), debug output (0f7088ade5,60651a1bc8,1b15c7f102,2dfdd85c4f,1bc116b73c,f5291cf03d,6a569f243e), typed conversion of dec/dec64/reassociation/float/nilcheck/pointer/devirtualization/divide/arm64 CC rules (7f0c479fff,917aa72c14,5abab1da2c,f1a2a0e0bf,052b3c99b2,79bb41aed6,b6f6259f2d,47b5efad5d,1c5453510c,6b5ab20b65,49f10f3797,a3374fa0f8,3d34c77829,c8b42f9aa5,885099d155,0f14c2a042,12665b9a06,b1cae8cd1d),1cf357981e. - Addressing-mode pass, deadcode, misc SSA internal — separate pass for complex x86 addressing modes, 386 converted (
98cb76799c,af7eafd150), optimized slice zeroing in deadcode (3c8101c7e4),truncateValues(e354309e1e),oneBithelpers (50b11318fe,066c47ca5f,4974ac6874,65c9b57566), shift magnitude fix (7f8fda3c0b), bool-to-int andif falsefolding (74f898360d,7b0b6c2f7e), aux Sym faulting (1894842b75), shift boundedness in dec64 (bc5fc6d48f), dereference boundedness hints in SSA conversion (e8518731be,f8ff12d480,80e5c3b8b5,843453d09e),lencheck when making slices (6edd7971bb), tuple selector CSE bug (f073395b73) and all-unsafe functions (f84bbd52b0), flag constants on arm (40ef1faabc),b1cae8cd1d,3b2f67a597,4e550bdacd,a32262d462(REFLECTMETHOD),34e38ac99f,8c30971da6,4ae1879dda,1b47fde55c,17f7c12eb9,08dee51e59,608cdcaede, ssa.html fixes (c6fef1fb52,9131f08a23,763bd58b19,d0ea533c54). - Walk and ssagen cleanups internal — Cleaned up shortcircuitBlock, walkExpr, stray comments and AuxCall.results. (
cbcb031fe8)
Backends and assemblers
From Backends and assemblers (Go 1.12–1.17)
rulegen reshaped (ellipses, commutative loops, typed aux); separate addressing-modes pass for amd64/386/s390x; stack maps only at calls; spectre mitigation; alignment directives; new object format re-enabled.
- Rewrite-rule generator (rulegen): ellipses, commutativity loops, typed aux — Done: ellipsis rules across all ports; commutative loops (
bd6d78ef37) with preceding correctness fixes (73269b8e75,a63ed10d44,49f8d45994); HMUL marked non-commutative on amd64 because rulegen could not yet express the asymmetric rules without infinite loops (6817210edf); bounds checks cut (a3f234c706); chunking removed (6dd11bcb35);AddArgN(7913f7dfcf); typed aux begins (28157b3292,ea7126fe14) and 386/s390x/mips/wasm/riscv64/dec ports start. Left open: arm64, ARM, amd64, s390x partially migrated. - amd64 lowering: read-modify-write, load-op, addressing modes pass, intrinsic-friendly rules — Done: addressing-modes pass (
98cb76799c), HasCPUFeature (fff7509d47), spectre (877ef86bec,fc8a6336d1), 386 conversion. Left open: 386 pass first reverted (5b897ec017). - arm64 backend and assembler — Done: PCALIGN (
2f8798ed07), prologue_end stmt (a88c26eb28), typed aux started,rev16(2783249068), ARM64 compare redo of flag consts (a07e28194a), VCNT fix (e5e386938f). Left open: nothing noted. - riscv64 port: assembler and compiler — Done: instruction generation rework, atomics, compare-and-branch, pseudo-ops (listed above). Left open: nothing noted.
- PPC64 / POWER backend and assembler — Done: index fixes, move/zero improvements (
815509ae31), ISEL shifts (a1550d3ca3), power9 mod (56933fb838), PCALIGN (37470c0664,c79c5e1aa4,60a964ea45), shift constraints (daf39d06ee), NaN constants (78aa4af239), AND-remainder (a3ef804891). Left open: nothing noted. - s390x backend: compare-and-branch, intrinsics, assembler — Done: flag-producing FP ops (
b2790a2838), simplified memory-operand rules (a03618500c), immediates (e464d7d797), typed rules. Left open: nothing noted. - 386, ARM (32-bit), MIPS/MIPS64 and the 387 removal — Done: 386 addressing modes (
d84cbec890,af7eafd150,24925c7ed9), flag-constants for ARM redo (40ef1faabc), MIPS64 intrinsics, MSA. Left open: first conversion crashed randomly because intermediateptr+xmay point outside the object (explained inaf7eafd150). - math/bits, atomic and runtime intrinsics (cross-architecture) — Done:
ab7ecea0c8, riscv64 atomics, HasCPUFeature. Left open: nothing noted. - SSA infrastructure passes: layout, regalloc, scheduling, flagalloc, block shape — Done: exit layout, Greater/Geq removal, comparison canonicalization, scheduler uses, shortcircuit phis, flagalloc cleanup,
d7c073ecbf,806318d6ad. Left open: nothing noted. - Safepoints, unsafe points and stack maps for asynchronous preemption — Done:
9d812cfa5c,faafdf5115,601bc41da2,2bad2f7eba,ee7d9f1c37. Left open: flag-gated. - Debug info generated by the backend: statements, location lists, line tables — Done:
a88c26eb28,363cd66d60,1dcf34f2ec. Left open: nothing noted. - New object file format and content-addressable symbols (dev.link, assembler side) — Done:
8cdb769b08,181faef82c,330f53b615,6c7d6cefd0,88d6d37b77,e08f10b8b5,f5fcc9b8e0. Left open: nothing noted. - Assembler directives and tooling: PCALIGN/ALIGN, FuncInfo flags, prologue handling — Done: alignment (
71d477469c,1dbcbcfca4,d92a5a80b5), spectre. Left open: nothing noted.
Other changes
- riscv64 rules internal — subtraction of zero (
d28b8524a4), NOT/NEG pseudo-instructions (7b2f0ba5b9,26154f31ad,0e44c692c2), unsafe-point special case removed (9f74f0afa6). - dev.link / asm internal — only ‘/’ in DWARF file names (
23c96e9bbd), RefIdx field removed (6a819b0062),-poption and DWARF changes (9cae3b33c3),-S=2aux symbol dump (c44af2d4a2). - Rules cleanup internal — duplicate ppc64 rules (
37fc092be1), wasm shift boundness (ccb95b6492),ntzremoved (79395c55e2), splitload typed aux (bf5b83a835), duffcopy auxint computed outside rules (b3e8a00060). - Misc internal —
7a4247cd46,d7c073ecbf,47ade08141,fb16f4b82e,b5c66de089,1b47fde55c,e932f0addc,bcdd5d0024,bc5fc6d48f,1894842b75,a4451e1143,eb5cd0fb40,b136f0c17b,33b648c0e9,e4a1cf8a56,2c859eae1d,fed33d76bc,334d410ae3,c4fed25553,9439a7d87f,5dde10c304,42d4df9459,a7a0f03050,3abec31097,bd6f4cd886,c27dd0c9e5,025a4faf5f,8955a56da0. - PPC64 rules typed aux internal — Updated PPC64.rules to use typed aux values. (
4a5d6916ed)
Linker and object files
From Linker and object files (Go 1.10–1.17)
The dev.link conversion: old object format deleted, all passes moved to loader.Sym, new DWARF on loader, parallel relocation/asmb/dwarfcompress, internal PIE and Windows PIE.
- New object file format and the loader (dev.link) — Done:
62dfb27827deletes old-object-format support from the linker (+39/-1049 lines);3e6ff18247detects format mismatch withcmd/oldlink(the old linker kept around as fallback, invoked via5ffa696ade). Thesym.Symbolwavefront is pushed through the passes (next thread); the loader gains external symbols, attribute set,SymbolBuilder,ExtReloc, per-symbol alignment arrays (2f83d68926), content updates of obj-based symbols (d5854bf8e6), multi-level overwrite (db48d45838). Accessors are redone to avoid slice copies:Relocsview (c951514da9), aux accessors (8a074fa275,b33b6e857d),Symaccessors (6dab0942a4), then old-style accessors and types removed (cc3039f818,e7c16412b7); the package loses its “2” suffix (a1c29156ae).027055240fchecks an index fingerprint for consistency,0f99ab4e86moves NoSplit into a symbol flag,c33b7c7592adds an index to indexed symbol names. Left open:sym.Symbolstill exists for the late passes and conversion (PropagateLoaderChangesToSymbols,LoadFull);cmd/oldlinkstill shipped. - Wavefront conversion of linker passes to the loader; sym.Symbol removal — Done: ELF host objects first (
fa284af720, default3fa9500dd1), DWARF type generation (25f1b093fe, gated by-newdw), thensym.Symbolsremoved from the loader (664accc7be), and the conversion of linksetup (5279166402), stack-bound check (4df1db99c4), doelf/dope/domacho/doxcoff (a3e965ce8a,e5f7a8334a,4d03b6543f,b1a19f3cc7), textbuildid (c5f6920212), callgraph (a9fb2e5155), gentext for s390x/ppc64 (587faf67d7,95ea64ba96), text address assignment (850c602ed6), pcln phase (db48c404cf), typelinks (a35b322709), buildinfo (9669c3f361), findfunctab (2f9decbe95), symtab (47cac82e36), dwarfcompress (3e8975172f), asmb (1adae7fe76), plus the second DWARF phase (0c41a37c6c) and deletion of legacy DWARF generation (cdc1b19513,e440f05251). Fields are peeled offsym.Symbolone by one: Gotype/File (43a85a39bf), Unit (3f408fc7fd), Sub (9a3bf7d542), ELF fields (0722a49b37),FuncInfo(68305f3fec),Reachparent(245a2f5780). Memory is returned afterLoadFull(f886ff7b41, -19.7% Loadlib GC for cmd/compile, -30% with external linking),7aa6e0faf2drops fields of external symbols afterwards.-aflag removed (3b32a44699). Left open: 1.15 ships with the two worlds coexisting (theLoadFullbridge andsym.Symbolfor relocation/asmb). - Linker performance and memory engineering — Done: parallel reloc/dwarfcompress/asmb as above;
Dwarfcompress,Loadlibbenchmarks recorded;b2def42d9eetc. remove buffered IO;ca290169abbatch-allocates external relocs (kubelet relink -3.1%);f875f8fe76alignment tweaks (-1.3%); deadcode reuses relocs without slices (cf5c718cba: -6.4%, alloc -7.9%);38437ce118/ab1253b59a/c4ccd08a25read only necessary fields;4098ab3ff41.16 fewer Preload allocations. Left open: external-link memory still large (addressed by streaming relocations in 1.16). - pclntab, funcdata and pc tables — Done: pcln linker phase converted to loader APIs (
db48c404cf),FuncInforead from the object file through accessors (e00da38b81,30b0c819d1,2820bcede0), inltree symbols made anonymous (ad6fcf6993), pclntab built from function address rather than symbol lookup (c364079a53), findfunctab converted (2f9decbe95). Left open: all still written into one symbol. - Dead-code elimination and method pruning — Done:
b0da26a668stops checkingreflect.Value.Call,af9ab6b2e8checksreflect.Value.MethodByNameexplicitly;ab1253b59a,38437ce118read only needed fields;44d22869a8does not mark a symbol’s Gotype reachable;d7553d9af9marks special symbols reachable;19a932ceb8does not mark shared-library symbols reachable unconditionally. Left open: all methods of a reachable type matched against every interface method. - DWARF generation in the linker — Done: both DWARF phases converted to loader (
25f1b093fe,0c41a37c6c,61a0b0d624,da9f383ca1,cdc1b19513),8634642f9a,0dff5b0b9e,ef44bd8413/b0b185c5faPatchDWARFName hook then removal,58f017bceafixes end_sequence. Left open: heap use of line tables (addressed byd08bab99b71.16). - DWARF compression and Mach-O dsymutil combining — Done:
a3873ab49f(Dwarfcompress -66%),3e8975172f. Left open: nothing noted. - Mach-O and Darwin support — Done:
b4245ea544mmapped macho host objects,d9c51620b9/d8ab10525edelete darwin/386 and darwin/arm host loading,1f325af4ddSCONST on darwin. Left open: nothing noted. - PE / Windows — Done:
95f3821390-buildmode=pieon windows,4ec5e7c50fmmapped OutBuf on Windows,da07c59f24debug/pe constants. Left open: nothing noted. - WebAssembly — Done: wasm moves onto loader APIs (
2a33f5368a,dd34841de7,f9ed846a46); see the wavefront thread. Left open: nothing noted. - Build modes: PIE, plugin, c-shared, c-archive, shared libraries — Done:
b2696fde40PIE defaults to internal linking again, relative relocs (675a2e7078), C-object absolute relocations as dynamic relocs plus static application (baea3cd7c9,d532d5f0fa),c70f069902re-enables internal PIE after an accidental rebase disabling, windows PIE (95f3821390, which adds.relocand DYNAMIC_BASE; HIGH_ENTROPY_VA on amd64) user-visible,6aeaf4a0f4/6290a54365plugin fixes under dev.link. Left open: nothing noted. - Host object loading and external linking — Done:
e6d7326fb6internal linking default for android/arm64,bcda68447balternative linkers,e5a6a94aeblld on Android,9b9556f660definitions from debug/elf,e95b858530NetBSD ABI 7.0,fd18f3ba50ASLR off for netbsd+race. Left open: nothing noted. - Architecture ports and trampoline insertion — Done: ARM64 function alignment 16 (
2568d323f6), large function alignment (d92a5a80b5,71d477469c/1dbcbcfca4:PCALIGNandALIGN2048for the gVisor interrupt table), trampoline fixes on PPC64/AIX (33213039e5,025bca8746,66ee97590c),490bc6097aARM no longer requires math,ec177e4c83frame pointer on iOS arm64. Left open: nothing noted.
Other changes
- Loader API growth internal — attributes and accessors added as passes were converted:
b658c62e9c,66c74b78ca,24f9b9c8f3,3c3ba97ba5,e4a8da499b,e6b044b200,a52cea446d,c6fea80b95,161e0a5497,ce7a0dda31,87f561ab2b,49e94f19f0,e5dc6ff874,2d2590e94a,23c52de5fc,12b11f3af9,912e64ba46,49099d21f5,dd66786029,d44c9a046b,186e783730,0e06775eeb,2599c175cb,442fd182fb,fd7666881b,6636b3f2fcand9f6a35660d(reloc variants),e488ade6dd,5072c166a1,242b38c171/026b98a2a2/3d1007d28e(error reporting moved into the loader),25992d025f,c306fbaa1c. - Host-object loader conversions and cleanups internal —
aacffb6576,37cc5cd769,0505e8a3a3,69f3bc04e5,82f6d8eabb,76d0977745,1152c6d3f0,7cf907606d,2a5bf32638(.got on S390X),80702c7c3c(versioned .TOC. on AIX),82f633a8e9. - Pass conversions and dodata sub-steps internal —
29f886e427,860f12a2fc,7f02fa72aa,ed7a491940,651e950fc9,7716d7fc1b,e14efb6865,021bebe990,60baf83a82,c02cd04fe1,8e457c865d,4d5fdd74ab,eed3ef581b,c32b590264,5cccd7a724,87b43088cd,7a22f11e96,45bd3b1bc4(loader GCProg),f790533d9f,51ac260e5a,2a874562bf,a742d0ed5f,26d6d07785,b6df7e555e,f8b74eafd5,e77639f3a4,42cca1a7fe,09cd065875,65c1805e77,5aa59c6a99,516c29a79f,83db26ac4a,1667b35740,4048fb8780,d23cd597aa,404f626ee5,df2a46f85a. - Link-context decoupling and small fixes internal —
d8b03c4678,7d8aef689d,8db73599d3,5d9cdbb840,4ba39d6a58,c4cb6832bb,b328ab1d1e,e77c99ce4c,f2d8da1a35,880ef2da7b,a6ae6d35e6,69d9664f18,85d62a91ee,bf3aa8741b,d4a70b97dc,14cf804aa0,636fa3148f/ca017a6fb9(do not split container symbols when writing blocks),aef23f5be9/1cb582fe02(end-of-block padding),84fb045763,9a5468edff,af98efc545,b1f9f47982,29d95be875,112a7cb82c,626c89bfa3,4b8715bd81,48c79db07f,3fd7d78dec,b7d5346889(-newdwremoved),24064a302c,cb2843704e,5ee515fd8c,8cc515ad3f,0612e78f0f,183d25d996,0e0ee115c5,c7e3d817ab,3919e89c56,f095b570fe,a4129a1d20,88d6d37b77,3277db4ccf,8e100a05a5,6652a6cccc(object version bump),95a5a0dee9,c144a94b26,c7c72378a3,c7a11099c9,1d083eba5b,8e7ddac52d,d86e94a4c8,f652eb72b6,a8e8e05ed1/67d93cfd35(stringer reruns),ca90d3de9f,6b0b7aca8a,00723603eb,adea6a90e3,f12683a831,e18a5ba0ca(stack-bound check no longer re-checks a call repeatedly). - Misc internal —
ea93ddfaeb(use Extname in doxcoff),881d540540fixes SLIBFUZZER_EXTRA_COUNTER handling;bffb8818e7,2cd2ff6f56doc/link wording. - Jump alignment user-visible —
30f8074e35prevents jumps crossing 32-byte boundaries on x86 (Intel JCC erratum mitigation in the assembler). - GOAMD64 internal —
daf70d6c16removes the GOAMD64 environment variable;fdba0802201.16 removes Go115AMD64 (1.16). - Compiler slicesym internal —
7096b1700d,0a18cbc2e6,ed5233166f,12d1c9b863delete gdata. - Telemetry internal —
9857e5c815adds linker telemetry. - Shared-library GC data internal —
5779bb4e92,7799756a50fix GC data read from shared libraries (the file was closed early, giving a zero GC map). - Close output internal —
902d8de79e,13bc6d4223,d40b0a1494,39ea0ea05d. - Host objects internal —
f2bba30e40. - Type loading internal —
6ae47d1354don’t always load type symbols,3382411d93,0f99ab4e86. - Solaris internal —
ca18c37ee8define_etextin the linker. - Large-text DWARF internal —
efbab6dc7d,29c5291f03. - Linker cleanups internal — Various tool-driven and simple cleanups, and macho_combine_dwarf.go code cleanup. (
531b6d3126) - Skip symbol references for missing symbols internal — Linker skips symbol references when looking for missing symbols. (
aa4d92b8aa)