From 8e1550c60733aa0255804aacf4dd78ade6e450fe Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 15 Jun 2022 18:27:49 +0200 Subject: [PATCH] runtime: include .data section in globals scan All the globals are between _etext and _end. We were scanning only between _edata and _end, which mainly consists of the .bss section. Scanning from _etext ensures that the .data section is also included. This bug didn't result in issues in CI, but did result in a bug in the recover branch: https://github.com/tinygo-org/tinygo/pull/2331. This patch fixes this bug. --- src/runtime/os_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go index 2e42515a38..c157953b23 100644 --- a/src/runtime/os_linux.go +++ b/src/runtime/os_linux.go @@ -24,7 +24,7 @@ const ( clock_MONOTONIC_RAW = 4 ) -//go:extern _edata +//go:extern _etext var globalsStartSymbol [0]byte //go:extern _end