LD: Guard `new_afile' result with assertions

Calls to `new_afile' can in principle return a NULL pointer.  However
in `lookup_name' we dereference the pointer returned without validating
it first.  Since it's not supposed to be NULL there except where we have
hit an internal consistency issue just add an assertion for meaningful
output rather than just a segfault.

For consistency update `cmdline_load_object_only_section' replacing a
call to `abort' with the same assertion.
1 file changed