Ignore incorrect elf architecture libraries

In multilib systems LD_LIBRARY_PATH is sometimes set to a list that
contains both the lib32 and lib64 directories, for example when
running code that may execute 32-bit or 64-bit subprocesses or both.
Musl's dynamic loader aborts searching a path list when it finds any
library that is not loadable, preventing searching the other multilib
directory.

Modify the loader to continue searching when a file is found that is
a valid elf file but for an elf machine or class that differs from
that of the loader itself.

Test: host-unit-tests
Change-Id: Ic1eb11cf007bc36984e9eb7c40756243cd425b34
1 file changed