Keep name of temporary shared objects.

In linking an object file into a new shared object, we need
to link against all previously linked temporary objects.
Because we don't know which previously linked libraries the new
object file depends on we just link against all.
Link temporary .so against previous temp .so

An object file might depend on symbols defined in previously
loaded object files. So we would need to link in all previously
created temporary shared objects (DLLs).

It is sufficient, however, to link each temporary shared object with
the previously created temporary shared object, if any, and let the
runtime dynamic linker resolve the dependencies.

This fixes #8935.
Merge branch 'rtld-8935' of github.com/trommler/ghc