Integrate ELF binary into iOS app

Hello developers,

I have a ELF 32bit binary which is taken from an Android app. The format is:

ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped

Is there any way to integrate the same binary into an iOS App? It is my understanding that I will need a way to converto ELF to Mach-O format, is that correct? Is such a thing technically possible?

Thank you, Kalpa

Replies

Instead of converting ELF to Mach-O, rebuild the library from source using Xcode. A direct conversion will likley expose you to many scenarios that aren't supported, while a rebuild using Xcode will ensure the binary is correctly structured. For example, a binary that tries to address pointers in the lower 32-bits will not work — here's another thread where I discuss a specific scenario around that.