Fix build id check for libraries.

The current build id check uses the file utility. Unfortunately, it
doesn't work on all systems. Replace with a call to llvm-readelf and
get the bitness and build id using that data.

Other small modifications:
- Only attempt to get the full path for a library once for each library.
- Do not add directories into the symbol libraries.

Test: Unit tests pass.
Test: Running using a libart.so that file doesn't understand and
Test: verifying the line numbers are correct.
Change-Id: I12c3d3c4599d201c3c01feeb48448fee6c633d71
1 file changed