This commit was generated by cvs2svn to compensate for changes in r925,
[linux-2.6.git] / scripts / modsign / mod-extract.sh
1 #!/bin/sh
2
3 sections=`objdump -h $1 |
4 egrep \(text\|data\) |
5     while read sid sname stuff
6 do
7   echo $sname
8 done`
9
10 echo $sections
11
12 #objcopy -O binary $sections $1 x.raw
13 objcopy -O binary -j .text $1 x.raw
14
15 echo -n >x.raw
16 for i in $sections
17 do
18   objcopy -O binary -j $i $1 x.raw.part
19   cat x.raw.part >>x.raw
20 done
21 rm x.raw.part
22 mv x.raw $2