Created
March 7, 2017 13:37
-
-
Save pasko/820f4d6e16304c4485aa552634c2cf2d to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# | |
# Outputs to stdout a CSV with one line per function in libchrome.so. | |
# Should run in <10 seconds. | |
BINARY=gn_android/ReleaseOfficial/lib.unstripped/libchrome.so | |
TOOLCHAIN_PREFIX=third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi | |
echo 'size_in_bytes,demangled_function_name' | |
"$TOOLCHAIN_PREFIX-nm" --print-size --size-sort --reverse-sort "$BINARY" | \ | |
grep " t " | perl -p -e 'my @s = split(" ", $_); $_ = hex($s[1]) . ",$s[3]\n";' | \ | |
"$TOOLCHAIN_PREFIX-c++filt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment