That's why you need a header file for c/c++ to include a static library or a dll. For dlls you can figure out functions by inspecting the dll only. So it means the dll file stores the names of functions, return values and parameter types. There are some tools that generates this declarations.
Actually you give the solution for your question. All the methods are used depending on situation.
Read some kind of metadata from the object file?
For dynamic libraries like dlls you can dynamicly query object code and call it via function pointers. for go http://code.google.com/p/go-wiki/wiki/WindowsDLLs
so yes. .net languages like c#, vb uses this a lot.
Find metadata elsewhere?
For C/C++ you need a header file for definitions if static libraries are used. I can not give example for the languages you say.
Scan and parse the imported module's source code until it finds the function declaration?
If you have the code it is the obvious way of doing just like the other code you have.
I dont thinks this is different for Go, D or Haskell than C/C++.