Set linux 32bit personality for 32 bit processes
Bug: 18069809 Change-Id: Ie143d56b0f8f03510dc451649291067e1add1d2f
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/personality.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <new>
|
||||
@@ -2663,6 +2664,12 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW(
|
||||
ldpreload_env = linker_env_get("LD_PRELOAD");
|
||||
}
|
||||
|
||||
#if !defined(__LP64__)
|
||||
if (personality(PER_LINUX32) == -1) {
|
||||
__libc_fatal("error setting PER_LINUX32 personality: %s", strerror(errno));
|
||||
}
|
||||
#endif
|
||||
|
||||
INFO("[ android linker & debugger ]");
|
||||
|
||||
soinfo* si = soinfo_alloc(args.argv[0], nullptr, 0, RTLD_GLOBAL);
|
||||
|
Reference in New Issue
Block a user