Merge changes I6059b68e,I11a7257a

* changes:
  Add new info functions to resolver for use by Netd.
  Store DNS server count in resolv_cache.
diff --git a/libc/arch-mips/include/machine/elf_machdep.h b/libc/arch-mips/include/machine/elf_machdep.h
index 0aacedf..4db087b 100644
--- a/libc/arch-mips/include/machine/elf_machdep.h
+++ b/libc/arch-mips/include/machine/elf_machdep.h
@@ -121,7 +121,7 @@
 #define	DT_MIPS_GOTSYM		0x70000013	/* first dynamic sym in got */
 #define DT_MIPS_HIPAGENO	0x70000014
 #define	DT_MIPS_RLD_MAP		0x70000016	/* address of loader map */
-#define DT_MIPS_RLD_MAP2	0x70000035	/* offset of loader map, used for PIE */
+#define DT_MIPS_RLD_MAP_REL	0x70000035	/* offset of loader map, used for PIE */
 
 /*
  * ELF Flags
diff --git a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
index b6bf7bc..014b913 100644
--- a/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
+++ b/libc/malloc_debug/tests/malloc_debug_unit_tests.cpp
@@ -382,8 +382,8 @@
   std::string expected_log(DIVIDER);
   expected_log += android::base::StringPrintf(
       "6 malloc_debug +++ ALLOCATION %p SIZE 100 HAS A CORRUPTED FRONT GUARD\n", pointer);
-  expected_log += "6 malloc_debug   pointer[-32] = 0x00 (expected 0xaa)\n";
-  expected_log += "6 malloc_debug   pointer[-15] = 0x02 (expected 0xaa)\n";
+  expected_log += "6 malloc_debug   allocation[-32] = 0x00 (expected 0xaa)\n";
+  expected_log += "6 malloc_debug   allocation[-15] = 0x02 (expected 0xaa)\n";
   expected_log += "6 malloc_debug Backtrace at time of failure:\n";
   expected_log += "6 malloc_debug   #00 pc 0x1\n";
   expected_log += "6 malloc_debug   #01 pc 0x2\n";
@@ -463,8 +463,8 @@
   std::string expected_log(DIVIDER);
   expected_log += android::base::StringPrintf(
       "6 malloc_debug +++ ALLOCATION %p SIZE 100 HAS A CORRUPTED REAR GUARD\n", pointer);
-  expected_log += "6 malloc_debug   pointer[130] = 0xbf (expected 0xbb)\n";
-  expected_log += "6 malloc_debug   pointer[131] = 0x00 (expected 0xbb)\n";
+  expected_log += "6 malloc_debug   allocation[130] = 0xbf (expected 0xbb)\n";
+  expected_log += "6 malloc_debug   allocation[131] = 0x00 (expected 0xbb)\n";
   expected_log += "6 malloc_debug Backtrace at time of failure:\n";
   expected_log += "6 malloc_debug   #00 pc 0x100\n";
   expected_log += "6 malloc_debug   #01 pc 0x200\n";
@@ -495,8 +495,8 @@
   std::string expected_log(DIVIDER);
   expected_log += android::base::StringPrintf(
       "6 malloc_debug +++ ALLOCATION %p SIZE 100 HAS A CORRUPTED REAR GUARD\n", pointer);
-  expected_log += "6 malloc_debug   pointer[130] = 0xbf (expected 0xbb)\n";
-  expected_log += "6 malloc_debug   pointer[131] = 0x00 (expected 0xbb)\n";
+  expected_log += "6 malloc_debug   allocation[130] = 0xbf (expected 0xbb)\n";
+  expected_log += "6 malloc_debug   allocation[131] = 0x00 (expected 0xbb)\n";
   expected_log += "6 malloc_debug Backtrace at time of failure:\n";
   expected_log += "6 malloc_debug   #00 pc 0x100\n";
   expected_log += "6 malloc_debug   #01 pc 0x200\n";
@@ -758,22 +758,22 @@
   ASSERT_STREQ("", getFakeLogBuf().c_str());
   std::string expected_log(DIVIDER);
   expected_log += android::base::StringPrintf("6 malloc_debug +++ ALLOCATION %p USED AFTER FREE\n", pointers[0]);
-  expected_log += "6 malloc_debug   pointer[20] = 0xaf (expected 0xef)\n";
-  expected_log += "6 malloc_debug   pointer[99] = 0x12 (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[20] = 0xaf (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[99] = 0x12 (expected 0xef)\n";
   expected_log += DIVIDER;
   expected_log += DIVIDER;
   expected_log += android::base::StringPrintf("6 malloc_debug +++ ALLOCATION %p USED AFTER FREE\n", pointers[3]);
-  expected_log += "6 malloc_debug   pointer[3] = 0x34 (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[3] = 0x34 (expected 0xef)\n";
   expected_log += DIVIDER;
   expected_log += DIVIDER;
   expected_log += android::base::StringPrintf("6 malloc_debug +++ ALLOCATION %p USED AFTER FREE\n", pointer1_large);
-  expected_log += "6 malloc_debug   pointer[4095] = 0x90 (expected 0xef)\n";
-  expected_log += "6 malloc_debug   pointer[4100] = 0x56 (expected 0xef)\n";
-  expected_log += "6 malloc_debug   pointer[8191] = 0x89 (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[4095] = 0x90 (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[4100] = 0x56 (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[8191] = 0x89 (expected 0xef)\n";
   expected_log += DIVIDER;
   expected_log += DIVIDER;
   expected_log += android::base::StringPrintf("6 malloc_debug +++ ALLOCATION %p USED AFTER FREE\n", pointer2_large);
-  expected_log += "6 malloc_debug   pointer[8200] = 0x78 (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[8200] = 0x78 (expected 0xef)\n";
   expected_log += DIVIDER;
   ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str());
 }
@@ -797,7 +797,7 @@
   ASSERT_STREQ("", getFakeLogBuf().c_str());
   std::string expected_log(DIVIDER);
   expected_log += android::base::StringPrintf("6 malloc_debug +++ ALLOCATION %p USED AFTER FREE\n", pointer);
-  expected_log += "6 malloc_debug   pointer[56] = 0x91 (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[56] = 0x91 (expected 0xef)\n";
   expected_log += DIVIDER;
   ASSERT_STREQ(expected_log.c_str(), getFakeLogPrint().c_str());
 }
@@ -824,7 +824,7 @@
   ASSERT_STREQ("", getFakeLogBuf().c_str());
   std::string expected_log(DIVIDER);
   expected_log += android::base::StringPrintf("6 malloc_debug +++ ALLOCATION %p USED AFTER FREE\n", pointer);
-  expected_log += "6 malloc_debug   pointer[101] = 0xab (expected 0xef)\n";
+  expected_log += "6 malloc_debug   allocation[101] = 0xab (expected 0xef)\n";
   expected_log += "6 malloc_debug Backtrace at time of free:\n";
   expected_log += "6 malloc_debug   #00 pc 0xfa\n";
   expected_log += "6 malloc_debug   #01 pc 0xeb\n";
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 77f5359..0fdf90d 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3658,8 +3658,8 @@
           *dp = &_r_debug;
         }
         break;
-      case DT_MIPS_RLD_MAP2:
-        // Set the DT_MIPS_RLD_MAP2 entry to the address of _r_debug for GDB.
+      case DT_MIPS_RLD_MAP_REL:
+        // Set the DT_MIPS_RLD_MAP_REL entry to the address of _r_debug for GDB.
         {
           r_debug** dp = reinterpret_cast<r_debug**>(
               reinterpret_cast<ElfW(Addr)>(d) + d->d_un.d_val);
diff --git a/tools/relocation_packer/src/elf_file.cc b/tools/relocation_packer/src/elf_file.cc
index 014883d..96e6efd 100644
--- a/tools/relocation_packer/src/elf_file.cc
+++ b/tools/relocation_packer/src/elf_file.cc
@@ -552,11 +552,11 @@
               << " d_val adjusted to " << dynamic->d_un.d_val;
     }
 
-    // Special case: DT_MIPS_RLD_MAP2 stores the difference between dynamic
+    // Special case: DT_MIPS_RLD_MAP_REL stores the difference between dynamic
     // entry address and the address of the _r_debug (used by GDB)
     // since the dynamic section and target address are on the
     // different sides of the hole it needs to be adjusted accordingly
-    if (tag == DT_MIPS_RLD_MAP2) {
+    if (tag == DT_MIPS_RLD_MAP_REL) {
       dynamic->d_un.d_val += hole_size;
       VLOG(1) << "dynamic[" << i << "] " << dynamic->d_tag
               << " d_val adjusted to " << dynamic->d_un.d_val;
diff --git a/tools/relocation_packer/src/elf_traits.h b/tools/relocation_packer/src/elf_traits.h
index 1c938fa..3e282b2 100644
--- a/tools/relocation_packer/src/elf_traits.h
+++ b/tools/relocation_packer/src/elf_traits.h
@@ -10,8 +10,8 @@
 #include "elf.h"
 #include "libelf.h"
 
-#if !defined(DT_MIPS_RLD_MAP2)
-#define DT_MIPS_RLD_MAP2 0x70000035
+#if !defined(DT_MIPS_RLD_MAP_REL)
+#define DT_MIPS_RLD_MAP_REL 0x70000035
 #endif
 
 // ELF is a traits structure used to provide convenient aliases for