iOS cross-compiling dylib
Due to multiple static libraries, LIBES,LIBFFMPEG,LIBMT. Libpcap not easy to use
In encapsulating a layer of interfaces, a dynamic library (c code) is generated, called by the upper iOS app.
Attention:
ARCH designation, can specify multiple, backwards compatible!
The default instruction set for Apple mobile devices so far------------------------------------------------------------------------------------- ARMV6 devices: IPhone, IPhone2, iphone3g, first generation, second generation IPod TOUCHARMV7 devices: iphone3gs, iPhone4, iphone4s iPad, IPad2, IPad3 (The N ew ipad), ipad mini ipod Touch 3G, ipod touch4armv7s device: IPhone5, IPHONE5C, IPad4 (ipad with Retina Display) arm64 device: IP hone5s, ipad Air, ipad mini2 (ipad mini with Retina Display)
To view dynamic library information using the Lipo-info command
Input file Libmtsql.a is not a FAT file
Non-fat FILE:LIBMTSQL.A is architecture:armv7
You can also use Readelf to read header information.
NM command to view symbolic information, here are some common symbol types
NM output character |
Meaning |
R |
Read only symbol. For example, there is a const MAXDATA = 3095 in the code; Then Maxdata is a read only symbol |
N |
This is a debug symbol |
D |
This is a symbol of a variable that has already been initialized. For example, in code int i = 1 and char *str = "Hello" then I and STR are all symbols of this type |
T |
The symbol for the text segment. Subroutines are such symbols, such as the implementation of a function in a file, then function is the symbol |
U |
Undefined symbol. If a nonexistent function is referenced in the file, then these undefined function symbols are of this type |
S |
An uninitialized symbol, such as a global variable int s; the symbol for S is this type |
When more than one arch structure is specified, multiple addresses appear for the same symbol! Meet today: ios_base_sdk= "8.1"
ios_deploy_tgt= "7.1"
devroot = "$ (shell xcode-select-p)/platforms/iphoneos.platform/developer"
sdkroot = "$ (devroot)/sdks/iphoneos$ (IOS_BASE_SDK). SDK"
8.1 Iphoneos compiled dynamic library, APP foreground call cannot find symbol hint undefined symbols for architecture armv7s reference from. The front desk is theos compiled in the jailbreak development environment.
Suspect: Two connection symbol addresses are different
iOS cross-compiling dylib