diff options
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index babefeb3c..b8a88004d 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -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); |