linker: Handle a truncated hints file properly
If vattr.va_size is 0, we will end up accessing invalid memory. This is
mostly harmless (because malloc(0) still allocates some memory), but it
triggers a KASAN report.
PR: 282268
Reviewed by: christos, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47240
(cherry picked from commit b5149b265346c55994c7ebaab2a6a6fd1bd6fe5e)