diff options
author | Alex Cheung <alexcheung@google.com> | 2017-01-31 04:05:00 +0000 |
---|---|---|
committer | Alex Cheung <alexcheung@google.com> | 2017-01-31 04:19:50 +0000 |
commit | 6fcd7a7d28aa6be42bbc99070c93d4d16b56ab57 (patch) | |
tree | 0daa51584f72beb67cbe072f34ca67898212f381 /libdl | |
parent | a5066640cc7274e317bf3bae2d960986d58dbbbd (diff) | |
download | android_bionic-6fcd7a7d28aa6be42bbc99070c93d4d16b56ab57.tar.gz android_bionic-6fcd7a7d28aa6be42bbc99070c93d4d16b56ab57.tar.bz2 android_bionic-6fcd7a7d28aa6be42bbc99070c93d4d16b56ab57.zip |
Revert "Fix CFI initialization crash on x86."
This reverts commit be46d3871c91902504e5ec4c7f575c86f647aafc.
Reverting due to broken build:
https://android-build.googleplex.com/builds/branch-dashboard/aosp-master?build_id=3687823
Change-Id: I30968398edd9a094fce878839ba0a002ed487a77
Diffstat (limited to 'libdl')
-rw-r--r-- | libdl/libdl_cfi.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libdl/libdl_cfi.cpp b/libdl/libdl_cfi.cpp index 8458564a8..362b093fa 100644 --- a/libdl/libdl_cfi.cpp +++ b/libdl/libdl_cfi.cpp @@ -29,12 +29,10 @@ static struct { char padding[PAGE_SIZE - sizeof(v)]; } shadow_base_storage alignas(PAGE_SIZE); -// __cfi_init is called by the loader as soon as the shadow is mapped. This may happen very early -// during startup, before libdl.so global constructors, and, on i386, even before __libc_sysinfo is -// initialized. This function should not do any system calls. extern "C" uintptr_t* __cfi_init(uintptr_t shadow_base) { shadow_base_storage.v = shadow_base; static_assert(sizeof(shadow_base_storage) == PAGE_SIZE, ""); + mprotect(&shadow_base_storage, PAGE_SIZE, PROT_READ); return &shadow_base_storage.v; } |