If you know at runtime the signature of some called (simple) function, you can use (on Linux OS) libffi to name it.
If you donโt even know at the time of signing the function to call, this is not possible, because in general ABI conventions will dictate different ways of passing arguments to the function according to their type.
For example, x86-64 ABI (for most 64-bit x86-64-based systems) requires floating point and integral values โโto be transmitted in different sets of registers.
See, for example, the x86 wikipage calling conventions.
source share