Hi Peter,<br><br>2008/1/20, Peter Vreman <<a href="mailto:peter@freepascal.org">peter@freepascal.org</a>>:<br>> > Ok Peter,<br>> > I'm waiting for your news.<br>> <br>> Finished, see r9813<br><br>
I think to have found a best method to implement -Xg flag on Linux:<br><br>To explain my method I need compare your currently method with my new.<br><br>To do this I use an example:<br><br>We have a compiled file with debug info (ex: using -gl flag) of 10Mb (about 8Mb are Debug).
<br><br>Currently you use:<br><br>objcopy --only-keep-debug $EXE $DBG     (read from disk 10Mb from $EXE and write 8Mb for create $DBG)<br>objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 10Mb from $EXE and 8Mb from $DBG, for calculate CRC32, and wrote 10Mb of modifyed $EXE)
<br>strip --strip-unneeded $EXE     (read from disk $10Mb from $EXE and write to disk 2Mb of modified $EXE)<br><br>TOTAL: <br>Read from disk: 10+10+8+10 = 38 Mb<br>Write to disk : 8+10+2 = 20 Mb<br><br>--<br><br>My new method is:
<br><br>mv $EXE $DBG     (read 0, write 0)<br>strip --strip-unneeded $DBG -o $EXE     (read from disk 10Mb from $DBG and write 2Mb to create stripped $EXE)<br>objcopy --only-keep-debug $DBG $DBG     (read from disk 10Mb from $DBG and write 8Mb of stripped $DBG)
<br>objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 2Mb from $EXE and 8Mb from $DBG, for calculate CRC32, and wrote 2Mb of modifyed $EXE)<br><br>TOTAL: <br>Read from disk: 10+10+2+8 = 30 Mb<br>Write to disk : 2+8+2 = 12 Mb
<br><br><br>As you can see using my new method is possible reduce the read access of about 20% and the write access of about the 40% (the great improvement).<br><br><br>What do you think about? ;)<br><br>-- <br>Best regards...
<br><br>Fabio Dell'Aria.<br>