File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 569
569
570
570
// The linker guarantees global data starts from at least wasmMinDataAddr.
571
571
// Keep in sync with cmd/link/internal/ld/data.go:wasmMinDataAddr.
572
- const wasmMinDataAddr = 4096 + 4096 ;
572
+ const wasmMinDataAddr = 4096 + 8192 ;
573
573
if ( offset >= wasmMinDataAddr ) {
574
- throw new Error ( "command line too long " ) ;
574
+ throw new Error ( "total length of command line and environment variables exceeds limit " ) ;
575
575
}
576
576
577
577
this . _inst . exports . run ( argc , argv ) ;
Original file line number Diff line number Diff line change @@ -2450,10 +2450,11 @@ func splitTextSections(ctxt *Link) bool {
2450
2450
return (ctxt .IsPPC64 () || (ctxt .IsARM64 () && ctxt .IsDarwin ())) && ctxt .IsExternal ()
2451
2451
}
2452
2452
2453
- // On Wasm, we reserve 4096 bytes for zero page, then 4096 bytes for wasm_exec.js
2454
- // to store command line args. Data sections starts from at least address 8192.
2453
+ // On Wasm, we reserve 4096 bytes for zero page, then 8192 bytes for wasm_exec.js
2454
+ // to store command line args and environment variables.
2455
+ // Data sections starts from at least address 12288.
2455
2456
// Keep in sync with wasm_exec.js.
2456
- const wasmMinDataAddr = 4096 + 4096
2457
+ const wasmMinDataAddr = 4096 + 8192
2457
2458
2458
2459
// address assigns virtual addresses to all segments and sections and
2459
2460
// returns all segments in file order.
You can’t perform that action at this time.
0 commit comments