I have two 3rd party libraries. One just has a build for armv6 and the other just has a build for armv7. I need to use both of them in my iOS enterprise application. I've asked the armv6 library vendors to supply a armv7 version, but they haven't been able to do so. (Note: I've already got the answer and will provide it. Someone else asked this in a comment and there wasn't enough room to answer, so I've created its own question, and will provide my answer.)
How to use armv6 third party libraries in an armv7 app?
2k views Asked by Owen Hartnett At
1
There are 1 answers
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in LIBRARIES
- How to install spdlog library?
- How do I add the Luxon library google sheet script
- Installing Eigen to use in VS Code
- "Unable to generate SAFESEH image." but disabling SAFESEH breaks dependency links
- How To Create 1 SBOM File For Android Multi Module Project
- How to directly call static methods in classes in libraries in Google AppsScript
- Using FastLED and SharpIR Libraries with Generic ESP8266 Board
- How C ++ header files hold the cpp respective file definitions if they do not include them on themselves?
- Is there a fundamental reason why only one library can be exposed from a package?
- How can I use a C# NuGet library in a C++ project?
- Error including sysc directory using SystemC and Cmake Linux
- Understanding how to make a library recognise that I have the needed dependencies
- Making animated text in linux terminal
- Python 3.x and Davinci Resolve
- Problem importing Junit in Eclipse(SpringToolSuite4)
Related Questions in ARMV7
- ARM Assembly code is not executing in Vitis IDE
- Interrupt handling with push buttons in ARMv7
- ARM Cortex-A9 MCR for some CoProcs Causes Undefined Instruction in SYS Mode
- Cross compile ncurses for armv7
- Using end of memory address as process stack pointer value causing INVPC hard fault
- Reverse eneneering a password for an archive from Armv7 assembly for projet 1200
- Next JS 14 SWC support for RPi/ARMV7?
- backtrace_symbols() on aarch64 device returns empty on SIGSEGV
- Why the cdrom has not detected by qemu system armv7?
- Why the Link register in FIQ mode will be instruction address plus 4 in thumb mode instead of instruction address plus 2?
- Beginner Question - Assembly (ARMv7): Small Code Analysis with questions
- ArmV7 simulation using cpulator
- Is native library being built into incorrect folder? Android
- How to install custom armabi image into new emulator device
- Why can't I assemble this single FPU instruction with GNU as?
Related Questions in ARMV6
- How to exclude some instructions when compiling C code for arm v6 core using gcc?
- Interrupt deprivileging in ARM V6 micro controller
- How do I run a C++20 program on a Raspberry Pi 1B?
- Atags are non-sensical when booting custom RaspberryPi kernel
- in ARMv6 assembly one code is not working, but the modified version works. Why?
- runtime detection whether ARMv7 ELF binaries can be loaded on ARMv6 host
- pyelftool get symbol absolute address
- ATSAMD GCLK[x] for more Peripherals
- Clarity About TST Instruction - ARM Assembly
- ARMv6 calling convention with args in r0,r3 and return in r1
- Why are non-consecutive loads faster, even when the cache miss penalty is guaranteed to be zero?
- Cortex-M0+ not responding to PendSV
- Macro for optimization level (ARMCC V6)
- Building Python wheels in Docker for Raspberry Pi Zero on x86_64 machine
- Problems installing OpenMediaVault 5 on Raspberry Pi 1
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
The answer is to hack the armv6 library into thinking it's an armv7 library. This will get you running until the vendor supplies the library. The reason this works is because the arm spec requires all arm architectures to be able to run code generated by previous architectures. So if an armv6 library told the linker it's an armv7, the processor should still be able to run the code. Of course, you can't go the other way. Use otool -h on both libraries to see the cputype and cpusubtype. On my libraries it was 12 for both cputypes, and 6 and 9 for the subtypes, indicating armv6 and armv7. Using a hex editor, look for the hex string 0xcefaedfe which is the marker MH_MAGIC (0xfeedface) reversed due to big/little endian.
Following that, there's a whole word with just 0xC. That's the 12 for the cputype. Next is a word for 0x6. Change that to 0x9 for all cases. Now ld will think your library is an armv7, and act accordingly.
You're probably not done, because the armv6 may have linked in some thumbs library routines. If you get link errors (I got some for switch8 and switch16), you need to find the Darwin code that has them. Look for the file lib1funcs.asm on the web. This will probably have your missing functions. They're probably conditionaled out, so adjust the #ifdefs and make sure they're being compiled. This file tries to open some includes at the end, but since they're at the end, they don't affect anything, so just comment them out.
Yes, it is a tremendous hack, but it gets you up and running. If you get your revised library, you just have to drop it in. No code change required. If it works for you, you're still using Apple's code, and it would be the same code you'd be running if you were armv6 only.