Questions tagged [abi]

The (Application Binary Interface) specifies the low level interface between the programs, libraries and the operating system. E.g. which registers are used to pass function parameters.

The (Application Binary Interface) specifies the low level interface between the programs, libraries and the operating system. E.g. which registers are used to pass function parameters.

890 questions
74
votes
5 answers

Android Studio : Missing Strip Tool

I am constantly getting this warning while building my android studio code using terminal command gradle clean assembleRelease: Unable to strip library 'lib.so' due to missing strip tool for ABI 'ARMEABI'. Packaging it as is. Please help me on how…
Sanket B
  • 1,070
  • 1
  • 9
  • 23
71
votes
1 answer

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

int 0x80 on Linux always invokes the 32-bit ABI, regardless of what mode it's called from: args in ebx, ecx, ... and syscall numbers from /usr/include/asm/unistd_32.h. (Or crashes on 64-bit kernels compiled without CONFIG_IA32_EMULATION). 64-bit…
Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
64
votes
4 answers

Difference between x86, x32, and x64 architectures?

Please explain the difference between x86, x32 and x64? Its a bit confusing when it comes to x86 and x32 because most of the time 32-bit programs run on x86...
getjish
  • 817
  • 1
  • 7
  • 6
61
votes
3 answers

What registers are preserved through a linux x86-64 function call

I believe I understand how the linux x86-64 ABI uses registers and stack to pass parameters to a function (cf. previous ABI discussion). What I'm confused about is if/what registers are expected to be preserved across a function call. That is, what…
boneheadgeek
  • 765
  • 1
  • 7
  • 9
53
votes
1 answer

Is arm64-v8a compatible with armeabi-v7a?

For my Android-app I'm using the ABI "x86" and "armeabi" right now. The armeabi is used for all ARM-devices, including armv7a and arm64-v8a. Now I would like to remove the "armeabi" and just continue with "x86" and "armeabi-v7a". I haven't found any…
Martin L.
  • 3,006
  • 6
  • 36
  • 60
49
votes
3 answers

What are the purposes of the ARM ABI and EABI?

The more I look at this PDF (Application Binary Interface for the ARM Architecture: The Base Standard) the less I understand what it means. Also I'd like some comments on Procedure Call Standard for the ARM Architecture and ELF for the ARM…
Micro
  • 765
  • 1
  • 6
  • 10
45
votes
9 answers

Does C have a standard ABI?

From a discussion somewhere else: C++ has no standard ABI (Application Binary Interface) But neither does C, right? On any given platform it pretty much does. It wouldn't be useful as the lingua franca for inter-language communication if it lacked…
fredoverflow
  • 256,549
  • 94
  • 388
  • 662
43
votes
2 answers

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

If I get a bool variable and set its second bit to 1, then variable evaluates to true and false at the same time. Compile the following code with gcc6.3 with -g option, (gcc-v6.3.0/Linux/RHEL6.0-2016-x86_64/bin/g++ -g main.cpp -o mytest_d) and run…
BY408
  • 423
  • 4
  • 6
43
votes
2 answers

What is the 'shadow space' in x64 assembly?

I found plenty of topics about this shadow space, but I couldn't find the answer in none of them, so my question is: How much exactly bytes I need to subtract from the stack pointer, before entering to a procedure? And should I push the procedure…
Igor Bezverhi
  • 483
  • 1
  • 5
  • 11
39
votes
1 answer

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

I'm trying to determine if building and using libcxxabi from the llvm project under linux makes sense. My build of libcxxabi is linked to ldd libc++abi.so.1.0 linux-vdso.so.1 => (0x00007fff2e0db000) libpthread.so.0 =>…
user2485710
  • 9,451
  • 13
  • 58
  • 102
36
votes
2 answers

Why is address 0x400000 chosen as a start of text segment in x86_64 ABI?

In this document on p. 27 it says that text segment starts at 0x400000. Why was this particular address chosen? Is there any reason for that? The same address is chosen in GNU ld on Linux: $ ld -verbose | grep -i text-segment PROVIDE…
user1042840
  • 1,925
  • 2
  • 16
  • 32
35
votes
4 answers

why is data structure alignment important for performance?

Can someone give me a short and plausible explanation for why the compiler adds padding to data structures in order to align its members? I know that it's done so that the CPU can access the data more efficiently, but I don't understand why this is…
Mat
  • 11,263
  • 10
  • 45
  • 48
34
votes
10 answers

Why does the Mac ABI require 16-byte stack alignment for x86-32?

I can understand this requirement for the old PPC RISC systems and even for x86-64, but for the old tried-and-true x86? In this case, the stack needs to be aligned on 4 byte boundaries only. Yes, some of the MMX/SSE instructions require 16byte…
Allen Bauer
  • 16,657
  • 2
  • 56
  • 74
34
votes
2 answers

Where exactly is the red zone on x86-64?

From Wikipedia: In computing, a red zone is a fixed-size area in a function's stack frame beyond the return address which is not preserved by that function. The callee function may use the red zone for storing local variables without the extra…
Sep Roland
  • 33,889
  • 7
  • 43
  • 76
33
votes
1 answer

Array initialization optimization

When compiling the following code snippet (clang x86-64 -O3) std::array test() { std::array values {{0, 1, 2, 3, 4}}; return values; } It produced the typical assembly that I would expect test(): …
Cory Kramer
  • 114,268
  • 16
  • 167
  • 218
1
2
3
59 60