Jean-Marc Lasgouttes wrote: >>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> I could write a little script > > Angus> find build/src -name '*.o' | while read file; do objcopy > Angus> --set-section-flags .debug_str=contents,debug $file done > > Angus> and report back on subsequent link times/code size. Would you > Angus> be interested or should I just drop it? > > This looks like a good idea...
All object files up to date, compiled with CXXFLAGS='-g -O -W -Wall'. No executables. $ time make real 4m20.096s user 3m29.100s sys 0m6.730s $ ls -l lyx-xforms lyx-qt -rwxrwxr-x 1 angus angus 99660753 Oct 10 11:02 lyx-qt -rwxrwxr-x 1 angus angus 77899488 Oct 10 11:00 lyx-xforms $ size lyx-xforms lyx-qt text data bss dec hex filename 3729706 399140 48884 4177730 3fbf42 lyx-xforms 3882307 467216 23348 4372871 42b987 lyx-qt $ du -ks . 707540 . Run the script below, named run_objdump.sh: $ time find . -name '*.o' | xargs run_objdump.sh real 0m17.685s user 0m1.870s sys 0m3.840s Now regenerate the executables $ time make real 3m5.312s user 2m12.780s sys 0m5.710s $ ls -l lyx-xforms lyx-qt -rwxrwxr-x 1 angus angus 115340881 Oct 10 11:11 lyx-qt -rwxrwxr-x 1 angus angus 93581708 Oct 10 11:09 lyx-xforms $ size lyx-xforms lyx-qt text data bss dec hex filename 3729706 399140 48884 4177730 3fbf42 lyx-xforms 3882307 467216 23348 4372871 42b987 lyx-qt So, it knocks 1m20 of the link times for the two executables at the expense of 20% greater disk usage. size stats are unchanged. #! /bin/sh test $# -gt 0 || exit while (true); do objcopy --set-section-flags .debug_str=contents,debug $1 shift test $# -eq 0 && break; done -- Angus