Fix symbol name association.
Do not associate a name with an ip unless the ip is actually within
the symbol's size.
Change-Id: I7ec424abdd9a21ca94b37fa30302b355b64b6312
diff --git a/src/elfxx.c b/src/elfxx.c
index 78112cd..38d69fc 100644
--- a/src/elfxx.c
+++ b/src/elfxx.c
@@ -135,7 +135,10 @@
Debug (16, "0x%016lx info=0x%02x %s\n",
(long) val, sym->st_info, strtab + sym->st_name);
- if ((Elf_W (Addr)) (ip - val) < *min_dist)
+ /* ANDROID support update */
+ if ((Elf_W (Addr)) (ip - val) < *min_dist
+ && (Elf_W (Addr)) (ip - val) < sym->st_size)
+ /* End of ANDROID update */
{
*min_dist = (Elf_W (Addr)) (ip - val);
strncpy (buf, strtab + sym->st_name, buf_len);