abi Questions

2

Solved

I have a project with multiple smart contracts locally and I want to generate the ABI of my sc.sol smart contract. I do wish to perform this locally using forge or foundry. I know it is possible to...
Ankle asked 21/9, 2023 at 10:39

5

I recently installed LLVM v8.0.0 (on RHEL 7.4). I am going through the LLVM Kaleidoscope tutorial to learn how to use the system, but am running into an issue linking. Per the tutorial (end of cha...
Scatter asked 16/12, 2018 at 18:1

2

I often forget the registers that I need to use for each argument in a syscall, and everytime I forget I just visit this question. The right order for integer/pointer args to x86_64 user-space func...
Balloon asked 14/9, 2020 at 21:21

1

I narrowed down a problem in my GUI code to SetWindowTextW(HWND, wchar_t *) silently failing if the new window title is not aligned to two bytes. In this case, SetWindowText() returns 1 (success) b...
Saury asked 5/2 at 21:9

1

Solved

Consider the following two files on a Linux system: use_message.cpp #include <iostream> extern const char* message; void print_message(); int main() { std::cout << message << '...
Denunciation asked 19/2 at 21:42

2

Solved

I am coming back to C# after a long time and was trying to catch up using the book C# 10 in a Nutshell. The author there mentions that changing a property's accessor from init to set or vice versa ...
Fingering asked 15/9, 2023 at 8:33

3

At the C level, the recommendation is typically to pass anything bigger than word size (8 bytes on x86-64) by pointer, and anything smaller by value (implying by register). The argument is supposed...
Marivaux asked 10/6, 2023 at 21:43

1

Take this simple example: struct has_destruct_t { int a; ~has_destruct_t() {} }; struct no_destruct_t { int a; }; int bar_no_destruct(no_destruct_t); int foo_no_destruct(void) { no_destruct_...

12

Solved

I am new to Linux system programming and I came across API and ABI while reading Linux System Programming. Definition of API: An API defines the interfaces by which one piece of software communica...
abi
Hailee asked 24/9, 2010 at 5:18

3

Solved

In x86/amd64 world sizeof(long long) is 8. Let me quote quite insightful 8 year old mail by Zack Weinberg: Scott Robert Ladd writes: On a 64-bit AMD64 architecture, GCC defines long long a...
Coy asked 15/7, 2012 at 12:19

6

Solved

I'm having some trouble understanding the difference between caller and callee saved registers and when to use what. I am using the MSP430 : procedure: mov.w #0,R7 mov.w #0,R6 add.w R6,R7 in...
Night asked 13/2, 2012 at 21:51

4

Solved

It is highly recommended when creating a 64-bit kernel (for x86_64 platform), to instruct the compiler not to use the 128-byte Red Zone that the user-space ABI does. (For GCC the compiler flag is -...
Illgotten asked 20/8, 2014 at 13:36

3

Solved

The "ARM Architecture Procedure Calling Standard" (AAPCS/EABI) states (5.1.1) that "The role of register r9 is platform specific." but "A virtual platform [...] may designate r9 as an additiona...
Macfadyn asked 24/10, 2011 at 17:15

1

Solved

In his talk Jason Turner proposed to break the C++ ABI to keep the language moving forward. He also mentioned that if needed due to compatibility reasons, C++ ABI changes can be isolated by wrappin...
Dyann asked 19/3, 2022 at 6:29

2

I'm having trouble finding the good documentation for writing 64-bit assembly on MacOS. The 64-bit SysV ABI says the following in section A.2.1 and this SO post quotes it: A system-call is do...
Flocculent asked 15/12, 2017 at 14:37

2

Solved

I'm porting some AArch64/ARM64/Apple Silicon assembly code from Linux to macOS. This code uses all 31 available registers (stack pointer doesn't count) to avoid almost all cases of spilling; the Li...
Tamelatameless asked 17/2, 2022 at 4:28

2

How can I interact with an already deployed contract on ether(not mine) using Remix without the source code, but I have the ABI. The reason I want to do it is because some contract has more than 20...
Summons asked 1/9, 2021 at 4:47

6

Solved

I know that an "undefined behaviour" in C++ can pretty much allow the compiler to do anything it wants. However, I had a crash that surprised me, as I assumed that the code was safe enough. In thi...
Orsa asked 10/1, 2019 at 1:39

13

Solved

In C++, Why is a boolean 1 byte and not 1 bit of size? Why aren't there types like a 4-bit or 2-bit integers? I'm missing out the above things when writing an emulator for a CPU
Montpelier asked 7/1, 2011 at 15:2

1

Solved

The current (Linux) version of the SysV i386 ABI requires 16-byte stack alignment before a call: The end of the input argument area shall be aligned on a 16 (32, if __m256 is passed on stack) byte...
Personate asked 2/11, 2021 at 5:21

8

I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error: Uncaught Error: Returned values aren't va...
Essayist asked 23/10, 2018 at 19:26

9

Solved

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 f...
Cory asked 20/12, 2010 at 11:3

0

64 bit architecture like x86-64 have word size of 64bits. In this case, if a memory access crosses over the word boundary, then it will require double the time to access data. So alignment is requi...

2

Solved

The common explanation for not fixing some issues with C++ is that it would break the ABI and require recompilation, but on the other hand I encounter statements like this: Honestly, this is true ...
Vacillate asked 4/6, 2021 at 14:28

2

It is said that returning an oversized struct by value (as opposed to returning a pointer to the struct) from a function incurs unnecessary copy on the stack. By "oversized", I mean a str...
Cartilaginous asked 3/6, 2021 at 15:55

© 2022 - 2024 — McMap. All rights reserved.