Merge "bionic: libdl_cfi: Remove PAGE_SIZE usage" into main am: de83440636
am: 256e2a786a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2727078 Change-Id: I8e93227fc44a0b52195dfb55b5e95697490e9fd2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
47f06117f3
1 changed files with 3 additions and 3 deletions
|
@ -26,15 +26,15 @@ __attribute__((__weak__, visibility("default"))) extern "C" void __loader_cfi_fa
|
|||
// dlopen/dlclose.
|
||||
static struct {
|
||||
uintptr_t v;
|
||||
char padding[PAGE_SIZE - sizeof(v)];
|
||||
} shadow_base_storage alignas(PAGE_SIZE);
|
||||
char padding[max_page_size() - sizeof(v)];
|
||||
} shadow_base_storage alignas(max_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, "");
|
||||
static_assert(sizeof(shadow_base_storage) == max_page_size(), "");
|
||||
return &shadow_base_storage.v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue