wasm-link: Discard old symbols correctly

When a new symbol is resolved to an existing symbol where
it doesn't overwrite the existing symbol, we now add this symbol
to the discarded list. This is required so when any relocation points
to the symbol, we can retrieve the correct symbol it's resolved by instead.
16daf3f3bcLuuk de Gram committed on 6/24/2022, 6:12:17 AMparent1a3f58f
3 files changedLine totals unavailable