Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-01

problem with fpcres on mac

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jonas Maebe
to zeljko
zeljko wrote 6 lines
I've already filled up an issue http://bugs.freepascal.org/view.php?id=15586 which shows the problem. It cannot link application with > 255 lfms (mac only - win32 & linux are ok). fpc-2.4.1 r14802 Anyone ?

I don't know how fcl-res deals with resources, but if it creates a separate section in the object file for each resource, then that is probably the problem (mach-o object files are limited to 255 sections). If that is indeed the problem, then instead of creating separate sections it should simply put everything in a single section with a global symbol in front of each resource. Dead code stripping (aka "smart linking") happens based on global symbols on Mac OS X, not based on sections.

Jonas

Reply by email

Paul Ishenin
to Jonas Maebe
Jonas Maebe wrote 8 lines
I don't know how fcl-res deals with resources, but if it creates a separate section in the object file for each resource, then that is probably the problem (mach-o object files are limited to 255 sections). If that is indeed the problem, then instead of creating separate sections it should simply put everything in a single section with a global symbol in front of each resource. Dead code stripping (aka "smart linking") happens based on global symbols on Mac OS X, not based on sections.

As far as I can see it uses only one section.

Best regards,
Paul Ishenin.

Reply by email