Last active
August 6, 2020 15:03
-
-
Save looping/cd25b16e93b8fa3158cf to your computer and use it in GitHub Desktop.
Hack a .a library file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using libtool, lipo, ar and otool | |
lipo -info input.a | |
lipo -extract_family arm64 -output output.a input.a | |
# output.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it) | |
# lipo output.a -thin arm64 -output output_arm64.a | |
ar -x output_arm64.a | |
otool -tv xxx.o | |
libtool -static -o output_arm64_new.a *.o | |
lipo -create -output lib.a output_arm64_new.a output_armv7s_new.a output_armv7_new.a output_i386_new.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment