Setting extra bits in a bool makes it true and false at the same time

In C++ the bit representation (and even the size) of a bool is implementation defined; generally it’s implemented as a char-sized type taking 1 or 0 as possible values. If you set its value to anything different from the allowed ones (in this specific case by aliasing a bool through a char and modifying its … Read more

Does C have a standard ABI?

C defines no ABI. In fact, it bends over backwards to avoid defining an ABI. Those people, who like me, who have spent most of their programming lives programming in C on 16/32/64 bit architectures with 8 bit bytes, 2’s complement arithmetic and flat address spaces, will usually be quite surprised on reading the convoluted … Read more

What are the purposes of the ARM ABI and EABI?

An ABI (Application Binary Interface) is a standard that defines a mapping between low-level concepts in high-level languages and the abilities of a specific hardware/OS platform’s machine code. That includes things like: how C/C++/Fortran/… data types are laid out in memory (data sizes / alignments) how nested function calls work (where and how the information … Read more

Is arm64-v8a compatible with armeabi-v7a?

Many modern Android devices (i.e. Nexus 5x) have AArch64 processors with arm64-v8a instruction set. Both – armeabi and armeabi-v7a – libraries run fine on these modern devices. Therefore, we can assume the answer to your question to be ‘YES’. See this for a breakdown of ABI management on Android: https://developer.android.com/ndk/guides/abis.html

Android Studio : Missing Strip Tool

The default installed NDK doesn’t seem to have the tools required to strip binaries that have been built with ARMEABI support, so it ends up packaging the whole library, which increases the built file size substantially. I’ve found that installing the “NDK (Side by side)” tool from Android Studio -> Tools -> SDK Manager -> … Read more

What are callee and caller saved registers?

Caller-saved registers (AKA volatile registers, or call-clobbered) are used to hold temporary quantities that need not be preserved across calls. For that reason, it is the caller’s responsibility to push these registers onto the stack or copy them somewhere else if it wants to restore this value after a procedure call. It’s normal to let … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)