public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PAGE Size change on MIPS
@ 2011-02-04  6:11 naveen yadav
  2011-02-08 12:44 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: naveen yadav @ 2011-02-04  6:11 UTC (permalink / raw)
  To: binutils

Hi All,

I want to change page size in kernel. shall I need to change in
binutils the following values. How can i check what the max page size
a particular
toolchain support.

./binutils-stable/bfd/elfn32-mips.c

#define ELF_MAXPAGESIZE                 0x10000
#define ELF_COMMONPAGESIZE              0x1000


Thanks

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

* Re: PAGE Size change on MIPS
  2011-02-04  6:11 PAGE Size change on MIPS naveen yadav
@ 2011-02-08 12:44 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2011-02-08 12:44 UTC (permalink / raw)
  To: naveen yadav; +Cc: binutils

Hi Naveen,

> I want to change page size in kernel. shall I need to change in
> binutils the following values.

Yes.

> How can i check what the max page size a particular
> toolchain support.

By looking at the code in the target specific files in the bfd library. 
  The max page size can in theory be set to any number you like, but 
obviously the intention is that it matches the maximum page size 
supported by the runtime system where the built binaries will be executing.

If you need to find out the max page size for an installed toolchain to 
which you do not have the sources you can use this technique:

   % touch empty.s
   % as empty.s -o empty.o
   % cat > pagesize.t
   SECTIONS
   {
         .foo :
         {
                 LONG (CONSTANT(MAXPAGESIZE)) ;
         }
   }

   % ld -T pagesize.t empty.o
   % objdump -Dz a.out
   00000000 <.foo>:
    0:   00 10                   add    %dl,(%eax)
    2:   00 00                   add    %al,(%eax)

Voila, the max page size for this particular target is 0x1000.

Cheers
   Nick

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

end of thread, other threads:[~2011-02-08 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-04  6:11 PAGE Size change on MIPS naveen yadav
2011-02-08 12:44 ` Nick Clifton

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