Hello Lazarus-List, I'm used to use a:
strip program.exe --strip-all Before releasing an exe, as it is quite easy operation, but since a few weeks (maybe some months) strip can not remove all "extra" information in the exe file. I have activated the -g and -gl flags to generate debug information in the exe file, and this is how the exe sections appear: >Object table: ># Name VirtSize RVA PhysSize Phys off Flags >-- -------- -------- -------- -------- -------- -------- >01 .text 00116B90 00001000 00116B90 00000400 60500020 [CER] >02 .data 0004B8D8 00118000 0004B8D8 00117000 C0500040 [IRW] >03 .bss 00007054 00164000 00000000 00000000 C0500080 [URW] >04 .idata 00002A08 0016C000 00002A08 00162A00 C0300040 [IRW] >05 .rsrc 00001F78 0016F000 00001F78 00165600 C0500040 [IRW] >06 /4 00304232 00171000 00304232 00167600 02100000 [D] >07 /16 0021E233 00476000 0021E233 0046BA00 02100000 [D] >08 /30 0005A3B4 00695000 0005A3B4 00689E00 02100000 [D] >09 /42 0002CDBC 006F0000 0002CDBC 006E4200 02300000 [D] >0a .stab 0014DAA4 0071D000 0014DAA4 00711000 02300000 [D] >0b .stabstr 00852873 0086B000 00852873 0085EC00 02100000 [D] Which is more or less the expected, except that I do not know what are the /4, /16, /30 and /42 sections. The exe size is around 18 MB. If I run the strip-all command I get: >Object table: ># Name VirtSize RVA PhysSize Phys off Flags >-- -------- -------- -------- -------- -------- -------- >01 .text 00116B90 00001000 00116C00 00000400 60000020 [CER] >02 .data 0004B8D8 00118000 0004BA00 00117000 C0000040 [IRW] >03 .bss 00007054 00164000 00000000 00000000 C0000080 [URW] >04 .idata 00002A08 0016C000 00002C00 00162A00 C0000040 [IRW] >05 .rsrc 00001F78 0016F000 00002000 00165600 50000040 [ISR] >06 /4 00304232 00171000 00304400 00167600 C0000020 [CRW] >07 /16 0021E233 00476000 0021E400 0046BA00 C0000020 [CRW] >08 /30 0005A3B4 00695000 0005A400 00689E00 C0000020 [CRW] >09 /42 0002CDBC 006F0000 0002CE00 006E4200 C0000020 [CRW] And sections starting with "/" are not being removed and the exe size is around 7 MB. Now unchecking the -g and -gl flags I get: >Object table: ># Name VirtSize RVA PhysSize Phys off Flags >-- -------- -------- -------- -------- -------- -------- >01 .text 001153B0 00001000 001153B0 00000400 60500020 [CER] >02 .data 0004B848 00117000 0004B848 00115800 C0500040 [IRW] >03 .bss 00005404 00163000 00000000 00000000 C0500080 [URW] >04 .idata 000029F0 00169000 000029F0 00161200 C0300040 [IRW] >05 .rsrc 00001F78 0016C000 00001F78 00163C00 C0500040 [IRW] Which is the expected result and exe size around 1.7 MB. I had tried to issue a: strip program.exe --remove-section=/4 without success. Does this means that the strip is not usable anymore or that sections should not be there or have different flags ? I'm using fpc SVN, Lazarus SVN and WinXP SP3. Thank you. -- Best regards, JoshyFun -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
