OSDN Git Service

ART: ELF symbol table lookup is fixed
authorYevgeny Rouban <yevgeny.y.rouban@intel.com>
Mon, 24 Nov 2014 07:40:56 +0000 (13:40 +0600)
committerYevgeny Rouban <yevgeny.y.rouban@intel.com>
Mon, 24 Nov 2014 07:40:56 +0000 (13:40 +0600)
commitacb01387a9863654924891e1d1dfea274f1c9028
treecbfe1417d6364e0e732b58d1e9fb88f28487ea2e
parentc6c88d2079f0d47eb86a2e2e2f53cab25b0503c1
ART: ELF symbol table lookup is fixed

ELF loader could not find some symbols in the OAT's symbol table
(e.g. oatdata, oatexec).

There was a bug in the symbol hash table lookup: if a valid index of
a chain got greater or equal than the number of hash buckets then
the chain was cut off.

The fix is to compare the chain index with the chains array length
rather than with the number of buckets.

Change-Id: I20940957c3045913fd426031a51314d4f87ac1bd
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
runtime/elf_file.cc