public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PowerPC EABI and segment alignment
@ 2006-07-24 20:16 Michael Eager
  0 siblings, 0 replies; only message in thread
From: Michael Eager @ 2006-07-24 20:16 UTC (permalink / raw)
  To: binutils

The PowerPC SVR4 ABI specifies that segments are to be aligned
on a 64K (0x10000) boundary. The PowerPC EABI specifies that there
are no alignment restrictions for loadable segments.  Probably
the best segment alignment value for EABI would be 8 or 16 bytes.

The alignment is controlled by ELF_MAXPAGESIZE and ELF_MINPAGESIZE
in bfd/elf32-ppc.c and MAXPAGESIZE and COMMONPAGESIZE in
ld/emulparams/elf32ppc.sh.  These are set to the appropriate values
for SVR4, even when binutils configured for powerpc-eabi.

The configuration in bfd and ld for powerpc-sysv and powerpc-eabi
are identical.

What would be the best way to change binutils to have the correct
segment alignment for powerpc-eabi?

I can separate the powerpc-eabi config in bfd and ld from
powerpc-sysv.  Another way is to set a create an EABI define.
There's also some code which creates a define for QNX in the
bfd config and uses this to set ELF_MAXPAGESIZE.  (The define is
only set for ARM, and only referenced in PPC, so this seems to be
cruft.)

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-24 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-24 20:16 PowerPC EABI and segment alignment Michael Eager

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