[PATCH] Set COMMONPAGESIZE to 4KB on ppc32
Daniel Jacobowitz
drow@mvista.com
Thu Jan 29 17:24:00 GMT 2004
On Sat, Jan 17, 2004 at 10:42:32PM +0100, Thiemo Seufer wrote:
> AFAICS it saves less than one page in the data segment, and impedes
> the binary loader's performance by a miniscule amount. Hmm, ELF64 MIPS
> is the most likely to use large pages while having the least memory
> constraints, so COMMONPAGESIZE should IMHO be defined for every MIPS
> other than elf64b{,ts}mip.
In that case I propose this patch, which should affect SH Linux (both
32 and 64 bit, probably, but that seems in line with the SH systems
I've worked with), MIPS o32 and n32, and ARM. I see Alan's already
taken care of 32-bit PPC.
OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-01-29 Daniel Jacobowitz <drow@mvista.com>
* emulparams/armelf_linux.sh (COMMONPAGESIZE): Set to 4KB.
* emulparams/elf32bmip.sh (COMMONPAGESIZE): Likewise.
* emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Likewise.
* emulparams/elf32btsmipn32.sh (COMMONPAGESIZE): Likewise.
* emulparams/shlelf_linux.sh (COMMONPAGESIZE): Likewise.
Index: emulparams/armelf_linux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armelf_linux.sh,v
retrieving revision 1.9
diff -u -p -r1.9 armelf_linux.sh
--- emulparams/armelf_linux.sh 9 Oct 2003 14:06:07 -0000 1.9
+++ emulparams/armelf_linux.sh 29 Jan 2004 17:22:04 -0000
@@ -4,6 +4,7 @@ OUTPUT_FORMAT="elf32-littlearm"
BIG_OUTPUT_FORMAT="elf32-bigarm"
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
MAXPAGESIZE=0x8000
+COMMONPAGESIZE=0x1000
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=armelf
GENERATE_SHLIB_SCRIPT=yes
Index: emulparams/elf32bmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bmip.sh,v
retrieving revision 1.4
diff -u -p -r1.4 elf32bmip.sh
--- emulparams/elf32bmip.sh 30 Jan 2002 02:22:14 -0000 1.4
+++ emulparams/elf32bmip.sh 29 Jan 2004 17:22:04 -0000
@@ -8,6 +8,7 @@ LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
+COMMONPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
test -n "${EMBEDDED}" || TEXT_DYNAMIC=
Index: emulparams/elf32bmipn32.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bmipn32.sh,v
retrieving revision 1.7
diff -u -p -r1.7 elf32bmipn32.sh
--- emulparams/elf32bmipn32.sh 17 Oct 2002 21:54:44 -0000 1.7
+++ emulparams/elf32bmipn32.sh 29 Jan 2004 17:22:04 -0000
@@ -3,6 +3,7 @@ OUTPUT_FORMAT="elf32-nbigmips"
BIG_OUTPUT_FORMAT="elf32-nbigmips"
LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
SHLIB_TEXT_START_ADDR=0x5ffe0000
+COMMONPAGESIZE=0x1000
# IRIX6 defines these symbols. 0x34 is the size of the ELF header.
EXECUTABLE_SYMBOLS="
Index: emulparams/elf32btsmipn32.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32btsmipn32.sh,v
retrieving revision 1.5
diff -u -p -r1.5 elf32btsmipn32.sh
--- emulparams/elf32btsmipn32.sh 13 Oct 2003 19:48:39 -0000 1.5
+++ emulparams/elf32btsmipn32.sh 29 Jan 2004 17:22:04 -0000
@@ -5,6 +5,7 @@
OUTPUT_FORMAT="elf32-ntradbigmips"
BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
+COMMONPAGESIZE=0x1000
# Magic sections.
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
Index: emulparams/shlelf_linux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shlelf_linux.sh,v
retrieving revision 1.3
diff -u -p -r1.3 shlelf_linux.sh
--- emulparams/shlelf_linux.sh 3 Jun 2003 04:51:49 -0000 1.3
+++ emulparams/shlelf_linux.sh 29 Jan 2004 17:22:04 -0000
@@ -5,6 +5,7 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sh-linux"
TEXT_START_ADDR=0x400000
MAXPAGESIZE=0x10000
+COMMONPAGESIZE=0x1000
ARCH=sh
MACHINE=
TEMPLATE_NAME=elf32
More information about the Binutils
mailing list