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...
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...
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...
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...
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...
Arnhem asked 31/5, 2017 at 15:27
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
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...
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...
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...
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() ...
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 ...
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.