Skip to content

Instantly share code, notes, and snippets.

@MarkVillacampa
Last active April 11, 2023 07:44
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkVillacampa/19aa5530c72e308b6e264f465ef0bbec to your computer and use it in GitHub Desktop.
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).
#!/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