Merge "arm32 __bionic_call_ifunc_resolver: let the compiler handle initialization." into main am: 20738af50e
am: c4ad7fa2fb
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2860690 Change-Id: I9f66183a14ef49b541b61dfbd7e1c8588b0dcf44 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
507dbf28b9
1 changed files with 1 additions and 6 deletions
|
@ -51,12 +51,7 @@ ElfW(Addr) __bionic_call_ifunc_resolver(ElfW(Addr) resolver_addr) {
|
||||||
return reinterpret_cast<ifunc_resolver_t>(resolver_addr)(arg._hwcap | _IFUNC_ARG_HWCAP, &arg);
|
return reinterpret_cast<ifunc_resolver_t>(resolver_addr)(arg._hwcap | _IFUNC_ARG_HWCAP, &arg);
|
||||||
#elif defined(__arm__)
|
#elif defined(__arm__)
|
||||||
typedef ElfW(Addr) (*ifunc_resolver_t)(unsigned long);
|
typedef ElfW(Addr) (*ifunc_resolver_t)(unsigned long);
|
||||||
static unsigned long hwcap;
|
static unsigned long hwcap = getauxval(AT_HWCAP);
|
||||||
static bool initialized = false;
|
|
||||||
if (!initialized) {
|
|
||||||
initialized = true;
|
|
||||||
hwcap = getauxval(AT_HWCAP);
|
|
||||||
}
|
|
||||||
return reinterpret_cast<ifunc_resolver_t>(resolver_addr)(hwcap);
|
return reinterpret_cast<ifunc_resolver_t>(resolver_addr)(hwcap);
|
||||||
#elif defined(__riscv)
|
#elif defined(__riscv)
|
||||||
// The pointer argument is currently unused, but reserved for future
|
// The pointer argument is currently unused, but reserved for future
|
||||||
|
|
Loading…
Reference in a new issue