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
25
votes
1 answer

Why does the x86-64 / AMD64 System V ABI mandate a 16 byte stack alignment?

I've read in different places that it is done for "performance reasons", but I still wonder what are the particular cases where performance get improved by this 16-byte alignment. Or, in any case, what were the reasons why this was chosen. edit: I'm…
melkyades
  • 1,719
  • 11
  • 20
25
votes
1 answer

What does ABIs: armeabi-v7a in the android version detail mean? please provide the internal details of how this is used?

When running android list targets, I got ABIs: armeabi-v7a what does this mean? please provide the internal details of how this is used?
user1719747
  • 325
  • 1
  • 6
  • 12
24
votes
3 answers

What ABI, if any, restricts the size of [u]intmax_t?

Starting with the 1999 edition, the ISO C standard defines a standard header which defines, among other things, the typedefs intmax_t and uintmax_t. These designate, respectively, "a (signed|unsigned) integer type capable of representing…
Keith Thompson
  • 254,901
  • 44
  • 429
  • 631
23
votes
3 answers

What is the default register state when program launches (asm, linux)?

When the program launches (Linux ELF executable), are there zeros in eax, ebx, etc. or can there be anything? (I'm not doing any calls or using extern libraries). On my machine the registers are zeroed, but can I rely on such behavior in a new…
user1190294
23
votes
2 answers

Linking problems due to symbols with abi::cxx11?

We recently caught a report because of GCC 5.1, libstdc++ and Dual ABI. It seems Clang is not aware of the GCC inline namespace changes, so it generates code based on one set of namespaces or symbols, while GCC used another set of namespaces or…
jww
  • 97,681
  • 90
  • 411
  • 885
22
votes
4 answers

glibc: elf file OS ABI invalid

downloaded and compiled glibc-2.13. when i try to run a sample C program which does a malloc(). I get following error elf file OS ABI invalid Can anybody please pass my any pointer helpful in resolving this issue.Please note…
Kapil
  • 836
  • 2
  • 8
  • 20
22
votes
4 answers

Why is the "alignment" the same on 32-bit and 64-bit systems?

I was wondering whether the compiler would use different padding on 32-bit and 64-bit systems, so I wrote the code below in a simple VS2019 C++ console project: struct Z { char s; __int64 i; }; int main() { std::cout << sizeof(Z)…
Shen Yuan
  • 222
  • 1
  • 2
  • 6
22
votes
1 answer

What changes causes an ABI breaking in C++?

When the C++ standardization committee investigates modifications of the STL, a large attention is taken to not introduce ABI breaking changes. What causes ABI breaking and what do not introduce ABI breaking in C++ ? ((link to courses or document…
Vincent
  • 57,703
  • 61
  • 205
  • 388
22
votes
1 answer

What platforms have incompatible ABIs for C and C++?

It has just come to my attention that the C++ standard says that C and C++ functions have different and incompatible types, even if their type signatures are the same (for more info see this question). That means that you technically are not…
Josh Haberman
  • 4,170
  • 1
  • 22
  • 43
20
votes
1 answer

Apple clang compiler versioning schema?

Some time ago, GCC >= 5 and Clang >= 4 compilers changed the semantics of their version numbers, so major version number will increase on any non-bugfix release. Does Apple follow any versioning schema with clang compiler in terms of ABI…
lasote
  • 591
  • 2
  • 12
20
votes
10 answers

Can a C compiler generate an executable 64-bits where pointers are 32-bits?

Most programs fits well on <4GB address space but needs to use new features just available on x64 architecture. Are there compilers/platforms where I can use x64 registers and specific instructions but preserving 32-bits pointers to save memory? Is…
Maniero
  • 10,311
  • 6
  • 40
  • 85
19
votes
3 answers

What is ABI(Application Binary Interface)?

This is what wikipedia says: In computer software, an application binary interface (ABI) describes the low-level interface between an application (or any type of) program and the operating system or another application. ABIs cover details…
Haiyang
  • 1,489
  • 4
  • 15
  • 19
19
votes
1 answer

Difference between arm-none-eabi and arm-linux-gnueabi?

What is the difference between arm-none-eabi and arm-linux-gnueabi? I know the difference in how to use them (one for bare metal software, the other one for software meant to be run on linux). But what is the technical background? I see there is a…
ChrsBr
  • 313
  • 1
  • 2
  • 7
19
votes
2 answers

Is a sign or zero extension required when adding a 32bit offset to a pointer for the x86-64 ABI?

Summary: I was looking at assembly code to guide my optimizations and see lots of sign or zero extensions when adding int32 to a pointer. void Test(int *out, int offset) { out[offset] = 1; } ------------------------------------- movslq %esi,…
Yale Zhang
  • 1,447
  • 12
  • 30
19
votes
1 answer

where is amd64 psABI?

The AMD64 psABI used to be hosted at x86-64.org. I have a copy of pdf file and it says explicitly: The architecture specification is available on the web at http://www.x86-64.org/documentation. but http://www.x86-64.org is down for a long time…
Alexander Gorshenev
  • 2,769
  • 18
  • 33