This is the mail archive of the binutils@sourceware.cygnus.com 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]

elf-powerpc pagesize discrepancy?


I spent some time yesterday tracking down why the linker was adding an
large amount of space between the end of the text and the beginning of
the data segment in my images.  I tracked this down to the line:

        ${RELOCATING+. ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}

Which adjusts the address of the next page.  Normal enough, but I was
suprised to discover that MAXPAGESIZE is defined to be 0x40000.  This
struck me as an odd value for a processor with 4K pages.  

But I checked with the SysV ABI PPC Supplement and discovered that it
allows operating systems to cluster physical pages into logical pages
up to 0x10000 bytes in size (which cooresponds to ELF_MAXPAGESIZE in
bfd/elf32-ppc.c).  But I can't find anything that refers to a 0x40000
byte page.  Similarly, the SysV ABI recommends a 0x2000000 text start
address, while we use 0x1800000.

With an embedded target, I'm more interested with the physical page
size.  As I checked the PowerPC EABI to see if it modified the page
size and didn't find anything, it looks like I'll be writing a custom
linker script.  But I thought I'd mention the discrepancy in case this
matters on powerpc hosts.

        --jtc

-- 
J.T. Conklin
RedBack Networks

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