>> Here's a script that does what I was looking for:
><snip>
Mmmmh, perlgolf?
>#!/bin/bash
>for a in "$@"
>do
> objdump -d "$a" -j .text
>done | perl -ne'
>BEGIN{%h=();$b=0};
>END{if($b){$h{$b}++};print map("$_: $h{$_}\n", sort(keys(%h)))};
>if(/\tnop $/){$h{nop}++}
>elsif(/^[\s0-9a-f]{8}:\t([^\t]+) (\t?)/){
> $b+=split(" ",$1);if($2){$h{$b}++;$b=0}}'
objdump -j .text -d "$@" | perl -ne '
END{$h{$b}++if$b;print map"$_: $h{$_}\n",sort keys%h};
if(/\tnop\s*$/){$h{nop}++}
elsif(/^.*?:\t([^\t]+) (\t?)/){
$b+=split/ /,$1;if($2){$h{$b}++;$b=0}}'
Jan Engelhardt
--
| Alphagate Systems, http://alphagate.hopto.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|