diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-04-25 10:50:40 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-04-25 11:05:16 +0300 |
commit | 848e1ca01aa5ba6a283950a08d7fad2f594ecf88 (patch) | |
tree | 10f4114af5b85656caabbf1ec2f4bcc1626b7f88 /bin/ios-mapfile-statistics | |
parent | 5743570619ee2ef1350b88f708f21cd3ec38bac2 (diff) |
Add help message
Change-Id: Id9c5dfdee00c8b9baa21c7345f7218e982bfd434
Diffstat (limited to 'bin/ios-mapfile-statistics')
-rwxr-xr-x | bin/ios-mapfile-statistics | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/ios-mapfile-statistics b/bin/ios-mapfile-statistics index 4e1f803dee09..98d33429b900 100755 --- a/bin/ios-mapfile-statistics +++ b/bin/ios-mapfile-statistics @@ -3,11 +3,34 @@ use strict; use Getopt::Std; +$Getopt::Std::STANDARD_HELP_VERSION++; my %args; getopts('f:s', \%args); +sub VERSION_MESSAGE { + # Nothing +} + +sub HELP_MESSAGE { + print <<EOS +This program parses a linker map file, especially one produced when linking an iOS executable. + +Input is read from a command-line argument or from standard input. + +By default a list of libraries used and the size of code and data +linked in from each library is printed, in reverse order of size. + +The following options are available: +-s Print a list of symbols instead. +-f 'filter' Filter which libraries are handled. The filter can be + a regular expression, typically several library names + combined with the '|' operator. Makes sense only when + -s is used too. +EOS +} + die "The -f switch makes sense only if -s is also used" if (defined($args{'f'}) && !defined($args{'s'})); my $state = 0; @@ -46,3 +69,4 @@ if ($args{'s'}) { print $_, ": ", $sizeoflib{$_}, "\n"; } } + |