abi

Is arm64-v8a compatible with armeabi-v7a?

隐身守侯 提交于 2019-12-17 09:19:10
问题 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 hint in the docs, that ARMv8 is also compatible with ARMv7 - can anyone confirm that my app will still work on devices running arm64-v8a, if I don't offer an armeabi but now an armeabi-v7a-library? 回答1: Many modern Android devices (i.e. Nexus 5x)

Creating Library with backward compatible ABI that uses Boost

。_饼干妹妹 提交于 2019-12-17 08:30:51
问题 I'm working on a certain C++ library (or more framework). I want to make it backward compatible with previous versions preserving not only API compatibility but also ABI (like the great job Qt does). I use lots of functionality of Boost and it seems for me that this makes backward compatibility just impossible, unless I force a user to have exactly the same (sometimes old) version of Boost. Is there any way (without rewriting 1/2 of Boost) to make some "prefix" around its namespace/rename it

What are the calling conventions for UNIX & Linux system calls on i386 and x86-64

别说谁变了你拦得住时间么 提交于 2019-12-13 20:08:24
问题 Following links explain x86-32 system call conventions for both UNIX (BSD flavor) & Linux: http://www.int80h.org/bsdasm/#system-calls http://www.freebsd.org/doc/en/books/developers-handbook/x86-system-calls.html But what are the x86-64 system call conventions on both UNIX & Linux? 回答1: Further reading for any of the topics here: The Definitive Guide to Linux System Calls I verified these using GNU Assembler (gas) on Linux. Kernel Interface x86-32 aka i386 Linux System Call convention: In x86

read and print number of command-line arguments in Linux assembly

霸气de小男生 提交于 2019-12-13 05:53:59
问题 I'm writing an assembly program with AT&T syntax (GAS compiling) on an Intel processor and on Ubuntu 14. I'm trying to read the number of parameters passed by the user at the moment of program launch. For instance if user open his terminal and types ./programname x y z I'd like that the nParameters variable assumes value 4 (because programname, x, y and z are parameter). This is what I've done so far but I keep getting a segementation fault error. .code32 .section .data nParameters: .byte 0

Native library not loading under Android 4.0.3 (MIUI ROM)

送分小仙女□ 提交于 2019-12-12 16:26:30
问题 A customer contacted me - an Android app of mine broke once he updated his Android ROM to MIUI equivalent to Android 4.0.3. The relevant line in LogCat is: 04-09 10:37:09.326 17789 17789 E AndroidRuntime: java.lang.UnsatisfiedLinkError: Couldn't load mylib: findLibrary returned null The app, needless to say, worked before the upgrade. So the native library did not go magically missing. Any ideas why would Android 4.0.3 refuse to load a native library where earlier versions would? The library

Mixing C++ ABIs to build against legacy libraries

人盡茶涼 提交于 2019-12-12 11:31:49
问题 Here's the situation, I've got a C++ codebase which is using a recent GCC (4.3.3), but I need to link against an older library which was built using GCC 3.2.3. There is no newer version of the library available, I can't go without it, and it's closed source so it can't be rebuilt. This seems to pose a problem since there are ABI incompatibilities between GCC 4.3.3 and 3.2.3, so I'm trying to see what my options are for resolving this. A few additional details: I can rebuild everything in my

passing rvalue to non-ref parameter, why can't the compiler elide the copy?

落爺英雄遲暮 提交于 2019-12-12 09:42:31
问题 struct Big { int a[8]; }; void foo(Big a); Big getStuff(); void test1() { foo(getStuff()); } compiles (using clang 6.0.0 for x86_64 on Linux so System V ABI, flags: -O3 -march=broadwell ) to test1(): # @test1() sub rsp, 72 lea rdi, [rsp + 40] call getStuff() vmovups ymm0, ymmword ptr [rsp + 40] vmovups ymmword ptr [rsp], ymm0 vzeroupper call foo(Big) add rsp, 72 ret If I am reading this correctly, this is what is happening: getStuff is passed a pointer to foo 's stack ( rsp + 40 ) to use for

Difference in ABI between x86_64 Linux functions and syscalls

痞子三分冷 提交于 2019-12-12 09:35:25
问题 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 other arguments are passed in the same registers for both functions and syscalls. This leads to some strange things. Check out, for example, the implementation of mmap in glibc for the x32 platform (for which the same discrepancy exists): 00432ce0 <__mmap>: 432ce0: 49 89 ca mov %rcx,%r10 432ce3: b8

How should I handle ABI incompatibility between gcc-4.9 and gcc-5?

旧城冷巷雨未停 提交于 2019-12-11 05:37:53
问题 This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 3 years ago . I have recently upgraded my dev machine to Ubuntu 16.04 The default version of gcc is gcc-5.3.1 . A problem that I have is a vendor supplied library is only built using gcc-4.9, which is not compatible with gcc-5. I have asked the vendor to provide a new version of the library, but it is unlikely that that will happen any time soon. In the meantime I have installed gcc-4.9.3 from

How solidity make function signature with tuple(nested abi)?

∥☆過路亽.° 提交于 2019-12-11 01:17:15
问题 struct Test { uint ui; string s; } function test(Test t) public { emit Log(t.ui, t.s); } I have some knowledge about ABI. I made this contract with experimental ABIEncoderV2 option. In conclusion, this function's signature is 0x6056f4cc, I found this value in opcode. I tried some case test(uint256,string), test(tuple(uint256,string)), test(tuple), test(tuple[uint256,string])) with sha3... but no one make correct signature. How solidity make function signature with tuple? 回答1: You're close