[fpc-pascal] Re: -Xg flag and lineinfo/lnfodwrf support

Fabio Dell'Aria fabio.dellaria at gmail.com
Mon Jan 21 10:42:48 CET 2008


Hi,

2008/1/21, Peter Vreman <peter at freepascal.org>:
> > We have a compiled file with debug info (ex: using -gl flag) of 10Mb (about
> > 8Mb are Debug).
> >
> > Currently you use:
> >
> > objcopy --only-keep-debug $EXE $DBG     (read from disk 10Mb from $EXE and
> > write 8Mb for create $DBG)
> > 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)
> > strip --strip-unneeded $EXE     (read from disk $10Mb from $EXE and write to
> > disk 2Mb of modified $EXE)
> >
> > TOTAL:
> > Read from disk: 10+10+8+10 = 38 Mb
> > Write to disk : 8+10+2 = 20 Mb
> >
> > --
> >
> > My new method is:
> >
> > mv $EXE $DBG     (read 0, write 0)
> > strip --strip-unneeded $DBG -o $EXE     (read from disk 10Mb from $DBG and
> > write 2Mb to create stripped $EXE)
> > objcopy --only-keep-debug $DBG $DBG     (read from disk 10Mb from $DBG and
> > write 8Mb of stripped $DBG)
> > 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)
> >
> > TOTAL:
> > Read from disk: 10+10+2+8 = 30 Mb
> > Write to disk : 2+8+2 = 12 Mb
> >
> >
> > 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).
> >
> >
> > What do you think about? ;)
>
> It is just changing the order "strip --strip-unneeded" and "objcopy --add-gnu-debuglink" not the
> same?

Yes! ;)

-- 
Best regards...

Fabio Dell'Aria.



More information about the fpc-pascal mailing list