Go 1.26
Green Tea by default. SIMD (archsimd, amd64) lands behind an experiment. Old maps deleted. move2heap stack-allocated appends. panicBounds. Duff’s device removed. s390x register ABI. runtime/secret, heap-base randomization and freegc experiments. Goroutine-leak profile experiment. new(expr). Size-specialized malloc: on in master, off in the release.
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 Runtime: memory allocator and garbage collector (Go 1.18–1.28)
- Green Tea: span-based marking with vector scan kernels — Done: user-visible enabled by default except on loong64, where the compiler crashed on the Green Tea code (
7fbf54bfeb); loong64 enabled later in the cycle (c53cb642de). The AVX-512 kernels were imported (889ab74169) and wired intoscanSpan, giving “an extra 15-20%” on dense spans (5d040df092).scanobjectwas duplicated per mode to tell them apart in profiles (41b429881a,1aa154621d). The global span queue was replaced byspanSPMCrings and work-stealing (d7a38adf4c);gcMarkWorkAvailablewas split into a termination condition and a worker-spawn heuristic (fde10c4ce7). Follow-up fixes forspanSPMC: an unbounded loop when more than 64 live rings existed (f3312124c2), rings leaked on P destroy (3ee761739b,7dd54e1fd7), list type (046dce0e54), lock rank (052c192a4c), and removal of the unusedmspan.scanIdx(2baa1d1762). Kernel fixes and tuning: cache-size probing (adbf59525c), a size-class check (ff2ebf69c4), a register destination forVPCOMPRESSQ(−70% on Zen 4,041f564b3e), an AVX-512filterNil(+40% throughput,a9704f89ea), andVZEROUPPER(0d71bd57c9). A Go-simd-package kernel set (da92168ec8, −19% ns on the scan benchmark) was reverted for naming and merge conflicts with a plan to “do it again” (0c69e77343). Left open:freeSomeSpanSPMCsbatching was dropped, “may want to revisit … for very high GOMAXPROCS” (f3312124c2). The simd-package kernels have not been relanded at HEAD, andscan_go.gostill carries a TODO. - Heap bitmap rewrite and allocation headers — Done: invariant work hoisted out of
heapBitsSmallForAddrInlinein Green Tea’s sparse scan loop (65c09eafdf). Left open: nothing noted. - mallocgc decomposition and size-specialized malloc — Done: user-visible
GOEXPERIMENT=sizespecializedmallocadded (60c1ee9183) and enabled by default (a7917eed70). Generator, templates and tables (a69395eab2,411c250d64); the size-class generator moved into_mkmalloc(f37d75472d); direct compiler calls (19a30ea3f2); valgrind support (c54dc1418b); generator polish (21ebed0ac0,2947cb0469,e2fef50def); an explicit nil check inheapSetTypeSmallHeaderto avoid read-then-write page faults (tile38 at GOMAXPROCS=192: +9.6% ops/s, p99 −15%,3032894e04). Left open: “I still need to investigate heapsampling.go” (411c250d64). - Scavenger redesign — Done: on Linux, memory released with
MADV_DONTNEEDis known to be zero, so software zeroing is skipped on reuse (27937289dc); a duplicatescavengeIndex.sysGrowcall removed (4fca79833f). Left open: nothing noted. - Finalizers, runtime.AddCleanup and the cleanup queue — Done: user-visible panics when
ptr == argor when the cleanup closure capturesptr(06412288cf,eb63ef9d66); separate argument storage (−16.7% ns, −33% B/op,1bb1f2bf0c); benchmark (9fd2e44439);/gc/cleanups/…and/gc/finalizers/…queue metrics (a4d99770c0); test log (43ebed88cc). Left open: nothing noted. - Weak pointers and the unique package — Done: weak handles padded to 16 bytes so they bypass the tiny allocator and cannot leak neighbors (
80c91eedbb); canon map fixes (ffa882059c,47bf8f073e); test (a33bbf1988). Left open: “We could potentially do better by using the 8 byte noscan size class” (80c91eedbb). - Object pinning (runtime.Pinner) — Done: documentation (
856238615d,76345533f7). Left open: nothing noted. - Memory arenas experiment — Done: assist credit for arena chunks deducted only during GC, restoring behavior lost in the 1.24 malloc split (
d79405a344); test skips (1a03d0db3f,96e142ba2b). Left open: nothing noted. - runtime.freegc: compiler-directed explicit freeing — Done: user-visible
freegcwith reuse lists and clobberfree (fecfcaa4f6), an assist-credit test (120f1874ef), size-specialized noscan reuse (50128a2154), the experiment renamed toruntimefreegcand off for 1.26 (5a347b775e), and compiler alias analysis withgrowsliceNoAlias(4879151d1d, compiler area). Left open:freegc“throws if noscan is false (support for which is implemented in a later CL)”. The specialized-malloc path disables pointerful freeing via a TODO, andclobberfree=2(mprotect) is described as a later experimental CL (fecfcaa4f6,50128a2154). None of these has landed at HEAD. - Mark worker scheduling and GC work queues — Done: worker selection during start-the-world (
829779f4fe,a18aff8057); atomicp.gcFractionalMarkTime(d3aeba1670). Left open: if fewer than 25% of Ps are idle, some user Ps still turn into dedicated workers, and stack-scan resumes still migrate goroutines (a18aff8057). - Stack and register root scanning — Done: stack shrinking disabled whenever a goroutine waits for
suspendG(tracer, mutex profiling), instead of trying to be shrink-safe (bd07fafb0a). Left open: nothing noted. - Address-space layout, tagged pointers and the mem.go layer — Done: one more address bit for tagged pointers for amd64-on-arm64 emulation (
2a7f1d47b0); riscv64 sv39/48/57 detection, cutting startup from ~85 mmaps/66 munmaps to 22/0 on sv39 (dae9e456ae); gccgo build tags (643f80a11f). Left open: nothing noted. - Linear-memory heaps (Wasm and sbrk platforms) — Done: user-visible Wasm heap arena and page-chunk size reduced to 512 KiB; hello-world drops from 8 MB to <3 MB linear memory (
53009b26dd). sbrk mem.go switches to the system stack to avoidmemlockself-deadlock (11d5484190). Left open: nothing noted. - Heap base address randomization — Done: user-visible randomization (
6669aa3b14), on by default (72ba117bda), disabled with ASAN/MSAN (77aac7bb75), test fix (465b85eb76). Left open: nothing noted.
Other changes
- runtime/secret allocation size internal — the secret special records the object size so
memclrdoes not overwrite neighbors (b8c4cc63e7). - hexdumper internal — configurable hexdump (any word size, ASCII column, multi-annotation marks) that replaces
hexdumpWordsoutput in the runtime’s existing dumps, ahead of debuglog integration (e912618bd2). - GC-based goroutine leak detection user-visible — goroutine leak profile computed by the garbage collector, behind
GOEXPERIMENT=goroutineleakprofile(8c68a1c1ab, diag/sched area).
Scheduler and concurrency
From Runtime: scheduler, timers, channels, locks and synchronization (Go 1.18–1.28)
- Timer rewrite: per-P timer heap, timer.lock, and GC-able synchronous timer channels — Done:
Timer.Reset(0)inside a synctest bubble no longer deadlocks onsendLockbeing taken twice (385dc33250). Left open: nothing noted. - Scheduler core: spinning Ms, work conservation, stealing, STW interaction — Done: P-to-M affinity across STW:
sched.midlemade doubly linked so a specific M can be pulled out, Ps restart on their previous M and STW preemption viagoschedImplkeeps the G on its P (2263d4aabd,4ebf295b0b; TestTraceSTW error rate 99.8% -> 1.9%); GC mark workers chosen inprocresizeduring start-the-world to avoid sequentialwakeps (a18aff8057); steal path avoids the 3ususleepbefore takingrunnextwhen the victim is in a syscall, now that such Ps stay_Prunning(d55ecea9e5); debug mode extending_Grunning-without-P windows (7a8d0b5d53). Left open: “best effort” affinity; spinning M can still steal from a slow-restarting P. - Syscall path: eliminating
_Psyscall,_Gdeadextra, and goroutine states — Done: the above commits, plus user-visible runtime/metrics for goroutine scheduling states, total goroutines created and thread counts (13df972f68,ab8121a407,78a3968c2c). Left open: “_Grunning-without-P” debugging only via an env debug mode (7a8d0b5d53). - GOMAXPROCS container awareness and dynamic updates — Done: cgroup v1 non-root mount points handled, path validation and fuzz tests (
c2af9f14b4,cead111a77,67851547d8). Left open: nothing noted. - testing/synctest bubbles — Done: all bubble violations are fatal panics (so e.g.
contextcannot be left inconsistent by a recoverable panic) (a8564bd412); synctest GOEXPERIMENT removed (4c0fd3a2b4); Reset(0) hang fix (385dc33250); specials lock (5dcedd6550). Left open: nothing noted. - Asynchronous preemption: extended register state — Done: scalar registers saved off-stack (
af0c4fe2ca), AVX2/AVX-512 (55d961b202), arm64 Neon (955a5a0dc5), loong64 fcc/lasx/lsx (bd885401d5,99cf4d671c), cherry-picked from dev.simd. Left open: GC scanning of that state. - sync package API evolution — Done:
WaitGroup.Gono longer calls Done when f panics (95a0e5adc1); race annotations kept when panicking (8f74f9daf4). Left open: nothing noted. - Goroutine lifecycle and identity — Done: user-visible goroutine leak profile behind
GOEXPERIMENT=goroutineleakprofile(8c68a1c1ab); DIT inheritance (af14f67911). Left open: experiment only.
Other changes
- GOTRACEBACK for user panics internal —
02d1f3a06b. - Misc internal — recover detection (
7b50024330); eventfd errno (d3be949ada); debug settings initialised earlier (300d9d2714);p.destroyassert (6469954203);castogscanstatusno panic (b5353fd90a);preemptParkdropg after trace (6455afbc6f); pMask dedupe (69e74b0aac); NetBSD sysmon workaround dropped (52b6d7f67a);internal/cpuinline (fe42628dae); loong64 CAS jump (d4b17f5869);secretgoroutine behaviour restored to proposal (63fced531c); dev.simd merge commits (426cf36b4d,9eeb1e7a9a,574854fd86,0710cce6eb,a8669c78f5); panic output priority (89dee70484); openbsd check (87e72769fa);internal/itoaremoval (49c1da474d); fipsWithoutEnforcement(86bbea0cfa).
Data structures and type metadata
From Runtime: maps, built-in data structures, hashing, randomness and type metadata (Go 1.18–1.28)
- Swiss-table maps (GOEXPERIMENT=swissmap → only implementation) — Done: user-visible
GOEXPERIMENT=swissmapremoved, ~6,000 lines of old map code deleted,map_swiss.gorenamed tomap.go(2ae059ccaf,82a1921c3b);Clearonly checks “any full slot” rather than computing the bitset (8098b99547) and only conditionally clears groups when sparse (de5d7eccb9); hoistedh2(hash)out of loops (b096ddb9ea); 32-bit hashes on wasm because 64x64->128 multiplies are not intrinsics there (a26f860fa4, -26% Hash geomean). Left open: nothing noted. - Map hashing and hash functions (memhash, aeshash, fallback hash) — Done: 32-bit hash on wasm (
a26f860fa4). Left open: nothing noted. - Compiler-generated equality/hash functions and type descriptor emission (reflectdata) — Done: ptrmask no longer cleared in
fillptrmask(e0807ba470), type-load folding (5b218461f9),TypeFormade inlineable (dc960d0bfe; also forcesTypeLinksyminwriteTypefor non-shape types so later lookups see the symbol). Left open: “TFlag … decent help … if statically known” (5b218461f9), implemented later (the “TFlag folding” CL 802360 cited in8fc7e764111.28). - internal/abi type layout unification and type metadata (rtype → abi.Type) — Done: the direct/indirect-interface bit moved from the high bit of
KindtoTFlag, so kind access needs no mask;IfaceIndir→!IsDirectIface; gocore and delve had to be updated and the commit lists “TODO: any other tools need updating?” (f7d167fe71). Left open: debugger/tool updates explicitly open. - reflect implementation: performance, allocation and escape behaviour — Done: user-visible iterator equivalents
Type.Fields/Methods/Ins/Outsstyle (e8fdfeb72b);TypeAssert[I]allocates only on success (684e8d3363);TypeForfully inlineable (dc960d0bfe); zero-sized fields of direct structs fix attempted then reverted (b3388569a1,caf9fc3ccd). Left open: the reverted fix. - memmove / memclr / memequal / internal/bytealg assembly optimisation — Done: RISC-V vector
indexbyte,equal,compare(3406a617d9,75ea2d05c0,d83b16fcb8), mips64x/s390x memclr (b6cf1d94dc,a8edd99479), loong64 Index (dd3abf6bc5), arm64DC ZVAmnemonic instead of WORD (e7351c03c8), benchmark for small sizes (e84ed38641). Left open: nothing noted. - Runtime randomness: fastrand, chacha8rand and math/rand/v2 — Done: riscv64 vector implementation (
6f04a92be3), loong64 instruction mnemonics (5defe8ebb3,01c29d1f0b). Left open: nothing noted. - Concurrent hash-trie map (internal/sync.HashTrieMap) — Done: warning about incorrect unsafe usage documented (
1718828c81). Left open: nothing noted.
Diagnostics and knobs
From Runtime: tracing, profiling, metrics and diagnostics (Go 1.18–1.28)
- The new execution tracer (trace v2): generations, per-M buffers, new parser — Done: in-band end-of-generation event, giving unambiguous truncated trace detection and removing batch spilling (
4a7fde922f,77f911e31c); trace-writing fast path: seqlock replaced by write flag (d68aec8db1),m.profStackused instead of zeroedpcBuf(7fbd141de5, trace stacks now obeyprofstackdepth), no unique-string write for empty strings (0bc192368a); reentrancy generation-skew fix (dc9a3e2a65); P-clear vs.GOMAXPROCSrace (1de9585be2);_Psyscalleliminated with tracer shielded from_Grunning-without-P (7244e9221f);Event.Stringimprovements (de2d741667,b80ffb64d8);cmd/traceraw/text converters (bf58e7845e). Left open: alloc/free experiment tests skipped by default (4837bcc92c). - Flight recorder and trace subscribers — Done: in-band
EndOfGenerationforruntime.ReadTrace+ parser (4a7fde922f);Logbenchmark (8d9906cd34); test traces dumped on failure (ee4d2c312d,89614ad264). Left open: nothing noted. - CPU profiling, goroutine profiling, pprof labels and the protobuf writer — Done: fix double
notewakeupwhen two writes hit a fullprofBuf(b604148c4e); remove fixed sleep in CPU profile reader (121bc3e464);GODEBUG=tracebacklabels=1adds escaped pprof labels to goroutine headers in tracebacks, with a newruntime.quotedprint type (6851795fb6);internal/profile.Parseallocs −36% (c5559344ac). Left open: escaping of non-ASCII runes and invalid UTF-8 “can be improved” (commit message); opt-in to experiment with format. - Goroutine leak profile (GC-based leak detection) — Done: user-visible experiment added, default off (
8c68a1c1ab); cleanup of profile writing, stress tests for concurrent leak and goroutine profile requests (8873e8bea2); noopt test fixes (625d8e9b9c). Left open: stress subtests flaky (8f45611e78). - runtime/metrics and MemStats — Done: user-visible goroutine scheduling-state metrics (
13df972f68), total goroutines created (ab8121a407), current thread count (78a3968c2c), cleanup/finalizer queue metrics (a4d99770c0). Left open: nothing noted. - Race detector, ASan, MSan and Valgrind integration — Done: race on linux/riscv64 (
8bcda6c79d); msan uses a dedicated copy routine (5f4b5f1a19); race darwin syso refreshed/restored (8282b72d62,1b263fc604); ppc64x atomic And/Or wrappers (44cb82449e). Left open: nothing noted. - Crash output, runtime/debug, BuildInfo and debuglog — Done:
dlog.hexdump(8c41a482f9);tracebacklabels(6851795fb6, see profiling thread). Left open: nothing noted.
Other changes
- Trace parser/viewer fixes internal —
GoUndeterminedinGoroutineSummary(e38c38f0e5),Event.Rangescope forEvGCSweepActive(2fe5d51d04), StateTransition stack docs (d2b3c1a504), CPU profile view not filtered by stack presence (00b8474e47), thread+proc annotations (704f841eab), recorder header-only write (d1e7f49e3d), s390x race ABIInternal (e92d2964fa). - Trace test tooling internal —
internal/tracetestgen, event constructors for tests (54b82e944e),KernelVersionGE(68c6a73380).
OS layer, stacks and panics
From Runtime: OS and platform layer, stacks, panics and tracebacks (Go 1.18–1.28)
- Defer, panic and recover re-implementation — Done: recover decided by unwinding over logical frames (
7b50024330,08376e1a9c); panics printed before fatal-ing on defer (5cd1b73772); no “recovered” printed for a double panic with the same value (c93766007d); attempt to remove_defer.pcwas reverted (361d51a6b5,48c7fa13c6);gopaniclinkname removed (62741480b8). Left open: wrapper-tracking in the old incremental scheme was only “ripped out in a subsequent CL”. - Frame pointers: explicit NOFRAME, FP maintenance and FP unwinding — Done: FP cleared at thread entry points (
eda2e8c683);getfpmarked nosplit (d4972f6295). Left open: nothing noted. - C-to-Go callbacks: extra-M reuse, system-stack bounds, init gating — Done: cgo call and callback benchmarks (
70a2ff7648,17b57078ab,710abf74da); pointer-panic error messages (91ca80f970);cgoanyparams/returns (a593ca9d65);asmcgocallrobust and 386sigactionvia libc when cgo (c5737dc21b). Left open: nothing noted. - Library entry points and runtime initialization — Done: library entry unification (
fdea7da3e6,45d6bc76af,c9257151e5,eb1c7f6e69,36863d6194) and early debug-setting init (300d9d2714). Left open: nothing noted. runtime/secretand data-independent timing (DIT) — Done: user-visibleruntime/secretpackage (a3fb92a710); DIT inheritance, no thread locking (af14f67911), speculation barrier (2244bd7eeb); experiment guard (8d31244562), documented allocation caveats (516699848b), proposal-conforming goroutine behaviour (63fced531c). Left open: only linux/arm64+amd64; allocation guarantees explicitly loosened.- vDSO,
vgetrandomand fast clocks — Done: vDSO symbol hash test (a2baae68511.19),TestUsingVDSOcheck (98a031193b). Left open: nothing noted. - Signals and async-preemption machinery — Done: AVX2/AVX-512 preempt state (
55d961b202,cef381ba60), loong64 fcc save (bd885401d5), libc sigaction on 386 (c5737dc21b), loong64 (180795ceac1.25, 1.25). Left open: nothing noted. - Syscall layer:
AllThreadsSyscall,internal/runtime/syscall, libc and WindowsSyscallN— Done: Windows/darwin genericsyscallnand moves (98f301cf68,ef40549786,e666972a67,4a0115c886), 64-bit futex (3cf1aaf8b9,4620db72d2),syscallclearenvfast path user-visible (836fa74518, −98% at 100 vars). Left open: nothing noted. - Windows runtime port — Done: windows/arm removed (
dc54d7b607,9b0a507735); runtime types moved tointernal/runtime/syscall/windows(889e71c2ac);CreateThreadretry on access denied (e93f439ac4). Left open: nothing noted. - New, ported and removed platforms — Done: windows/arm and openbsd/mips64 removed (
dc54d7b607,d5dc36af45), riscv64 compressed instructions (b9ef0633f6), s390x regabi (41af98eb83,58a48a3e3b). Left open: nothing noted. - CPU feature detection, GOAMD64 checks and cpu GODEBUG options — Done: AVX-512 CD/DQ and “basic AVX-512” (
e73afaae69), GFNI/VNNI fixes (1ee72a15a3,d00e96d3ae), AVX under macOS 15 Rosetta 2 (9125351583),DebugOptionsinlined (fe42628dae). Left open: nothing noted.
Other changes
- Misc internal — NetBSD sysmon workaround dropped (
52b6d7f67a), netbsd/arm64 entry jump (6d51f93257), dead architectures cleaned from constraints (9a5a1202f4),timedivdeleted (d32b1f02c3), bounds-check constants andPanicBoundsininternal/abi/funcdata.h(741a19ab41,46e5e2b09a), X15 zeroing guarded byGOEXPERIMENT=simdthen low-128-bit only (de39282332,f38e968aba,4c311aa38f), stack object record search tightened (ee0275d15b),osArchInitremoved (b7c20413c5), loong64 R31 save (e8126bce9e). - Linkname docs internal —
8d0bef7ffe;runtime/cgotweaks (dec2b4c83dFreeBSD binuptime). - Stack traces for durable blocking user-visible — “(durable)” tags corrected (
7e0251bf58);Stackcan traceback goroutines in syscall_Grunningwindow (c93cc603cd). - Intrusive list internal — (
5f11275457). procyieldsafety internal — (f838faffe2,79ae97fe9b).
Compiler frontend · types2
From Compiler frontend: the types2 type checker (Go 1.18–1.28)
- Bringing up generics in types2 (type-parameter operands, core/structural types, tparam-as-interface) — Done:
6b32c613camakes typeset return an iterator;0c14000f87removesunder(Type)in favour ofType.Underlying(). - Type sets, union terms, interfaces and constraint satisfaction — Done: typeset returns an iterator (
6b32c613ca);1abc6b0204permits type cycles through type-parameter lists (the old restrictioncc14fcac2b1.18 from 1.18 existed only because of a type-inference deadlock, #49439, and type inference for generic type arguments had since been removed). - Instantiation, Named types, Context deduplication and lazy expansion — Done: a refactor of the type-declaration lifecycle by Mark Freeman.
1099436f1bdefinesNamed.fromRHSas the RHS type expression and setsNamed.underlyingonly once the underlying type is computed (before,underlyingcould temporarily point at another Named). Followups:4bdb55b5b8(Named.underbecomesresolveUnderlying),cf826bfcb4(set exactly once),39fd61ddb0(guarded byNamed.mu),b8aa1ee442/d09a8c8ef4(fewer locks),8401512a9b/9fcdc814b2/03bd43e8bbrename namedState values andresolvetounpack,b2af92270fverifies state-mask transitions in debug mode,d8a32f3d4b(wrapfromRHSintoNamed.rhs). The documented lifecycle also removes the package-levelunder(Type)function in favour ofType.Underlying()(0c14000f87). Also:7b53d8d06eadds aloadedstate between loader calls and constraint expansion, to fix a deadlock whenSetConstraintis called from a lazy loader that recurses back to the loaded type. - Generic type aliases and
Aliastype nodes — Done: alias handling folded into the type-declaration lifecycle (1099436f1b). Also:d28b27cd8eusesnilrather thanInvalidfor incomplete explicit aliases, which also lets Invalid aliases be memoized. - Type declaration cycles, valid-type detection and the object path — Done: the lifecycle refactor (
1099436f1b,57362e9814direct cycles checked as a separate phase,1f4d14e493package-level object sort as its own phase,4fef9f8b55object path for grouped declarations,3531ac23d4,ff2fd6327e,c048a9a11f,1274d58dac). - Per-file language versions and version gating — Done:
06e57e60a7only report version errors ifnew(expr)is otherwise valid. - Language features as seen by the type checker (by release) — Done: user-visible
a27261c42fnew(expr)(#45624; version gate inversion.go);06e57e60a7. - Error reporting: codes, messages, and sub-errors — Done:
cae45167b7,532e320349(go/types: diagnostics for type shadowing).
Other changes
- Simd tooling excludes internal —
257c1356ec;0f6397384brelaxesNewSignatureTypeforappend(slice, str...);cdf64106f6. - Small fixes, unifier/assignment refactors, message and tracing tweaks internal — 6 commits:
5a42af7f6c,d8a32f3d4b,3be9a0e014,e704b0993b,efe9ad501d,2622d2955b
Compiler frontend · syntax, IR, generics
From Compiler frontend: syntax, IR, unified IR and the generics implementation (Go 1.18–1.28)
- Generics via GC-shape stenciling and runtime dictionaries — Done: never shapify an already-shaped pointer (
a5866ebe40). - Unified IR: one serialization for noding, stenciling, inlining and export — Done:
aliastypeparamsGOEXPERIMENT deleted (00a7bdcb55); dedup in mknode (ba840c1bf9). - Static initialization and package init — Done: global
new(expr)fix (a8291eb614), dead code removal (317be4cfeb). - Compile-time performance, concurrency and the self-PGO’d compiler — Done: starting heap boost made independent of
-cand raised to 128 MiB nominal, plus-d=gcstart=NMiB knob (ab2829ec06). - Frontend support for new language features and spec changes — Done: user-visible
new(expr)(7bc1935db5,0f31d742cduntyped fix), spec: cycle restriction for type parameters removed (4684a26c26) and alias RHS rule (790384c6c2),testing.B.Loopkeep-alive semantic (22f24f90b5,3fd9cb1895,509ddf3868,2ac1f9cbc3). - SIMD frontend: the “midway” source-to-source translator — Done:
dev.simdbranch infrastructure: k-register support (11d2b28bff), bodyless intrinsics (88c013d6ff), devel compiler not treated as release (4150372a5d,ebb72bef44), early prototype removed (b4d1e018a8).
Other changes
- Stack-allocated append backing stores internal —
32f5aadd2f; growslice free4879151d1d. - Saturating float-to-int internal — conversion made consistent between amd64 and arm64 (
0e466a8d1d), new saturating disabled (7056c71d32). - Devirtualize analysis internal —
de9da0de30. - Heap start internal —
ab2829ec06. - Old typechecker and IR node-model cleanup (1.26) internal — removal of unused typecheck/ir/types code (Ntype, CurFunc uses, vargen, Resolve dependencies), more typed IR node construction, simplified DeclFunc/NewMethodExpr and constant handling (
26338a7f69,16c0f7e152) - Housekeeping (1.26) internal — dead-code removal, ioutil/seek/slices/atomic-type replacements, README edits, debug-flag removal, assorted small bug fixes and doc comments (
4ee0df8c46,5024d0d884,6346349f56,9035f7aea5,aea881230d)
Middle end and SSA optimizer
From Compiler: middle end and SSA optimization (Go 1.18–1.28)
- Inliner: budget, closures, and the interleaved inline/devirtualize driver — Done:
- Superfluous re-slicing
s[:]is ignored in cost (a67977da5e). - Functions using
runtime.deferrangefuncare not inlined (cd668d744f).
- Superfluous re-slicing
- Allocation avoidance: stack-allocated slice backing stores and allocation-free literals — Done:
appendbacking stores are stack-allocated even when the result escapes, throughmove2heap(32f5aadd2f).move2heapis no longer placed inside loops deeper than the declaration (3c6bf6fbf3).len([]T{})is propagated intomake(84db201ae1).- Alias analysis plus
runtime.growsliceNoAlias(4879151d1d) sit behindGOEXPERIMENT=runtimefreegc, which was set off by default for 1.26 (5a347b775e).
4879151d1dnotes that the final slice memory is never freed and is left to other work;runtimefreegcstays off. - Prove pass and bounds-check elimination: from poset relations to a dense limit table, topo-sorted walk, and division-aware proofs — Done:
- Transitive len/cap properties (
a3295df873) were reverted (d0a64f7969, #74974). Transitive proofs for safe unsigned and signed adds and subs landed instead (e5f202bb60,1a72920f09,d574856482,f32cf8e4b0). - Loop-return domination is checked in both controls (
8cd85e602a). StringLenrules (f703dc5bef,62cd044a79).- Maximum len/cap from element size (
9fcb87c352). - Bounds checks eliminated for slices of the same length (
519ae514ab). - Double-offset
IsInBounds(1caa95acfa), slice len/cap arithmetic (d91148c7a8, fixed inf84f8d86be), chunked indexing with reslicing (20c9377e47). - Slicemask elided for
len==c>0(ec70d19023,1bca4c1673). - Topo-sort walk (
53be78630a), with the #68857 workarounds removed (a50de4bda7,2ce5aab79e). - The divisible/divmod passes and “middle opt” (
9bbda7c99d). Unsigned rounding-up divide (77dc138030). Multiplies proved to be by 0 or 1 becomeCondSelect(24af441437). - Subtract idioms (
c12c337099). Rsh becomes RshU for positive arguments, with unsigned relations propagated (ec92bc6d63,3820f94c1d). Right shift modelled precisely (235b4e729d). - Unsigned-division control-flow fix (
dc42565a20). Overflow fix (f87aaec53d). - Unsigned power-of-two detection (
f3582fc80e,bd94ae8903,7b67b68a0d,26da1199eb,72147ffa75,84b070bfb1). - Cleanups (
a0f33b2887,b8468d8c4e,bc15963813,e64023dcbf). Brute-force limit tests improved limit addition (03fcb33c0e,37ce4adcd4).
9bbda7c99dmessage debates the naming of the opt passes (“Perhaps instead they should be generic, opt, and late opt?”). - Transitive len/cap properties (
- Memory-op optimization: memcombine, dead stores, store-to-load forwarding, alias analysis, mem2reg — Done: DSE tracks multiple shadowed ranges (
d474f1fd21). Dead auto elimination became more aggressive (c7ccbddf22). Stores to unread parameters are removed (38b26f29f1, also on dev.simd as2b50ffe172). Left open: nothing noted. - Lowering of builtins to memory ops: memmove/memclr/memequal inlining and generated equality — Done: the
MemEqintrinsic, initially on arm64 (dda7c8253d).memequalis expanded for lengths 3, 5, 6, 7 (a5fa5ea51c). Left open:dda7c8253dsaysLoweredMemEq“may be lowered differently for more constant size cases in future (for other targets …)”. - Switch lowering: jump tables, type-switch caches, and switch lookup tables — Done: propagation of an out-of-range jump-table index was fixed (
b6b8b2fe6e). loong64 jump tables (af6999e60d). Left open: nothing noted. - Static devirtualization and shape-aware type-assertion pruning — Done: user-visible more calls devirtualized.
- The concrete-type analysis (
de9da0de30, #69521, #64824). - Fixes for
OCONVNOP(5a9ef44bc0), non-PAUTO assignments (4dbf1a5a4c), positions (0ddb5ed465) and typos (b9d86baae3).
- The concrete-type analysis (
- testing.B.Loop support in the compiler (bloop) — Done: user-visible the bloop KeepAlive pass (
22f24f90b5). Only addressable nodes are kept alive (509ddf3868), the name lookup was fixed (3fd9cb1895), and unnecessary interface conversions are avoided (2ac1f9cbc3). Left open: thebloop.goTODO aboutOpVarLive. - Sparse conditional constant propagation (sccp) — Done: sccp debug messages gained position info (
9a77aa4f08). - Branch-free lowering: CondSelect-into-math and ARM64 CCMP — Done: CondSelect→math for +1 and doublings/halvings (
fcd28070fe,ce05ad448f);cmov(x,x,cond)→x(94645d2413); branchelim supported arches moved intoConfig(2d33a456c6); CCMP aux type and generation (10ac80de77); fused NaN checks with other comparisons (97fd6bdecc); bool→int→bool roundtrip removal (73d7635fae). - Constant-folding loads from type metadata and dictionaries — Done:
abi.PtrType.Elemloads (df29038486, symbol marked usedd767064170); fixed-load logic consolidated (b915e14490);abi.Type.{Size_,PtrBytes,Kind_}loads, with counts in std/cmd such as 75 for Kind_ (5b218461f9); nil checks on.dictremoved (97da068774). - SSA values for zero-sized and multi-field direct-interface types — Done: multi-field structs stored directly in interfaces (
cd55f86b8d,03ed43988f);StructSelectof interface data fields and moreStructMakeargs allowed (bcd25c79aa,72e8237cc1). - ARM64 load/store pairing (LDP/STP) — Done: stp merging for non-sequential cases (
4c63d798cb).
Other changes
- Misc internal — dedupe instructions when rewriting func results (
cc571dab91),containsUnavoidableCallfix (5045fdd8ff), no optimization of panicking interface compare (bd4dc413cd), phi line numbers (61d1ff61ad), bisect for float-to-unsigned (48bb7a6114), dev.simd generator/intrinsic plumbing (~10 commits, e.g.88c013d6ff,ce0e803ab9,31b664d40b). - dev.simd compiler support internal — adapters, intrinsic generation for bodyless functions, CPU-feature scope tracking, TERNLOG rewrite for logical trees (
f6b4711095), inliner tweaks favoring SIMD functions and closures-of-SIMD (48756abd3a,e452f4ac7d), prove enhancements for double-offset IsInBounds, slice len/cap and chunked indexing (832c1f76dc,2ca96d218d,58fa1d023e; “Prove pass” extension), slicemask removal (8e60feeb41,7c84e984e6),d2270bccbd,04b1030ae4. - Bounds-check failure with less code internal — idx and len remembered without fixed registers before calling panicIndex (
3024785b92). - Size-specialized malloc calls internal — direct calls to generated size-specialized malloc functions when size is known at compile time (
19a30ea3f2). - Constant-time intrinsics user-visible —
crypto/subtleConstantTimeSelect/Eq intrinsics, exposed to FIPS packages (2c91c33e88,00ee1860ce). - Misc rules/fixes internal — Add64carry with unused carries → Add64 (
5453b788fd), single-bit-difference comparisons (0a569528ea), negation into multiplication (2cdcc4150b,e7d47ac33d), CSE prefers statement-marked value (b1f3e38e41), duplicate nil check to both branches of write barrier (f9e61a9a32), checkptr forunsafe.Add(5ab9f23977), InlMark speculatable (084c0f8494), sparse map generics (6505fcbd0a).
Backends and assemblers · architectures, ABI
From Compiler backend: architectures, register allocation, ABI and assemblers (Go 1.18–1.28)
- Register-based calling convention (ABIInternal) ports beyond amd64 — Done: s390x register ABI: info
73b6aa0fec, initial spill81242d034c, CALL ops24697419c5, prologue85e6080089, enabled89552911b3. [dev.simd] morestack spills the correct SIMD registerc0f031fcc3.obj: argp adjustment for wrapper frames removed6f6c6c5782. Left open: nothing noted for 386/arm/mips (they never got commits). - Register allocator, scheduler and block-level backend passes — Done: ops may specify clobbering of an input register (copy made before clobber, like resultInArg0)
89a0af86b8, used byensure we use allowed registersfix5a56d8848b; faster regalloc liveness (fill loop headers instead of iterating to a fixpoint; passes over CFG from loop-depth to 2; liveness time 225→150 ms on cmd/compile/internal/ssa)16705b962e; rematerializable values’ output reginfo respected10e7968849and removed from the live set across calls (arm64 .text −0.34% on preprofile)284379cdfc,9bbea0f21afixedreg values always available;4d0658bb08prefer fixed registers (zero register) for values;containsUnavoidableCallfixed5045fdd8ff; loopRotate handles nested loops592c2db868; irreducible loops no longer trustedf15cd63ec4; stackalloc liveness switched to sparse path exploration (−74 ms CPU on a cmd/compile build)4e761b9a18;reduce stack object livenessetc. - amd64 code generation and GOAMD64 microarchitecture levels — Done: duff devices replaced by generated loops (see Move/Zero thread);
zerorangesimplifiedb10eb1d042; do not Zext bools before CMOV1662d55247;bits.Mul64on 32-bit machines1e5bb416d8; VEX/k-register/AVX-512 plumbing for SIMD (see SIMD hooks thread). - arm64 code generation and assembler — Done: generated loops replace duff (below); new bounds-check strategy
394d0bee8d; NEON inLoweredMemmove/MemmoveLoop(Raspberry Pi 5: −22.5% geomean)5c9a26c7f8; CCMP generation introducesARM64ConditionalParamsaux (condition, NZCV, constant)10ac80de77; 32×32→64 multipliese1a12c781f; PAC instructions11d3d2f77d; shorter constant integer loads3b3d6b9e5d; fold boolean NOT into branchesba634ca5c7; conditional-instruction type correctiond0d0a72980; ARM64RegisterExtension moved into obj45eee553e2. [dev.simd] arm64 helpers (FMOVQ vector load/store, VMOVI16B)9076ed87501.27 (1.27). - riscv64 compiler and assembler (RVA profiles, vector, compressed) — Done: compressed (RVC) instructions: encodings
924fe98902, enabled for runtime/sysb9ef0633f6, assembler support with better bit-pattern encodinga15d036ce2,0f9c8fb29d, use in generated code9859b43643; FCLASS for infinity/subnormal tests320df537cc,34aef89366; float↔︎int register moves via FMVfcc036f03b; Zicond assembleref05b66d61; generated loops replace duff (below); segment/fault-only-first vector loads371c1d2fcb,6b8d507508; store-to-load forwarding rules4373754bc9; assembler docsb24aec598b; generic CSR opsdd8276657f. - loong64 backend and assembler — Done: ALSL.{W,WU,V} + ADDshiftLLV multiplication rules
4c7362e41c,bd71b94659,90b7d7aaa2; jump tableaf6999e60d; generated loops replace duff7bba745820,91e76a513b,4f7bbc62c7; LSX-basedLoweredZeroLoopc4bb9653ba; multiplicationse071617222,a552737418; 32×32→64feae743bdb; new bounds-check strategy5216fd570e; MOVVP prologue optimization revertedeb7c67fdc9→dd1d597c3a; many instruction additions (LDPTR/STPTR882335e2cb, ADDU16I.Dddce0522be, FSELee7bb8969a, VPERMI/VSHUF/VEXTRINS etc.). - Duff’s device replaced by generated loops; Zero/Move lowering — Done: amd64: DUFFZERO and DUFFCOPY replaced by generated loops (
eb7f515c4d,ec9e1176c3; the DUFFCOPY change was reverted4e182db5fcand relandedca66f907dd); arm64 (28aa529c99,15d6dbc05c) with runtime duff removede4291e484c; riscv64 and loong64 (879ff736d3,4dac9e093f,7bba745820,91e76a513b) with runtime duff removed (b9a4a09b0f,4f7bbc62c7);zerorangesimplified on amd64/arm64/riscv64/loong64/mips/mips64 (b10eb1d042,5e94d72158,77643dc63f,e0870a0a12,06e791c0cd,bb48272e24; mips fix0b26678db2); zero constant register reuse on mips64xbdd51e7855. - Bounds-check calls: new “panicBounds” strategy — Done: per-arch migration: arm64
394d0bee8d, amd64/386076eae436e, arm327dccd6395c, loong645216fd570e, mips649f9d7b50e8, mips328330fb48a6, riscv6495693816a5, s390x7a1679d7ae, ppc64802d056c78; old-style calls removed21ab0128b6; bounds-check slice SUB/SUBconst compare optimizationdcb479c2f9, shift-through-AND folding for slicesbd80f74bc1; bounds report fixaf03343f93; ppc64 panicBounds frame made smallere0a1ea431c. Left open: nothing noted. - Late-lower pass, memory-op combining and arch-independent rule migration — Done: ARM64 and others’ rules for fold negation into multiplication
2cdcc4150b;branchelimsupported arches moved to Config2d33a456c6; SIMD rule file plumbingce0e803ab9. - Jump tables for switch statements on more architectures — Done: loong64
af6999e60d. - Multi-word arithmetic, intrinsics and carry-chain support — Done: bits.Mul64 (Mul64uhilo, Hmul64, Hmul64u, Avg64u) on all 32-bit systems, making constant 64-bit division emit directly (i386 i/999: 7 mul→4 mul)
1e5bb416d8; wasm Avg64u/Hmul646e165b4d17. - WebAssembly backend — Done: signext/satconv always enabled
742f92063e; unaligned memory ops53ad68de4b; Avg64u/Hmul64(u)6e165b4d17; FP→int32/64 match change reverted3bc9d9fa83. - s390x, MIPS, 386 and 32-bit ARM backends — Done: user-visible all remaining windows/arm code deleted
98238fd495; 386/wasm FP→int conversion change reverted6d5b13793f; s390x float min/maxcedf63616a; 386 8-bit semantics78d75b3799-class reverted; s390x MVCLEd71d8aeafd. - Backend hooks for GOEXPERIMENT=simd (amd64 AVX-512, arm64 SVE, wasm) — Done: k registers
11d2b28bff, register shapes (1161228bf1,6bc3505773,884f646966,1b87d52549), simdGen prog writerc81cb05e3e, AVX-512 upper regs/masked loads/stores (8db7f41674,1ac5f3533f), VPTESTf1e3651c33.
Other changes
- Optimize abi.Type.GCData loads
f1fd13016a; MemEq intrinsic forruntime.memequaldda7c8253d. - prove div/mod internal — new divisible/divmod passes run after prove (“middle opt” and “late opt”) so prove can reason about div/mod bounds
9bbda7c99d. - Enforce SP-based locals
eef5f8d930; uintptr→unsafe.Pointer unsafe-point (1.21)0384235a151.21. - 32 small obj/loong64 and loong64 asm commits internal — e.g. obj/loong64: add {V,XV}{BITCLR/BITSET/BITREV}[I].{B/H/W/D} i; obj/loong64: add [X]VLDREPL.{B/H/W/D} instructions support; cc: avoid extending when already sufficiently masked on loon. (
b2960e3580,d44749b65b,b1e933d955,b266318cf7,a62f72f7a7,73ff6d1480,a7f05b38f7,9763ece873,9632ba8160,1843f1e9c0,fa706ea50f,6b837a64db,b8cc907425,731e546166,c552ad913f,f5b20689e9,6447ff409a,916e682d51,954fdcc51a,dadbac0c9e,ad5e941a45,2e2072561c,8111104a21,f01a1841fd,abb241a789,7f2ae21fb4,cdba82c7d6,a318843a2a,c0f02c11ff,c6d64f8556,a9093067ee,e0a4dffb0c) - 2 small obj/x86 and amd64/386 rules commits internal — e.g. [dev.simd] cc: add simdFp1gp1fp1Imm8 helper to amd64 code ge; obj/x86: handle global reference in From3 in dynlink mode. (
7c6ac35275,4b740af56a) - 59 small ssa/regalloc/liveness/obj generic commits internal — e.g. [dev.simd] cc: glue codes for Shift and Rotate; [dev.simd] cc: support simd(imm,fp) returns gp; [dev.simd] cc: make regalloc simd aware on copy. (
4fda27c0cc,0d8cb89f5c,d8fa853b37,0870ed04a3,5429328b0c,9ea33ed538,08cd62e9f5,ab7f839280,ccb43dcec7,3f789721d6,a0b87a7478,957f06c410,6f7a1164e7,08bec02907,6fbad4be75,4ee0df8c46,880ca333d7,fb8bbe46d5,2b622b05a9,82d056ddd7,bcd25c79aa,b226bcc4a9,d5dea86993,08ab8e24a3,9783f86bc8,e001300cf2,908e3e8166,7380213a4e,a5137ec92a,8d874834f1,4a3ea146ae,6890aa2e20,83714616aa,3492e4262b,356c48d8e9,fcb893fc4b,1e5631d4e0,3ec0b25ab7,dabe2bb4fb,0e590a505d,18cd4a1fc7,78ef487a6f,d9751166a6,e34ad6de42,ad3db2562e,0ab038af62,7ae0eb2e80,63a09d6d3d,578777bf7c,003b5ce1bc,f0e281e693,d4830c6130,ba72ee0f30,647c790143,a5a249d6a6,30c047d0d0,d8269ab0d5,e84983fa40,9b2e3b9a02) - 1 small cmd/asm commits internal — e.g. cmd/asm: process forward jump to PCALIGN. (
1ad30844d9) - 10 small obj/riscv and riscv64 rules commits internal — e.g. cc: remove sign extension before MULW on riscv64; obj/riscv: remove ACFLWSP/ACFSWSP and ACFLW/ACFSW; obj/riscv: simplify validation and encoding of raw instructi. (
27ce6e4e26,76d088eb74,e5688d0bdd,2469e92d8c,e2cfc1eb3a,d7a52f9369,a7d174ccaa,1e5e6663e9,4ca048cc32,a0e738c657) - 1 small mips/s390x/arm/wasm commits internal — e.g. cc: make wasm match other platforms for FP->int32/64 convers. (
8d810286b3) - 1 small obj/arm64 and arm64 rules commits internal — e.g. obj/arm64, image/gif, runtime, sort: use math/bits to calcul. (
a18294bb6a)
Backends and assemblers · SIMD
From SIMD: the simd packages and their compiler support (Go 1.18–1.28)
- Compiler SIMD type system, ABI and register-allocation support — Done: register shapes, vec/mask SSA types and the first AMD64 SIMD lowering (
8ecbd59ebbgenerated 63k lines:simdssa.go,simdAMD64.rules,simdAMD64ops.go,simdgenericOps.go,simdintrinsics.go); helpers moved from generated code into the compiler (6c50c8b892); vectors made uncomparable (5a78e1a4a1); CPU-feature pass (d2270bccbd,ba72ee0f30); X15 low-128 zeroing (f38e968aba). Left open: spilling masks (“will depend on the architecture”), 256/512-bit zero values built on the fly, VZEROUPPER not evaluated (f38e968aba). - simdgen: the instruction-table-driven generator — Done: first generated amd64 code (
8ecbd59ebb); generator output ordering fixes (3a4d10bfcaremoved a map iteration,35b8cf7fed,e62e377ed6); simdgen migrated into the repo (b7c8698549) with etetest.sh rewrite (8b90d48d8c); tests generated in repo (88568519b4,a24ffe3379); memory operand parsing and merge (f42c9261d3,0b323350a5,5a0446d449); SHA features parsed from XED (2b8eded4f4); feature implications (9ef1692c93). Left open: the generator depends on XED data path ($XEDDATA); the API source of truth is spread over YAML categories, hand-written files and docs. - AMD64 archsimd API: AVX, AVX2 and AVX-512 operations — Done: user-visible the whole API above reached master through reverse merges starting
d4f5650cc5(2025-11-24),2b62144069(12-03),9e09812308(12-08); package renamedsimd->simd/archsimdwith package doc (144cf17d2c,1da0c29c2a); doc rewrites (05e41225f6..d64add4d60),Mask.AsIntMxN->ToIntMxNand ToMask only on integer vectors (f110ba540c,c0ba519764); Broadcast rename (8ac4477d83); tests skipped without AVX (1b291b70df). Left open: many names still to rename (see API shaping thread);DotProductQuadrupleremoved pending redesign (70c22e0ad7). - Mask representation, masked operations and merge peepholes — Done: user-visible mask types and conversions (
a034826e26,6f7a1164e7),.Masked()peepholes (ede64cf0d8,cf31b15635), merging ops (86b4fe31d9), emulations of mask/merge methods for AVX2 (94d72355f6,2080415aa2), mask load/store removal (2e71cf1a2a),ToMaskinteger-only (f110ba540c). Left open: IfElse naming, Merge emulation wrongly named at first (“under a wrong name; subsequent CLs will … rename”,94d72355f6). - Memory operands, constant-immediate forms and jump tables — Done:
38b76bf2a3,5a0446d449,48f366d826,3ec0b25ab7,4eb5c6e07b,443b7aeddb,c4fbf3b4cf,3f6eabdf09. Left open: bounds-checked jump table “in the next CL” (38b76bf2a3). - dev.simd branch, GOEXPERIMENT=simd lifecycle and merges to master — Done: user-visible flag added (
4d2c71ebf9), branch default-on (2ef7106881), reverse merges:d4f5650cc5(2025-11-24),2b62144069(2025-12-03),9e09812308(2025-12-08); package moved tosimd/archsimd(144cf17d2c). Left open: experiment default off;simdname was reserved for a portable package. - API shaping and renames before stabilisation — Done:
ead249a2e2,2c25f3e846,c2d775d401,416332dba2,0978935a99,3fdd183aef. Left open: more renames. - Emulation of missing instructions and test infrastructure — Done:
94d72355f6,2080415aa2,be57d94c4c(Not),88568519b4. Left open: emulations named “wrong name” first.
Other changes
- AMD64 API fix-ups from the first months (grouped, ~38 commits) user-visible — directory bootstrap and docs (
fdb067d946,3df41c856e,bbb6dccd84), regenerated/ordering fixes (7392dfd43e,ee1d9f3f85,21d6573154,9ea33ed538,08ab8e24a3,6af8881adb,e4d9484220,fe040658b2,f7c6fa709e), signature/param-order fixes (1be5eb2686,ef5f6cc921,c61743e4f0,17baae72db,b69622b83e,8eb5f6020e,4d26d66a49,d3a0321dba,baa0ae3aaa,42cda7c1df,76dddce293), new ops (f5f42753abVDPPS,58cfc2a5f6VPSADBW,c39b2fdd1eVPLZCNT,0d8cb89f5csimd(imm,fp)->gp returns,9a934d5080float GetElem,ec5c20ba5aconversions,fa1e78c9ad/baea0c700bAVX shuffles,74ebdd28d1Select128FromPair types,896f293a25DotProductQuadruple peepholes), AVX512/AES feature checks (dd63b7aa0e,20b3339542), removals from the exported API (972732b245move,4004ff3523FlattenedTranspose,bf77323efaunexported methods in own file), testing hooks (af6475df73), generator cleanup (19b4a30899,0f620776d7). - Fast transpose example internal — demonstrates data-movement instructions for transposes (
1c961c2fb2). - Part loads and subvector load/store user-visible —
{Int,Uint}{8x{16,32},16x{8,16}}subvector loads/stores from slices (24f2b8ae2e); slice funcs moved to generated code (d375b95357). - Checking loops replaced by slice-checker internal (
f51ee08905). - Package restructure internal —
internal/simddeleted (62e1fccfb9), test tweaks in go build and go/doc (eba2430c16).
Linker and object files
From Linker, object files and debug info (Go 1.18–1.28)
- Relocation-free pclntab and funcdata (offsets instead of relocations) — Done:
.gosymtabno longer generated (empty since Go 1.2)7347b54727;textStartremoved from pcHeader (the only pclntab relocation)0e1bd8b5f1; pclntab moved out of relroad3ccd92e4; funcdata symbols placed in.gopclntabb437d5bf36;findfunctabtoo312b2034a4; pclntab magic moved tointernal/abi43cfd785e7; moduledata in a dedicated.go.modulesection9f5cd43fe6; DWARF is generated for moduledatab5f6816cea; cutab length fixae8eba071b. Left open: the pcHeader zero placeholder “can be removed at some point in coordination with Delve” (0e1bd8b5f1). - Type, itab and typelink layout (.go.type section, relro rework) — Done: ELF section headers sorted by address and shdr/shstrtab built from actual sections (no more
.go.fuzzcntrsstring in every binary)0ff323143d,4bc3410b6c. Left open: nothing noted. - //go:linkname restrictions and the blocklist — Done:
runtime.addmoduledatalinkname disallowed9f6936b8da; more names blocked34af879dde. Left open: nothing noted. - DWARF quality for debuggers (types, variables, trampolines) — Done: types only referenced through interfaces are exported to DWARF by scanning function relocations, fixing unreadable runtime types in Delve/viewcore after 1.25
80038586ed. Left open: nothing noted. - ELF/relro/hardening and external-link policy — Done:
.deffile for Windows DLL exports instead of__declspec(dllexport)eaf2345256; weak binding on Darwin8cf7a0b4c9. Left open: nothing noted. - Per-platform object formats and internal linking (Mach-O, PE, XCOFF, wasm, ppc64, riscv64, loong64) — Done: internal linking for windows/arm64
9e25c2f6de; MSVC clangc70713da82; Mach-O ARM64POINTER_TO_GOTandSUBTRACTOR6e95748335,7c8166d02d; darwin/386 and windows/arm relocations removed17a0fabc43,ca0e03560d; loong64 relocs4b0e3cc1d6. Left open: nothing noted.
Other changes
- Windows and MSVC clang internal —
-wmade consistent and passed in external mode (22ac328856,6dceff8bad), no-Wl,-Son AIX/Solaris (459f3a3adc,047c2ab841),.defwith MSVC clang and LIBRARY only for cshared (adce7f196e,ee5369b003), race with MSVC clang (e603e9834e), PE reloc mapping simplified (594deca981). - ELF cleanups internal — shdr/phdr slices (
6525f46707,b0c278be40), section name offset fix (32a9804c7b), DWARF compress alignment per section (8806d53c10), runtime.buildVersion with experiments valid (9daaab305c),-V=goexperimentspecial case removed (ccd389036a),get_pc_thunkduplicate (9ba0948172), plugin capability flag (d14b6427cf), posix_fallocate on netbsd/freebsd (ce3f3e2ae7,d52a56cce1), OpenBSD buildid workaround removed (3bea95b277), riscv64 relocs (ffc85ee1f1), Mach-O SUBTRACTOR fix (61bf26a9ee), goobj error output (5c8624a396), arm64 LR/FP save redo reverted (719dfcf8a8,c938051dd0). - Data section selection in internal linker user-visible (
cf5e993177).