Support loading libraries to a reserved address.

Add flags and parameters to android_dlopen_ext() to allow loading a
library at an already-reserved fixed address. If the library to be
loaded will not fit within the space reserved, then the linker will
either fail, or allocate its own address space as usual, according to
which flag has been specified. This behaviour only applies to the
specific library requested; any other libraries loaded as dependencies
will be loaded in the normal fashion.

There is a new gtest included to cover the functionality added.

Bug: 13005501
Change-Id: I5d1810375b20fc51ba6a9b3191a25f9792c687f1
diff --git a/linker/linker_phdr.h b/linker/linker_phdr.h
index 6b72caf..430c6ec 100644
--- a/linker/linker_phdr.h
+++ b/linker/linker_phdr.h
@@ -42,7 +42,7 @@
   ElfReader(const char* name, int fd);
   ~ElfReader();
 
-  bool Load();
+  bool Load(const android_dlextinfo* extinfo);
 
   size_t phdr_count() { return phdr_num_; }
   ElfW(Addr) load_start() { return reinterpret_cast<ElfW(Addr)>(load_start_); }
@@ -54,7 +54,7 @@
   bool ReadElfHeader();
   bool VerifyElfHeader();
   bool ReadProgramHeader();
-  bool ReserveAddressSpace();
+  bool ReserveAddressSpace(const android_dlextinfo* extinfo);
   bool LoadSegments();
   bool FindPhdr();
   bool CheckPhdr(ElfW(Addr));