This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PowerPC EABI and segment alignment


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]