Android 64-bit ARM shared library stub: use 4Ki page size until more is known

https://github.com/upx/upx/issues/124
	modified:   p_lx_elf.cpp
	modified:   stub/arm64-linux.shlib-init.h
	modified:   stub/src/arm64-linux.shlib-init.S
	modified:   stub/tmp/arm64-linux.shlib-init.bin.dump
This commit is contained in:
John Reiser
2017-12-08 20:05:21 -08:00
parent e633c51b50
commit 7c21c4513e
4 changed files with 598 additions and 544 deletions
+9
View File
@@ -586,6 +586,15 @@ PackLinuxElf::addStubEntrySections(Filter const *)
addLoader("ELFMAINZe", NULL);
}
addLoader("+40,ELFMAINZ", NULL);
if (hasLoaderSection("ANDMAJNZ")) { // Android trouble with args to DT_INIT
if (opt->o_unix.android_shlib) {
addLoader("ANDMAJNZ", NULL); // constant PAGE_SIZE
}
else {
addLoader("ELFMAJNZ", NULL); // PAGE_SIZE from AT_PAGESZ
}
addLoader("ELFMAKNZ", NULL);
}
if (hasLoaderSection("ELFMAINZu")) {
addLoader("ELFMAINZu", NULL);
}