Last active
April 11, 2023 07:44
-
-
Save MarkVillacampa/19aa5530c72e308b6e264f465ef0bbec to your computer and use it in GitHub Desktop.
Simple script to extract all the object files (.o) from a static library. By default it extracts the x86_64 architecture but can be easily changed. This is useful to inspect static libraries with Hopper (http://www.hopperapp.com) (You can inspect static libraries with Hopper but it will make you choose with .o file you want to inspect each time).
This file contains 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
#!/usr/bin/env bash | |
lipo -extract_family x86_64 $1 -o $1_thin | |
mkdir $1_objs | |
cd $1_objs | |
ar -x ../$1_thin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment