Today binaryen will use the name section to come up with internal names for things.
However in the absence of the name section it will always call things non-meaningful things such as $1 or or $fimport1.
In wasm-objdump we fall back to taking names from the import and/or export string, so if an non-named function is imported as "foo" then we use "foo" for its name. This would, of for example, make the output of wasm-dis more readable (IMHO).