Allow the dynamic linker to relocate references to thumb symbols in NDK libraries.

The lowest bit of the symbol's value should be ignored when looking at UNDEF symbols
for correctness. It is used as an ARM/Thumb flag by the linker.
diff --git a/linker/linker.c b/linker/linker.c
index 26cd0a8..a6ecd1a 100644
--- a/linker/linker.c
+++ b/linker/linker.c
@@ -1240,9 +1240,13 @@
                 return -1;
             }
 #endif
-            if ((s->st_shndx == SHN_UNDEF) && (s->st_value != 0)) {
-                DL_ERR("%5d In '%s', shndx=%d && value=0x%08x. We do not "
-                      "handle this yet", pid, si->name, s->st_shndx,
+            // st_shndx==SHN_UNDEF means an undefined symbol.
+            // st_value should be 0 then, except that the low bit of st_value is
+            // used to indicate whether the symbol points to an ARM or thumb function,
+            // and should be ignored in the following check.
+            if ((s->st_shndx == SHN_UNDEF) && ((s->st_value & ~1) != 0)) {
+                DL_ERR("%5d In '%s', symbol=%s shndx=%d && value=0x%08x. We do not "
+                      "handle this yet", pid, si->name, sym_name, s->st_shndx,
                       s->st_value);
                 return -1;
             }