This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

fix powerpc64-linux executable layout


PowerPC64 Linux wasn't putting data in a separate 256M virtual address
range.  In fixing this, I noticed a couple of places where a large
.text section would cause a problem.

ld/ChangeLog
	* emulparams/elf64ppc.sh (DATA_ADDR): Define.
	* emulparams/elf64_aix.sh (DATA_ADDR): Don't use a fixed address
	for start of .data, instead align up to 256M boundary.
	* scripttempl/aix.sc: Likewise.

Index: ld/emulparams/elf64_aix.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64_aix.sh,v
retrieving revision 1.5
diff -u -p -r1.5 elf64_aix.sh
--- ld/emulparams/elf64_aix.sh	22 Nov 2001 09:08:04 -0000	1.5
+++ ld/emulparams/elf64_aix.sh	24 Sep 2002 03:37:52 -0000
@@ -7,7 +7,7 @@ ARCH=ia64
 MACHINE=
 MAXPAGESIZE=0x10000
 TEXT_START_ADDR="0x10000000"
-DATA_ADDR="0x20000000 + (. & (${MAXPAGESIZE} - 1))"
+DATA_ADDR="ALIGN (0x10000000) + (. & (${MAXPAGESIZE} - 1))"
 GENERATE_SHLIB_SCRIPT=yes
 NOP=0x00300000010070000002000001000400  # a bundle full of nops
 OTHER_GOT_SECTIONS="
Index: ld/emulparams/elf64ppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64ppc.sh,v
retrieving revision 1.6
diff -u -p -r1.6 elf64ppc.sh
--- ld/emulparams/elf64ppc.sh	12 Jul 2002 06:48:54 -0000	1.6
+++ ld/emulparams/elf64ppc.sh	24 Sep 2002 03:37:52 -0000
@@ -5,6 +5,7 @@ GENERATE_SHLIB_SCRIPT=yes
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf64-powerpc"
 TEXT_START_ADDR=0x10000000
+DATA_ADDR="ALIGN (0x10000000) + (. & (${MAXPAGESIZE} - 1))"
 MAXPAGESIZE=0x40000
 COMMONPAGESIZE=0x1000
 ARCH=powerpc:common64
Index: ld/scripttempl/aix.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/aix.sc,v
retrieving revision 1.3
diff -u -p -r1.3 aix.sc
--- ld/scripttempl/aix.sc	3 Dec 2001 23:15:28 -0000	1.3
+++ ld/scripttempl/aix.sc	24 Sep 2002 03:37:52 -0000
@@ -24,7 +24,7 @@ SECTIONS
     *(.tb)
     ${RELOCATING+PROVIDE (_etext = .);}
   }
-  . = 0x20000000;
+  . = ALIGN (0x10000000);
   .data . : {
     ${RELOCATING+PROVIDE (_data = .);}
     *(.data)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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