Does libcxxabi makes sense under linux? What are the benefits?

You should not use libcxxabi directly. To my understanding it is a kind of platform abstraction library, providing low level functions needed to implement libcxx. If you are asking about using libcxx or libstdc++, the differences are mostly the license, newer standard version completeness (the clang project seems slightly faster in implementing recent C++ revisions) … Read more

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

What happens if you use the 32-bit int 0x80 Linux ABI in 64-bit code?

TL:DR: int 0x80 works when used correctly, as long as any pointers fit in 32 bits (stack pointers don’t fit). But beware that strace decodes it wrong unless you have a very recent strace + kernel. int 0x80 zeros r8-r11 for reasons, and preserves everything else. Use it exactly like you would in 32-bit code, … Read more