[fpc-devel] A Compiled file size solution from the GBD mailing-list

Peter Vreman peter at freepascal.org
Thu Jan 17 02:23:29 CET 2008


At 22:25 16-1-2008, you wrote:
>At 21:32 16-1-2008, you wrote:
>
>
>>On Wed, 16 Jan 2008, Peter Vreman wrote:
>>
>> > At 13:17 16-1-2008, you wrote:
>> > >Marco van de Voort wrote:
>> > > >from _EXECUTABLE_ file FILE, iow you still need the unstripped exe.
>> > >
>> > >Perhaps it doesn't need the .text, .data, .bss etc sections though.
>> >
>> > I also posted this on Lazarus mailing list already.
>> >
>> > Below are the 2 commands to make it working. In the first command only the
>> > debug information is kept in lazarus.dbg. And the second is the 
>> already know
>> > way to strip the debug information.
>> >
>>[cut]
>> >
>> > And as a final note: Yes, it is possible to fix fpc to write 
>> such a .dbg file
>> > also.
>>
>>Didn't we receive a patch from the Morfik people which did exactly this ?
>>I remember that we had an email-conversation about it, and I also
>>seem to remember applying a patch ?
>
>There was already a quick hack added with the -Xg option to create a 
>separate .dbg file. But the contents of this file is not good for 
>gdb. We need to rewrite this part to be compatible with gdb and 
>other gnu tools.

Support for a separate .dbg file is now available for windows in 
current svn trunk with the -Xg option. No need anymore for "objcopy 
--only-keep-debug && objcopy --add-debug-link && strip" under 
windows. The external linker (e.g. linux) still be updated to support 
objcopy and strip when -Xg is passed.


Peter




More information about the fpc-devel mailing list