This is similar to what we do at the bitcode level with the
WebAssemblyFixFunctionBitcasts pass but implemented at the object
file level.
Previously when we had caller and callee disagree about the function
signature we generated a warning replaced the call with a call to
a dummy function that contained only unreachable.
After this change we still generate the warning but will also then
try to generate an adapter function that will add or remove arguments
such that call can still possible succeed.
This function seems to enables to call an external function with a less number of arguments. I wonder what is the use case of this -- as long as you have a correct header file for functions, compilers can tell users that the number of parameters doesn't match.