Add support for the recent dlext extension for PIC support. Pass
the oat_file_begin to dlopen_ext as a reserved_addr using the new
LOAD_AT_FIXED_ADDRESS flag (when it isn't null).
Bug:
24683631
Change-Id: I59c5c82aebfa7cfb815e1fcf47fd72bec6f8239b
// times).
ANDROID_DLEXT_FORCE_FIXED_VADDR; // Take a non-zero vaddr as absolute
// (non-pic boot image).
+ if (oat_file_begin != nullptr) { //
+ extinfo.flags |= ANDROID_DLEXT_LOAD_AT_FIXED_ADDRESS; // Use the requested addr if
+ extinfo.reserved_addr = oat_file_begin; // vaddr = 0.
+ } // (pic boot image).
dlopen_handle_ = android_dlopen_ext(absolute_path.get(), RTLD_NOW, &extinfo);
#else
dlopen_handle_ = dlopen(absolute_path.get(), RTLD_NOW);