merge in nyc-release history after reset to nyc-dev
diff --git a/src/elfxx.c b/src/elfxx.c
index 7fda0b7..057a3ba 100644
--- a/src/elfxx.c
+++ b/src/elfxx.c
@@ -635,7 +635,11 @@
Elf_W(Phdr) phdr;
GET_PHDR_FIELD(ei, offset, &phdr, p_type);
GET_PHDR_FIELD(ei, offset, &phdr, p_offset);
- if (phdr.p_type == PT_LOAD && phdr.p_offset == mapoff) {
+ // Always use zero as the map offset for in memory maps.
+ // The dlopen of a shared library from an APK will result in a
+ // non-zero map offset which would mean we would never find the
+ // correct program header using the passed in map offset.
+ if (phdr.p_type == PT_LOAD && phdr.p_offset == 0) {
GET_PHDR_FIELD(ei, offset, &phdr, p_vaddr);
*load_base = phdr.p_vaddr;
return true;