[fpc-devel]New switch -Oa for 1.1 compiler
Peter Vreman
peter at freepascal.org
Wed Jul 4 22:15:01 CEST 2001
At 21:11 3-7-01, you wrote:
>Hi,
>
> > The 1.1 compiler has a new switch -Oa. It is used for setting the
> > alignment used by the compiler for code and data.
> > Example:
> >
> > -Oaproc=32 Alignment of procedures on 32 bytes boundary
> > -Oavarmin=4,varmax=16 Alignment of global/static variables is at least
> > on 4 bytes, but at maximum of 16 bytes. This will result in an int64 be
> > aligned at 8 bytes and a longint at 4 bytes and sets (32bytes) are aligned
> > at the maximum of 16 bytes.
>
>Does the linking process take care of these settings ? E.g. are the
>different object files which are linked together aligned to this max
>alignment as well ? Else the object files get glued together by ld at 4
>bytes boundaries whatever your variable alignment within these object files
>was...
For go32v2 we use our own linkerscript that has the correct alignments.
>What about strings, ansistrings arrays and record types ?
>Maybe these settings could be set to some default values in accordance to
>the processor type specified (-OpX) to simplify usage a little ?
That's is correct, it is a possible extension that can be made. I made the
code with keeping that in mind. But i don't know the best values so i
didn't code it yet. But it should be easy to add to the compiler for
somebody else.
Peter
More information about the fpc-devel
mailing list