linking can be strict or less strict on what it considers a match to
an import.
At the lowest level NAMEONLY, the linker checks only the names of symbols, not their types.
At the highest level it expects that the signatures match exactly, including their types.
Only few equivalence rules are applied by type normalization in the type system (e.g., int foo(void) == int foo()).
Used pointers and structs must also match perfectly.
At the medium level, which may be the most practical one, matches are determined (roughly) using
coercion rules. Here "int foo(* struct x)" is compatible with "int foo(*void)" and
"int foo(int)" is compatible with "int foo(short)"
at less stricter comparisons, types and extraflags after merging are copied from one of
the sources, but (pseudo-randomly) from the first import.
linking can be strict or less strict on what it considers a match to an import.
At the lowest level NAMEONLY, the linker checks only the names of symbols, not their types.
At the highest level it expects that the signatures match exactly, including their types. Only few equivalence rules are applied by type normalization in the type system (e.g., int foo(void) == int foo()). Used pointers and structs must also match perfectly.
At the medium level, which may be the most practical one, matches are determined (roughly) using coercion rules. Here "int foo(* struct x)" is compatible with "int foo(*void)" and "int foo(int)" is compatible with "int foo(short)"
at less stricter comparisons, types and extraflags after merging are copied from one of the sources, but (pseudo-randomly) from the first import.