public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Program section alignment on MIPS
@ 2007-03-27  5:40 Paul Koning
  2007-03-27  8:30 ` Mike Frysinger
  2007-03-27 11:20 ` Thiemo Seufer
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Koning @ 2007-03-27  5:40 UTC (permalink / raw)
  To: binutils

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 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.

	paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Program section alignment on MIPS
  2007-03-27  5:40 Program section alignment on MIPS Paul Koning
@ 2007-03-27  8:30 ` Mike Frysinger
  2007-03-27 11:20 ` Thiemo Seufer
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2007-03-27  8:30 UTC (permalink / raw)
  To: binutils; +Cc: Paul Koning

[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]

On Monday 26 March 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.

search the archives ... this comes up from time to time

> 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.

look at the ELF_MAXPAGESIZE defines in the bfd/*elf*mips* files ... for 2.17, 
you'll need to change the define by hand:
http://uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch?rev=15498&view=auto

in latest binutils, there's a new ld option so you can change it on the 
fly ... -z max-page-size and -z common-page-size
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Program section alignment on MIPS
  2007-03-27  5:40 Program section alignment on MIPS Paul Koning
  2007-03-27  8:30 ` Mike Frysinger
@ 2007-03-27 11:20 ` Thiemo Seufer
  1 sibling, 0 replies; 3+ messages in thread
From: Thiemo Seufer @ 2007-03-27 11:20 UTC (permalink / raw)
  To: Paul Koning; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-27  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27  5:40 Program section alignment on MIPS Paul Koning
2007-03-27  8:30 ` Mike Frysinger
2007-03-27 11:20 ` Thiemo Seufer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).