Mercurial > hg > toybox
view scripts/showasm @ 1271:c214de62b18b draft
Teach cpio to set uid/gid and timestamp. (Timestamp has year 2100 problem.)
Note that directory timestamps are still sometimes wrong because creating
things in a directory can update the timestamp. Also, cp -r has logic to
ensure we can write to a directory that doesn't have write permission,
cpio does not. This is fixable, but not what existing cpio does.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 29 Apr 2014 06:03:17 -0500 |
parents | a43bdc6f53af |
children |
line wrap: on
line source
#!/bin/sh # Copyright 2006 Rob Landley <rob@landley.net> # Dumb little utility function to print out the assembly dump of a single # function, or list the functions so dumpable in an executable. You'd think # there would be a way to get objdump to do this, but I can't find it. [ $# -lt 1 ] || [ $# -gt 2 ] && { echo "usage: showasm file function"; exit 1; } [ ! -f $1 ] && { echo "File $1 not found"; exit 1; } if [ $# -eq 1 ] then objdump -d $1 | sed -n -e 's/^[0-9a-fA-F]* <\(.*\)>:$/\1/p' exit 0 fi objdump -d $1 | sed -n -e '/./{H;$!d}' -e "x;/^.[0-9a-fA-F]* <$2>:/p"