abi Questions

1

Solved

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...
Vague asked 7/9, 2017 at 4:20

3

Solved

In the assembly of the C++ source below. Why is RAX pushed to the stack? RAX, as I understand it from the ABI could contain anything from the calling function. But we save it here, and then later...
Larena asked 12/6, 2016 at 11:39

3

Solved

In the assembly of the C++ source below. Why is RAX pushed to the stack? RAX, as I understand it from the ABI could contain anything from the calling function. But we save it here, and then later...
Fidget asked 12/6, 2016 at 11:39

1

Solved

I'm writing a freestanding program in C that depends only on the Linux kernel. I studied the relevant manual pages and learned that on x86-64 the Linux system call entry point receives the system ...
Godless asked 13/8, 2017 at 20:15

0

The x86-64 Windows ABI has the concept of a legitimate epilog, which is a special type of function epilog that can be simulated during exception handling in order to restore the callers context1 as...
Barranquilla asked 26/7, 2017 at 20:0

2

Solved

The documentation of abi::__cxa_demangle (such as https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.3/a01696.html) specifies that the second argument, char * output_buffer, need to be...
Sjambok asked 10/7, 2017 at 22:17

2

Solved

This SO post: Is Visual-C++-2017 binary compatible with VC++-2015? clearly says that VS 2017 is binary compatible with VS 2015. It even looks like the official position. My question is, in the pas...

1

It is my understanding that (with the notable exception of the switch from VS2015 to VS2017) Microsoft makes ABI breaking changes between each version of the Visual C++ toolchain. So if I want to d...
Placement asked 1/2, 2017 at 9:3

2

Solved

In x86 Assembly language: I assume that I have a normal function prologue, read push ebp mov ebp,esp I know I can read or write registers by accessing a memory destination operand, let's say I...
Amsden asked 24/3, 2017 at 4:40

2

Solved

I'm trying to learn assembly by compiling simple functions and looking at the output. I'm looking at calling functions in other libraries. Here's a toy C function that calls a function defined els...
Monosepalous asked 1/5, 2016 at 15:19

2

Solved

Assuming the x86-64 ABI on Linux, under what conditions in C++ are structs passed to functions in registers vs. on the stack? Under what conditions are they returned in registers? And does the answ...
Colchester asked 23/2, 2017 at 9:35

4

Solved

How do I pass class objects, especially STL objects, to and from a C++ DLL? My application has to interact with third-party plugins in the form of DLL files, and I can't control what compiler thes...
Reproduce asked 1/4, 2014 at 21:40

1

Solved

The title says all. I'm going to add an argument to a member function of a class with a default value. The argument is of a non-trivial type. Does this break ABI? Let's say my new library version i...
Fanchette asked 20/1, 2017 at 12:39

8

Solved

The title says everything. I am talking about C/C++ specifically, because both consider this as "implementation issue". I think, defining a standard interface can ease building a module system on t...
Ious asked 17/1, 2010 at 23:21

3

Solved

wint_t type is set inside wchar.h via stddef.h, using the fact that __WINT_TYPE__ is already defined in the compiler by default. So to change typedef unsigned int wint_t; into typedef wchar_t w...
Croy asked 21/11, 2016 at 9:47

1

I compared 2 C functions returning a struct. We know that on ABI level big structs are going to be passes by pointer as the first function argument. struct S { int words[8]; }; struct S fsret() ...
Experimental asked 17/11, 2016 at 18:44

2

Solved

Something went wrong when I try to access the memory layout of a derived class object which inherits from a virtual base class. Programming environment: GNU/Linux 3.19.0-32-generic, x86_64 Compiler...
Stringy asked 27/8, 2016 at 12:29

1

Solved

I'd like to understand exactly why the libc++ visibility macro for an inline function uses __forceinline or __attribute__((__always_inline__)) as part of the attributes it associates with inline fu...
Herriott asked 2/11, 2016 at 21:19

1

To repeat: I'm looking for ABI compatibility between libraries of the same Visual-C++ version! We want to mix and match some internal C++ DLLs from different teams - built at different times with ...
Epicedium asked 21/10, 2016 at 14:10

1

Solved

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 conti...
Abnegate asked 24/10, 2015 at 11:34

2

I'd like to know if it's possible to make VC++ use LP64 instead of LLP64, I know I could use another compiler such as GCC or Intel C++, but I'd like to use VC++ for various reasons. There is no re...
Stokehold asked 31/3, 2012 at 6:12

1

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 ...
Ovular asked 15/8, 2016 at 14:8

2

Solved

The x86_64 SysV ABI's function calling convention defines integer argument #4 to be passed in the rcx register. The Linux kernel syscall ABI, on the other hand, uses r10 for that same purpose. All ...
Hardener asked 25/7, 2016 at 21:19

2

Solved

When trying to optimize return values on x86_64, I noticed a strange thing. Namely, given the code: #include <cstdint> #include <tuple> #include <utility> using namespace std; ...
Sansbury asked 26/5, 2016 at 9:56

2

Solved

Consider this program: #include <stdio.h> struct S { S() { print(); } void print() { printf("%p\n", (void *) this); } }; S f() { return {}; } int main() { f().print(); } As far as I can ...
Iyeyasu asked 26/6, 2016 at 21:19

© 2022 - 2024 — McMap. All rights reserved.