Go 1.13
New escape analysis on by default. Stack-allocated defer records. Background scavenger. Go 2 number literals and signed shift counts. Spec-compliant package init order. sync.Pool victim cache. internal/reflectlite.
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)
Background scavenger, first-fit address-ordered allocation, huge-page-aware scavenging, effective GOGC.
- GC pacer: trigger controller, assists and background utilisation — Done: effective GOGC and no GOGC in minimum sweep distance (
5c22842cf2,4a7d5aa30b,7da03b9fbb). Left open: nothing noted. - Stack scanning: conservative, precise by frames, stack barriers, hybrid barrier, async safe points — Done:
gp._panic, defer closure scanned (af8f4062c2,4f4c2a79d4) withclobberfree; stack freeing separated from shrinking (68d89bb8e0). Left open: nothing noted. - Size classes, tiny allocator and mcache/mcentral — Done: division → multiply/shift (
6ca51f7897). Left open: nothing noted. - Span lifecycle in mheap: free lists, treaps, first-fit and the page reclaimer — Done: first-fit, unified treap, in-place split, filtered iteration, treap iterator conversions (
40036a99a0,8c05d67661,9baa4301cf,5c15ed64de,fa8470a8cd,7bb8fc1033,7b33b6274f,a62b5723be,f4a5ae5594,ff70494b75). Left open: the heap lock held for all span operations, and a tree allocator that would not scale: replaced in 1.14. - Scavenger: returning memory to the OS — Done: background scavenger and removal of periodic scavenger (
fe67ea32bf,eaa1c87b00), huge-page-aware (a62b5723be,31c4e09915,8c3040d768,f4a5ae5594,ff70494b75,4e7bef84c1newly mapped memory is marked scavenged because on most OSs untouched pages are not resident). Left open: scavenging pacing relied on estimates; 1.14 made it self-paced. - Heap address space: contiguous arena to sparse arenas — Done: wasm memory handling (
460f9c6068optimise memory allocation on wasm,c2d9eea1f1no arena hints on wasm), sbrk alignment (5b15510d96), first persistentalloc chunk aligned (c5babcc485). Left open: nothing noted. - Allocation-site profiling and GC debugging modes — Done:
clobberfree(af8f4062c2). Left open: nothing noted.
Other changes
- Misc internal — latent TODOs resolved (
9c86eae384), debugging prints removed (12e63226b9), scavenge-in-coalescing guard (2ab6d0172e),scavengeLargestmerge (23d4c6cdd6), heap lock stack growth invariant (7ed7669c0d).
Scheduler and concurrency
From Scheduler and concurrency runtime (Go 1.0–1.17)
Pool victim cache and lock-free queues, inlinable sync fast paths, preemption on many short syscalls, poller error reporting; threads: Pool, Mutex, preemption.
- The G-M-P scheduler: from global-lock M:N to per-P run queues, spinning Ms and work stealing — Done: look for an idle P when switching to a GC worker or trace reader
e56c73f17b;initP/destroyPsplit out of procresize9d088fbfda; switch to P0 before destroying current P4598c23c6c;acquirem/releasemused more widelyea9859f858; P statuses documentedb0c6165605. - Preemption: cooperative stack-check preemption (1.2) to signal-based asynchronous preemption (1.14) — Done: user-visible a goroutine that runs many short syscalls is now preempted (the 10ms rule did not cover them)
4166ff42c0. - Network poller: from the netFD select loop to the runtime-integrated epoll/kqueue/IOCP poller — Done: user-visible event-scanning errors reported on read events
a5fdd58c84, narrowed to critical errors only451a2eb0ab, disabled on Solarise0181ff52a. - Semaphores, runtime locks and Notes — Done: AIX
noteclear1956b28ae3;notetsleepsanity checkac40a7fb9e; js/wasm lock implementationcd03664f82. - sync.Mutex, RWMutex, WaitGroup, Cond, Once — Done: inlinable fast paths (above).
- sync.Pool — Done: lock-free queues
2b60567002,57bb7be4b1,d5fd2dd6a1, victim cache2dcbf8b369. - Fast random numbers for the scheduler — Done: randomized package initialization order in race mode
8515d9cf65.
Other changes
- Misc internal —
eaa1c87b00(periodic scavenging removed),d016330241(debugCall whitelisting),98c5a56f01,7a43f8a5fb,480df2c2b4,db42bb3b70,0188cb0e8a,f448c212a1,ad832284c7,b51c157025,bc593eac2d,91c385b393,29f14f058d.
Data structures and type metadata
From Runtime data structures and type metadata (Go 1.0–1.17)
internal/reflectlite, reflect.IsZero, ifaceeq direct fast path, kindNoPointers removed, StructOf GC fixes, arm bytealg.
- Hash map core: from the first hashmap.c to the 8-entry bucket design — Done: “key”/“element” terminology applied across the implementation (
73cb9a1cb3). - Compiler-generated equality and hash functions — Done: argument array no longer noalg (
343b7fa626). - Runtime type descriptors: layout, shrinking and name encoding — Done:
kindNoPointersremoved (db16de9203). - Interface values, itabs and type assertions — Done:
ifaceeqdirect fast path (694cd005c3),fun[0]only on success (8d86ef2216). - reflect dynamic types: ArrayOf, ChanOf, MapOf, SliceOf, FuncOf, StructOf — Done: StructOf GC program fixes (
05b3db24c1,9dc3b8b722,17f888c5a8). - reflect.Call, MakeFunc, method values and argument-frame GC precision — Done:
MakeFuncassignment conversion of returned values and better panic forValue{}(fe83731651,04845fe78a),callMethodaligns first argument (5f45a3337e). - reflect performance, caches and API additions — Done:
IsZero(c40bffd905), inlinablemustBe*(788e038e5d), method sets documented sorted (f33b67b870). - internal/bytealg and string/byte comparison primitives — Done: arm word-wise Compare/Equal, shared code, Count (
029a5af6a1,a734601bdf,14a58d65e3,3496ff1d19,3cb1e9d98a), simplifiedEqual(ca0c449a6b), wasm memchr (4a7cd9d9df). - internal/reflectlite and checkptr — Done: reflectlite (
9650726e79,39a51a4b0d), context deps (88adc33827,724a86fced).
Other changes
- Misc internal — shift masks (
7b62e984d9), loop simplifications (49662bc6b0), s390x build (40657c282d), deterministic anonymous interface output (fbde753a58).
Diagnostics and knobs
From Diagnostics and knobs (Go 1.0–1.17)
Runtime dlog ring-buffer debug log; go env -w/-u; arm/mips CPU profile corruption fixed.
- Race detector integration — Done: arm64 uses
raceprocctx(6e37e3a80b). - CPU profiler and runtime/pprof writers (legacy format to compressed protobuf) — Done: CPU profile corruption on arm/mips fixed — lost atomic64 count was racy (
91c385b393). Left open: nothing noted. - Profile labels — Done: heritability of labels documented (
0ca4f6be35,9a71015860“documents labels bug”). - GODEBUG, runtime/debug, debug log and traceback knobs — Done: binary ring-buffer debug log
dlogper-M, compiled only with thedebuglogbuild tag, printed on panic (3ebb1ad9cd); TLS 1.3GODEBUGdocumented (48bb611667); user-visiblego env -w/-ufor persistent environment (f0e9754696). Left open: “decoding from a core dump hasn’t been implemented” (3ebb1ad9cd).
Other changes
- Misc internal — idiomatic swapping (
342764a216), “Deprecated:” spelling (9a0a150c9f).
OS layer, stacks and panics
From OS interface, stacks and panics (Go 1.5–1.17)
aix/ppc64 completed, netbsd/openbsd arm64, illumos, TOPFRAME, PCDATA/FUNCDATA re-ordering, Android TLS offset made dynamic, physHugePageSize.
- New and ported OS/arch targets, 1.5–1.17 — Done: aix/ppc64 completion (
c1e2227505,8bad008cf5,53d859bdf5,0cd74d1f11,bf103723f8,b5cf035d1c,38dc177d3a,3aacfce6cf,4e2b4d7fb2,cbaa8e5f93,8c7564dead,d5014ec05b,b2453c0588), netbsd/arm64 (d23cba683e,37133b5d63), openbsd/arm64 (3d94dd78d4,17a7f21790,08b956f378,998cc2a1c5), illumos split from solaris (f686a2890b), dynamic Android TLS offset (1d10b17589,95f18757a0,f18c31a49c,eddb41eb2c). - Goroutine stack growth, shrinking, GC stack barriers and stack objects — Done: stack freeing separated from shrinking (
68d89bb8e0),m.libcallspcheck now panics, one lock per stackpool order. - Tracebacks, symbol tables and
runtime.Callers/CallersFrames— Done:TOPFRAMEongoexit(aafe257390), PCDATA/FUNCDATA reordering (4aeac68c92), lazy file/line inFrames.Next(c77a9e0aa5),dumpgoroutinefollow-ups in 1.14. - Signals: masks, forwarding, sigaltstack and the unified Unix signal layer — Done: sigpipe check fix (
0c75eb824c), darwin signal wake-up via a pipe (c485e8b559), sigtramp callee-saved registers on arm64/arm Darwin (cbdf9ade56,df901bce5e),sigfwdandsigtrampon AIX (bf103723f8,b5cf035d1c). - cgo runtime support: pointer checks, callbacks, extra Ms, C-to-Go call path — Done: Windows
_cgo_sys_thread_createcalling convention (bec67e1130), Android threadentry unification (b2f19dad8b),cgo_wait_runtime_init_doneprototype (9586c093a2), AIX asmcgocall ABI (c1e2227505). - Shared-library and buildmode entry points (c-archive, c-shared, plugin, shared) — Done: aix/ppc64 library startup and c-archive (
38dc177d3a,3aacfce6cf). - vDSO, time sources and process-wide randomness — Done:
setNsecfor timespec (0a7bc8f430), NetBSD/amd64 timespec fix (ee551846fa). - Darwin and OpenBSD move to libc; Solaris and AIX libcall; syscall wrapper layer — Done:
9da6530faa,85d56c3096,c485e8b559,d410642f49,7d65e3a853,abf8e355a8,c00ff65d01(default system stack size on non-cgo macOS),f6b42a53e5/d32ec38f1cDNS via libSystem (internal, then removed). - Windows runtime — Done: safe DLL loading (
9b6e9f0c8c),NewCallbackreturns all bits (5cf4e442a5), windows-amd64-2012 build (ef4666ecce). - CPU feature detection (
internal/cpu), auxv parsing andGODEBUG=cpu.*— Done: s390x API alignment and new ECDSA/EDDSA caps (1f17d61026,ba978f5fff), remove FreeBSD workarounds (3b6216ed06),physHugePageSize(1033065ee3,7fcba81549), openbsd/arm64HWCap(08b956f378). - Assembly-level runtime entry points: memequal/cmp/IndexByte, hashing, atomics and ABI wrappers — Done:
Load8(4a4e05b0b1), wasmStorepNoWB(814c97b313), s390xStorepNoWB(13b7c04d3f), ABI0 atomic wrappers (62c309c54c,82521659de),Loadpnoescape (9dce58d30d), bounds-check regs on arm (689544c0b9), wasm write barrier (d9db9e32e9), mark Go symbols called from asm (f5e5bc1a42), tidy asm (ee1c76dccd,26a5f6a32e,064ce85c20),getgin preinit on Android (ae85ae5db2). - Debugger function calls and conservative preemption frames — Done: whitelisting debugCall32..65536 (
d016330241). - Thread lifecycle, physical page size and scheduler-facing OS hooks — Done:
physHugePageSize(1033065ee3,7fcba81549),hw.ncpuonline(c55eeeb718in 1.16),MADV_FREE_REUSABLE(abf8e355a8).
Other changes
- Linux, vDSO, time and auxv internal — user-visible runtime: simplify readUnaligned (
3aa7bbdbcb); user-visible runtime: move linux specific code into linux specific files (78f0de10ec); user-visible runtime: fix data sizes for res_search results (1fd1408203) - other runtime/OS plumbing internal — all: join a few chained ifs (
340129e4c8); all: s/cancelation/cancellation/ (5781df421e) - cgo and C interop internal — runtime/cgo: look for android_get_device_api_level in libc.so (
fc7ac2e8c0); runtime/cgo: declare variable setg_gcc as static (4312a18b8a); runtime/cgo: ignore missing Info.plist files on iOS (6ee8324388); runtime/cgo: on Solaris link against -lxnet (295419d0b4) - BSD, Solaris, AIX, Plan 9, NaCl internal — user-visible runtime: use named macros on NetBSD (
d1f43ccef7); user-visible runtime: remove spurious register loads for openbsd/amd64 kqueue (6b692300a1) - Darwin/iOS internal — user-visible runtime: implement pthread functions for darwin/arm64 (
9f12e2e04b)
Compiler frontend
From Compiler frontend (Go 1.10–1.17)
Go 2 number literals and signed shifts, evconst consolidation, spec-compliant package init order, multi-value f(g()) rewriting moved to typecheck, -newescape default.
- dev.regabi: from
*Nodestruct to their.Nodeinterface and concrete node types — Done:ORESULTadded andOINDREGSPremoved (336f951b07);nodl/newnameltake named fields (e92853523d,24a6478be3). Left open: nothing noted. - Indexed export format and the export-data lifecycle — Done: export of rewritten
f(g())calls fixed (916e861fd9); alias export metadata fix (2d357d8da8). Left open: nothing noted. - The syntax package: parser, scanner, source reader, positions and error recovery — Done: scanner accepts Go 2 number literals via a liberal grammar (
ceb849dd97, see constants thread); recovery after:=in declarations (4145c5da1f); unread of more than one rune (58365b34bb). Left open: nothing noted. - Constants: Go 2 number literals, evconst, untyped conversion and go/constant — Done: user-visible new number literals
ceb849dd97,4ad5537bfa, signed shift counts585c9e8412, and-langgating (762953be28); evconst consolidation3def15cd20. Left open: nothing noted. - Language version gating (
-lang) and language changes implemented in the frontend — Done: user-visible go1.13 features guarded by-lang(762953be28);internal/goversionintroduced (64e29f94e2). Left open: nothing noted. - Package initialization order, static initialisation and init functions — Done: user-visible spec-compliant init order
5d0d87ae16; incremental map initee59c06acb;sinitas methods (ee2836048c,d23bf3daa9);isStaticCompositeLiteralfix (004fb5cb8d); static entries of slices (a9e107c85c). Left open: nothing noted. - Concurrent compilation and frontend performance — Done:
-smallframes037ac2bd84. Left open: nothing noted. - Directives and pragmas in the frontend (
//go:handling) — Done:dde7c770ef. Left open: nothing noted. - The legacy typechecker: error quality, alias/recursive-type handling and type checking order — Done:
dc0388c565,4145c5da1f,60736733ec,6d781decad,bea58ef352. Left open: nothing noted. - Lowering in order/walk and the shape of runtime calls emitted by the frontend — Done:
d96b7fbf98/c0cfe9687f,23b476a3c8,1e58bb1491. Left open: nothing noted.
Other changes
- -newescape default internal —
996a687ebbmakes the new escape analysis the default;a152dd0438respects it in genwrapper. - internal/race, -allabis removal internal —
4ee4607c97,74d92db8d7. - Capture-by-reference fixes and ordering internal —
94a9dad8fd,913d290402,644543dd64. - Misc fixes internal —
9f6b21caea(invalid float/complex constant ops),5fc55b3180(type descriptor names for anonymous interfaces with unexported methods in different packages were identical and got unified by the linker),68a98d5279,24513d33b1,2d7cb295fd,d41a0a0690,53deb81219.
Middle end and SSA optimizer
From Middle end and SSA optimizer (Go 1.10–1.17)
The new escape analysis (escape.go) landed and became the default; defer records moved to the stack; signed divisibility rules and prove learned extensions/bounds facts; the rulegen rewrite began and short-circuiting/&& ordering were fixed (threads: Escape, Defers, Prove, Arithmetic, Walk/order).
- Prove pass: unsatisfiability, partial-order facts, loop bounds-check elimination — Done: poset used for non-negatives (
ddef157813), repeated zero-constant checks short-cut (576442b27b), index >= 0 learned from bounds checks (2d41444ad0), induction detection for unrolled loops (d8f60eea64),int64(uint64>>x) >= 0(66f5d4e035), slice bounds checks reversed so the RHS ofIsSliceInBoundsis non-negative (83a33d3855), range analysis of small signed ints fixed (f44404ebbf). Left open: extension handling (done in 1.14). - Escape analysis: the esc.go fixes, the escape.go rewrite, and the move to package escape — Done: user-visible new escape analysis implementation added (
97c4ad4327) and enabled by default (996a687ebb); CONVIFACE data flows to heap (0349f29a55); parameter tagging refactor (23bf6af9961.14);-newescaperespected in genwrapper (a152dd0438). Left open: -m=2 diagnostics and performance work (done in 1.14). - Inlining: budget, mid-stack inlining, closures, and what became inlinable — Done: unnecessary inline marks removed (
c46ebec322);visitBottomUpchanged to pre-order (ef2806e4ab,e40dffe55a); intrinsic inlining shortcut after the getcaller check (376ce8c880). Left open: nothing noted. - Open-coded defers and defer lowering — Done: stack-allocated defer records (
fff4f599fe). Left open: defers still cost a runtime call per execution. - Statement boundaries (is_stmt) and source positions through the optimizer — Done: move marks from jumps to targets (
82af9e6749), OFOR body pos (7afd58d458), line tables indexed by source file (6081a9f7e6). Left open: better heuristic skipping not-statement values. - Range loops, append and map idioms in walk — Done: map initializers evaluated incrementally (
ee59c06acb),callnewported to SSA (23b476a3c8) and no newobject for zero-sized types (c1050a8e54). Left open: nothing noted. - Rewrite-rule generator, typed Aux/AuxInt, and rule syntax — Done: multi-
|expansion (48d3c32ba9),countRule(0047353c53), deadcode pass storage inssa.Cache(c9ccdf1f8c). Left open: nothing noted. - Write-barrier elision and the writebarrier pass — Done: tracking zeroed object parts (
ca36af215f), volatile values copied before barrier call (f23c601bf9), crash on barrier insertion fixed (316ac4f330). Left open: nothing noted. - Memory-op optimizations: memmove, Move/Zero, dead stores, nil checks — Done: nil-check not moved across VarDef (
64c134f90f), slice pointers non-nil (933e34ac99). Left open: nothing noted. - Arithmetic strength reduction, divisibility and intrinsics — Done: signed divisibility (
68819fb6d2,4d9dd35806,44343c777c),61945fc502(no panicshift for masked shifts),68d4b1265e. Left open: nothing noted. - CFG and control-flow passes: branchelim, fuse, shortcircuit, phiopt — Done: shortcircuit (
52ae04fdfc1.14, 1.14), fuseIf (ddb5d0db37,e7b7f87432), phi tighten (c1544ff906). Left open: nothing noted. - Compiler front of walk/order: ordering fixes and the dev.regabi IR refactor (package walk) — Done: short-circuit ordering (
4a9064ef41),callnewto SSA (23b476a3c8), maplit incrementally (ee59c06acb), sinit methods (ee2836048c). Left open: nothing noted.
Other changes
- Walk/SSA fixes and cleanups internal — statictmp name collisions (
08831b150c),types.SoleComponent(9892ccff23), dead code (01971b97c1),-d=ssa/crash (be9c534cde), type switch with broken case (8ee9bca272), “badger” optimization removed (c63dc6d459), float comparison flags (a85afef277), SCC code moved to its own file (829c140f14), struct-in-interface bug (d47db6dc0c), append ICE (c4f87ed26f), escape messages trimmed (131eb8fbf8), new panicindex names (48ef01051a),ORESULTadded andOINDREGSPremoved (336f951b07), go/defer variadic ICE (9f9e17a82f), index-panic line numbers (e7d08b6fe6), maplit dynamic entry (aaf40f8f98), unsafeValue shifts (06ef108cec), intrinsics-disabled build (c10db03cbe), rule-note docs (49ad7bc67c,f61cf6f313), regalloc[]valStatereuse and postorder (4ae31dc8c5,5c3f3fbd0f), fix bad rebase (e5fb1c6d7a), inline-mark docs (19f5c233d1,6c842cc610),cancellationspelling (5781df421e).
Backends and assemblers
From Backends and assemblers (Go 1.12–1.17)
Intrinsics and ports: Add64/Sub64 carry chains, wasm intrinsics and options, ABI wrappers for linkname'd symbols, index-carrying bounds failures, s390x sequentially consistent atomics.
- Register-based ABI (ABIInternal) and ABI wrappers — Done: ABI wrappers for linkname’d symbols (
b402bd4499);-allabismode removed (74d92db8d7). Left open: wrappers are aliases for the stack ABI only; no register convention exists. - Rewrite-rule generator (rulegen): ellipses, commutativity loops, typed aux — Done: magic-variable prediction tightened (
53948127d3), for-loop verbosity (0fbf681840), stopping the shadowing of thebooltype in rules (9f56845f2c),07b4b4a1a8adds a scale field to SSA ops. Left open: generated files still huge. - amd64 lowering: read-modify-write, load-op, addressing modes pass, intrinsic-friendly rules — Done: a SETcc-store rule typed incorrectly is corrected (
23f3ea82b9); no other amd64-specific design work. Left open: nothing noted. - arm64 backend and assembler — Done: v8.1 atomics (
448089854a), bits intrinsics (5714c91b53,f8f265b9cf,dd91269b7c,159b2de442,4e2b0dda8c,192b675f17), FCMP $0 (27cce773d3), changed FP flags (6efd51c6b7),TSTWfix (2ef8abb41f),4ea7aa7cf3uses R20/R21 in Duff’s devices. Left open: nothing noted. - PPC64 / POWER backend and assembler — Done: POWER9 CNTTZ (
3023d7da49), RotateLeft (f2a18b1456), Add64 (50ad09418e), XX1-form encoding fix (259de39375), mid-stack-inlining NOP (2d3474043c,b098c0f467). Left open: nothing noted. - s390x backend: compare-and-branch, intrinsics, assembler — Done: atomic ordering (
ac8dbe7747), Add64/Sub64 (2c1b5130aa), RISBG family (0f79510dc5), IPM (6966b67510), RestArgs (9c843f031d), optab param (e61985427e). Left open: spills of the carry per loop iteration noted in2c1b5130aa(“may be able to reduce”). - 386, ARM (32-bit), MIPS/MIPS64 and the 387 removal — Done: ARM ReverseBytes16 (
fee84cc905), MIPS64 UNPREDICTABLE fix (95d4e6158b),a189467cda. Left open: nothing noted. - WebAssembly backend — Done: intrinsics, GOWASM options, global/PC cleanup, SP caching (
5ee1b84959,4d23cbc671,cf8cc7f63c,496b8dbbfc,203e188837,72d24a7484,2396101e05). Left open: nothing noted. - math/bits, atomic and runtime intrinsics (cross-architecture) — Done: arm64/ppc64x/s390x Add/Sub intrinsics, wasm,
4a4e05b0b1, divisibility (a28a942768). Left open: nothing noted. - SSA infrastructure passes: layout, regalloc, scheduling, flagalloc, block shape — Done:
80b6812d7b,4ae31dc8c5,8a317ebc0f,2c423f063b. Left open: nothing noted. - Debug info generated by the backend: statements, location lists, line tables — Done:
82af9e6749,6081a9f7e6,68a98d5279. Left open: nothing noted. - New object file format and content-addressable symbols (dev.link, assembler side) — Done:
cc5eaf9346,134ef176f0,807761f334. Left open: nothing noted. - Assembler directives and tooling: PCALIGN/ALIGN, FuncInfo flags, prologue handling — Done: DATA validation (
f31305b71b), BSWAPW reject (720af3c8c4),cb8aefd3b0ADJSP. Left open: nothing noted.
Other changes
- Assembler and rulegen odds and ends internal — MIPS
OP_IRRregister fix (ec01d8f74b), rulegen accesses last argument first (04f1b65cc6),-gensymabisacceptsTEXT f+0(SB)(f766b68023). - Bounds-check failure messages carry index and length user-visible — runtime errors like
index out of range [3] with length 3andslice bounds out of range [:4] with capacity 3(2c423f063b,48ef01051a). - Misc internal —
e881604d1c,337a1bde02,12e63226b9,07b4b4a1a8,d98e0720bc,e4665da9bc,ad6c691542(remove AUNDEF),40df9cc606(KeepAlive on stack object),43001a0dc9,68c664141c,c70a7849af,a189467cda,250b96a7bf,fc1e6915dc,b098c0f467,f125b32d19,4ebc6514fa(EVEX RIP-relative encoding fix),769fda2d51,0a338f75d4,f495f549ac,e61985427e,2ef8abb41f.
Linker and object files
From Linker and object files (Go 1.10–1.17)
mmapped output and object data, Reloc shrunk, pctab deduplication in pclntab, -strictdups, runtime version info symbol, AIX external linking and PIE, riscv64 groundwork, GOWASM.
- Linker performance and memory engineering — Done: mmap of output (
b2f94d3e88) and object data (dbe32284ff),Relocshrink (8ef45cf60b), fix of a seek-syscall regression introduced by the mmap’d reader (0793c81009), pctab dedup in pclntab (below),-strictdupschecking (d923309a17, refinedcacab64555),9ac471a87dread-only strings. Left open: relocations still applied in a separate pass over heap data. - pclntab, funcdata and pc tables — Done: off-by-one fixed in
ftabaddstring(7f9e0220cd, few KB saved),d79aea6b96pctab dedup,134ef176f0uses encoding/binary for varints,3a62f4ee40/6d64dd731bcleanups,d6b06f0254(see build-info thread). Left open: names, files, tables still in one symbol. - Dead-code elimination and method pruning — Done:
2cdebb5174removes a stale reference;951143cf14raises the call limit in the stack-bound check. Left open: nothing noted. - DWARF generation in the linker — Done:
ed2fce2d87dwarf64 in .debug_frame,e29f74efb9exports package name in debug_info,4d8a37a6d9fixes pubnames/pubtypes,b56d1bad29call_line as data4 on iOS,26954bde44/3f1422c799__DWARF segment protection on macOS,d41a0a0690removes a large slice in scopePCs. Left open: nothing noted. - DWARF compression and Mach-O dsymutil combining — Done:
248444d5eb,0fe1986a72,807761f334revises a change because LLDB is picky. Left open: nothing noted. - Mach-O and Darwin support — Done: bitcode builds for iOS/tvOS/watchOS (
ba965640a4,1bd974eeb71.14,f4e32aeed11.14),277609f844copies platform version commands to go.o,a74e01204econsolidates platform setup,4cd6c3bac7bumps macOS/SDK version to 10.9,637f34fee0/c90f6dd496allow duplicate weak symbols on Mach-O,3cb92fcba7c-archive compatibility. Left open: nothing noted. - PE / Windows — Done:
e883d000f4stops generating NT 4 compat headers (subsystem version 6.1),1a423bec001.14 (header copy-paste fix). Left open: nothing noted. - AIX / XCOFF — Done: external linking and c-archive (
80f10965ee,f0749c74fd,359fb4a9afexport file,3cf89e509b,697f4183e6,cf952e9e62PIE,cb8054a6b6/0cd74d1f11trampolines/C trampolines,2deda8792a,d3631955d4,0ff9df6b53,a891f2e2ae),0c9e0c257b.go.buildinfo. Left open: DWARF disabled with old ld. - WebAssembly — Done:
99e223289boptimises the data section,fb9b818bbdcaps data segments at 100000,b434bbf197adds theGOWASMenvironment variable (comma-separated experimental wasm features, none defined yet) user-visible,460f9c6068optimises memory allocation. Left open: no experimental features exist yet. - Build modes: PIE, plugin, c-shared, c-archive, shared libraries — Done: PIE with internal link on linux/arm64 including GOT/PLT and many
R_AARCH64_*relocations (d2765de863), PIE and c-archive on aix (cf952e9e62,697f4183e6), c-archive Mach-O compatibility (3cb92fcba7),e4665da9bcreproducible toolchain builds under PIE. Left open: nothing noted. - Host object loading and external linking — Done:
9f9c5fa8c7-awith external linker,3235f7c072duplicate ELF section names tolerated,83f205fa88R_AARCH64_LDST128_ABS_LO12_NC,e27402aee0configurable default dynamic linker/loader user-visible,a4f9c2a29eopenbsd/arm64,4590abe072. Left open: nothing noted. - Architecture ports and trampoline insertion — Done:
a4f9c2a29eopenbsd/arm64,a3863fc18afix constant. Left open: nothing noted. - GOEXPERIMENT plumbing and tool configuration — Done:
4814e7d591includes full GOEXPERIMENT flags in the tool ID for the cache key (release versions previously ignored them),a5248acd911.12 enables GODEBUGCPU in non-experimental builds. Left open: nothing noted. - Build identity, buildinfo and reproducibility — Done:
d6b06f0254,4891a3b66c,0c9e0c257b.go.buildinfoin XCOFF symtab. Left open: nothing noted.
Other changes
- Small items internal —
4ba69a9a17(ppc64 processor-level selection),2034fbab5b(inline marks reuse existing instructions),d949d0b925(init function reorganisation),804a4024ec/bc588d4d92(file handle leaks),850844ef65,93fcebaf31(no writes to read-only memory in addstrdata),096ab3c21b/4fdeb73fed(iOS simulator syscall suffixes),76659e4797. - Wasm/XCOFF/AIX — see threads.
- -strictdups user-visible —
d923309a17,cacab64555,4590abe072,07ca28d5291.17 (1.17 BSS fix). - Increase ELF reloc reserve internal —
3b37ff453e;9eb403159ddeferreturn detector;7498e8f5a2memprofile legacy format for compilebench;d41a0a0690scopePCs. - GOWASM / env -w user-visible —
b434bbf197,f0e9754696. - Stack check limit internal —
951143cf14. - Dynsym info internal —
12dbd20a501.14,fa7d40abe01.14 (1.14).