In -sMAIN_MODULE=1 mode we actually link twice, once to get the names the user exported symbols then again with everything exported.
We when use the this base_metadata to limit the things that we export to on the JS module. However for data symbols we cannot use the addresses/values present in base_metadata.
In
-sMAIN_MODULE=1
mode we actually link twice, once to get the names the user exported symbols then again with everything exported.We when use the this
base_metadata
to limit the things that we export to on the JS module. However for data symbols we cannot use the addresses/values present inbase_metadata
.Fixes: #22980