[fpc-devel] Image size is too big for target even if external debug file is used

Sven Barth pascaldragon at googlemail.com
Tue Feb 5 17:42:24 CET 2013


Am 05.02.2013 17:31, schrieb Sergei Gorelkin:
> 05.02.2013 19:32, Sven Barth пишет:
>> Hello together!
>>
>> I have a arm-wince project (using LCL) where I have a stacktrace and 
>> I'd like to resolve the symbol
>> information. As I'm not cross debugging I'm using an offline (post 
>> mortem) process for which I
>> compile my application with debug information, but also -Xg to get a 
>> seperate symbol file which I
>> can use with GDB. Now the problem is that since the last time I 
>> needed these symbols my application
>> seems to have gotten big enough that the debug information triggers 
>> the "Executable image size too
>> big for arm-wince target" error.
>>
>> I'm currently using 2.6.0 on i386-win32. If compiled for i386-win32 
>> the application's size is 3.7 MB
>> while the debug information size is 42 MB (the application size for 
>> arm-wince is 4.3 MB).
>>
>> I've looked a bit inside the compiler and shouldn't it be possible 
>> and worthwhile to not raise this
>> error if one is cross compiling and currently the debug file is 
>> generated (the corresponding
>> location is - in trunk - ogbase.TExeOutput.SetCurMemPos)? Or maybe 
>> define a list of targets where it
>> should be allowed when cross compiling.
>>
>
> An interesting issue. On ELF targets all debug sections are placed at 
> zero address, so such error can arise only if size of a single section 
> exceeds limit, but on COFF targets like arm-wince debug sections 
> consume address space (although they are not loaded).
> Maybe we should simply ignore the address limit for debug sections, or 
> maybe only when generating external debug file.
That's the idea. You are currently more experienced regarding the output 
generator, so if you can find the time to change this...

I've solved the problem for now by not compiling the LCL with debug 
information, but even then my debug information is already ~25 MB and 
the size limit on WinCE is around 33 MB. (and the error I experienced 
was in FPC's RTL and was fixed by me in r23574 :) )

Regards,
Sven



More information about the fpc-devel mailing list