[fpc-devel] Re: strange error with arm compiler when compiling-running this code

Peter Vreman peter at freepascal.org
Sun Mar 18 18:01:18 CET 2007


At 17:21 18-3-2007, you wrote:

>--- Peter Vreman <peter at freepascal.org> wrote:
>
> > At 09:59 18-3-2007, you wrote:
> > >So any ideas a least what it could be related to?
> > >i mean if i want to fix it what should i test/look
> > >for?
> > >problem with alignment of segments or...?
> > >
> > >i just tried to use fpc external linker with
> > microsoft
> > >linker.and with some headaches creating 1300 line
> > of
> > >/merge:this section=that section.(by the way why
> > fpc
> > >creates this too much different sections?why not
> > just
> > >put all code in .text?!)linked and created program
> > now
> > >works.
> > >
> > >So it seems the problem is related to gnu linker
> > >script,and i think maybe this script concept is
> > also
> > >used for internal linker too,so both of them fail
> > >linking correctly.
> >
> > These sections are the basic infrastructure of
> > smartlinking. If
> > required can be disabled for the target in general.
>
>How?is there an option?

Remove the tf_smartlink_sections flag for the target in i_*.pas


>And if they are reuired why doesnt microsoft compiler
>produce that much sections?(or it does?)

I don't know what MS does. At least Borland also uses sections per 
function even in the TP ages inside the TPU/DCU. And for gcc there is 
-ffunction-section -fdata-sections and the --gc-sections for the linker (ld).


Peter




More information about the fpc-devel mailing list