Program section alignment on MIPS

Thiemo Seufer ths@networkno.de
Tue Mar 27 11:20:00 GMT 2007


Paul Koning wrote:
> I've noticed a change between binutils 2.17 and older versions (2.14
> at least; don't know for sure when this arrived).  In 2.14, the
> program sections were aligned 2**12, which make sense given the MIPS
> page size.  In 2.17 they are aligned 2**16, which I don't want and is
> causing trouble.  

The architecture allows variable page sizes between 1 k and 256 MB (not
all of them need to be implemented in a specific CPU). Some MIPS-based
machines use now 16 k pages for Linux. 64 k is a reasonable upper bound
for the default value, it is overridable via -z max-page-size /
-z common-page-size.

> The biggest problem is that I can't find out where this number comes
> from, nor how to change it.  Looking through the docs for "align"
> turns up assorted things, but none that seem relevant and none that
> help.

Grep for MAXPAGESIZE.


Thiemo



More information about the Binutils mailing list