Dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

6 lines
303 B

#!/bin/sh
# XXX: only works if .interp is numbered < 10 (readelf output is retarded to parse because of the [<nr>] with space padding)
INTERP=`readelf -SW "$1" | grep .interp | awk '{print "dd if='$1' of=/proc/self/fd/1 bs=1 count=$[0x" $7 "] skip=$[0x" $6 "]"}' | sh 2>/dev/null`
exec "$INTERP" "$@"