arm64

Can old ARM32 binary files be run on AARCH64 kernel?

旧时模样 提交于 2019-12-05 02:37:36
I am curious about the feasibility of running old ARM32-Linux programs on AARCH64-Linux machines and I conducted some experiments: write a program "Hello, World!" and compile it statically with arm-none-linux-gnueabi-gcc and aarch64-linux-gnu-gcc. statically build and create a ramdisk using busybox and aarch64 compiler. put the 2 "Hello, World!" programs (in ARM32 and AARCH64) to the ramdisk. build a simple AARCH64-Linux kernel with vexpress_defconfig and aarch64 compiler. run the kernel and ramdisk using qemu-system-aarch64. (All binary files including busybox in the ramdisk are statically

ARM64: LDXR/STXR vs LDAXR/STLXR

旧街凉风 提交于 2019-12-04 21:00:44
问题 On iOS, there are two similar functions, OSAtomicAdd32 and OSAtomicAdd32Barrier . I'm wondering when you would need the Barrier variant. Disassembled, they are: _OSAtomicAdd32: ldxr w8, [x1] add w8, w8, w0 stxr w9, w8, [x1] cbnz w9, _OSAtomicAdd32 mov x0, x8 ret lr _OSAtomicAdd32Barrier: ldaxr w8, [x1] add w8, w8, w0 stlxr w9, w8, [x1] cbnz w9, _OSAtomicAdd32Barrier mov x0, x8 ret lr In which scenarios would you need the Load-Acquire / Store-Release semantics of the latter? Can LDXR / STXR

Arm64 Linux Page Table Walk

若如初见. 提交于 2019-12-04 20:33:35
Currently I'm developing some research-related programs and I need to find the pte of some specific addresses. My development environment is Juno r1 board (CPUs are A53 and A57 ) and it's running arm64 Linux kernel. I use some typical page table walk codes like this: int find_physical_pte(void *addr) { pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t *ptep; unsigned long long address; address = (unsigned long long)addr; pgd = pgd_offset(current->mm, address); printk(KERN_INFO "\npgd is: %p\n", (void *)pgd); printk(KERN_INFO "pgd value: %llx\n", *pgd); if (pgd_none(*pgd) || pgd_bad(*pgd)) return -1;

obj_msgSend function pointer crash when build with 64bit arm64

橙三吉。 提交于 2019-12-04 13:08:01
问题 Actually my original code works great with Xcode 5.0.2 and also great for sending to App Store which is: objc_msgSend(self.target, self.successAction, category); This line causes crashes with Xcode5.1 beta5. I found a solution to fix the crash: SudzC ARC version - objc_msgSend call causes EXC_BAD_ACCESS using 64-bit architecture // solution id (*response)(id, SEL, id) = (id (*)(id, SEL, id)) objc_msgSend; response(self.target, self.successAction, category); And I get no problem at all either

build error duplicate symbols arclite.o

大兔子大兔子 提交于 2019-12-04 10:45:23
问题 I am trying to build my Xcode project, but I recieve the error displayed below. Please help me to solve this error, thank you in advance. duplicate symbol __non_lazy_classes in: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/lib/arc/libarclite_iphoneos.a(arclite.o) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a(arclite.o) duplicate symbol _OBJC_METACLASS_$___ARCLite__ in: /Applications/Xcode.app

ARM64: LDXR/STXR vs LDAXR/STLXR

泄露秘密 提交于 2019-12-03 13:56:36
On iOS, there are two similar functions, OSAtomicAdd32 and OSAtomicAdd32Barrier . I'm wondering when you would need the Barrier variant. Disassembled, they are: _OSAtomicAdd32: ldxr w8, [x1] add w8, w8, w0 stxr w9, w8, [x1] cbnz w9, _OSAtomicAdd32 mov x0, x8 ret lr _OSAtomicAdd32Barrier: ldaxr w8, [x1] add w8, w8, w0 stlxr w9, w8, [x1] cbnz w9, _OSAtomicAdd32Barrier mov x0, x8 ret lr In which scenarios would you need the Load-Acquire / Store-Release semantics of the latter? Can LDXR / STXR instructions be reordered? If they can, is it possible for an atomic update to be "lost" in the absence

-[NSInvocation getReturnValue:] with double value produces 0 unexpectedly

半世苍凉 提交于 2019-12-03 11:40:35
问题 I am trying to call a method that returns a double using NSInvocation . But I found that it does not working in 64 bit iOS apps. It works on on OS X, in the simulator -- both 32-bit and 64 bit -- iPad 2, and iPad Air with a 32-bit build. Only the 64-bit build on an iPad Air device has this problem. This is the code to demo the problem: NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:@selector(doubleValue)]; for (int i = 0; i < 10; i++) { NSInvocation *invocation =

build error duplicate symbols arclite.o

旧街凉风 提交于 2019-12-03 06:36:49
I am trying to build my Xcode project, but I recieve the error displayed below. Please help me to solve this error, thank you in advance. duplicate symbol __non_lazy_classes in: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/lib/arc/libarclite_iphoneos.a(arclite.o) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a(arclite.o) duplicate symbol _OBJC_METACLASS_$___ARCLite__ in: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/lib/arc/libarclite_iphoneos.a(arclite.o)

What is difference between arm64 and armhf?

筅森魡賤 提交于 2019-12-03 02:59:43
问题 Raspberry Pi Type 3 has 64-bit CPU, but its architecture is not arm64 but armhf . What is the difference between arm64 and armhf ? 回答1: The previous answer didn't actually say what armhf is. armhf stands for "arm hard float", and is the name given to a debian port for arm processors (armv7+) that have hardware floating point support. On the beaglebone black, for example: :~$ dpkg --print-architecture armhf Although other commands (such as uname -a or 'arch') will just show armv71 :~$ cat

-[NSInvocation getReturnValue:] with double value produces 0 unexpectedly

我怕爱的太早我们不能终老 提交于 2019-12-03 02:12:07
I am trying to call a method that returns a double using NSInvocation . But I found that it does not working in 64 bit iOS apps. It works on on OS X, in the simulator -- both 32-bit and 64 bit -- iPad 2, and iPad Air with a 32-bit build. Only the 64-bit build on an iPad Air device has this problem. This is the code to demo the problem: NSMethodSignature *signature = [NSString instanceMethodSignatureForSelector:@selector(doubleValue)]; for (int i = 0; i < 10; i++) { NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; NSString *str = [NSString stringWithFormat:@"%d