Linker should include type assertions for relocations
Opened this issue · 0 comments
jdpage commented
At the moment, relocations are untyped. Therefore, if I recompile a unit, changing the types of some of the toplevel declarations, and relink it with a previously-compiled unit referring to those toplevels, an incorrect link is possible.
The linker should check whether the type assertions agree with the ABI of the referenced unit, and if they do not match, attempt to recompile the referencing unit before linking. If this is not possible (either because the changed ABI causes the source to no longer compile correctly, or because the source is unavailable), an error should be raised.