* genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE before
authorAlan Modra <amodra@gmail.com>
Wed, 25 Sep 2002 07:21:08 +0000 (07:21 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 25 Sep 2002 07:21:08 +0000 (07:21 +0000)
TARGET_PAGE_SIZE.
* scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
SEGMENT_SIZE alignment.
* emulparams/elf64ppc.sh (DATA_ADDR): Delete.
(SEGMENT_SIZE): Define.

ld/ChangeLog
ld/emulparams/elf64ppc.sh
ld/genscripts.sh
ld/scripttempl/elf.sc

index 26d5437948cd2c93f52d68f4e6369cb3c9fc2ded..6eff3797035dbafe73a11a27375bfe26e9d855de 100644 (file)
@@ -1,5 +1,12 @@
 2002-09-25  Alan Modra  <amodra@bigpond.net.au>
 
+       * genscripts.sh (SEGMENT_SIZE): Use MAXPAGESIZE before
+       TARGET_PAGE_SIZE.
+       * scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
+       SEGMENT_SIZE alignment.
+       * emulparams/elf64ppc.sh (DATA_ADDR): Delete.
+       (SEGMENT_SIZE): Define.
+
        * ldexp.c (fold_unary): New.  Split out from exp_fold_tree.
        (fold_binary): Correct abs - non-abs case.
        (fold_trinary): New.  Split out from exp_fold_tree.
index 74185552d0240e9fa73673d7d9d3484071755fc3..c849c6530b87a4d46a6ee89f0112814aed8c4bc6 100644 (file)
@@ -5,7 +5,7 @@ GENERATE_SHLIB_SCRIPT=yes
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf64-powerpc"
 TEXT_START_ADDR=0x10000000
-DATA_ADDR="ALIGN (0x10000000) + (. & (${MAXPAGESIZE} - 1))"
+SEGMENT_SIZE=0x10000000
 MAXPAGESIZE=0x40000
 COMMONPAGESIZE=0x1000
 ARCH=powerpc:common64
index 36e0a9d588a46ed6f082cd0375e64e5df4e156c2..ea995510276a43d572c909974b31508419138a49 100755 (executable)
@@ -90,7 +90,7 @@ if [ "x$SCRIPT_NAME" = "xelf" ]; then
   GENERATE_COMBRELOC_SCRIPT=yes
 fi
 
-SEGMENT_SIZE=${SEGMENT_SIZE-${TARGET_PAGE_SIZE}}
+SEGMENT_SIZE=${SEGMENT_SIZE-${MAXPAGESIZE-${TARGET_PAGE_SIZE}}}
 
 # Determine DATA_ALIGNMENT for the 5 variants, using
 # values specified in the emulparams/<emulation>.sh file or default.
index 6bbe1b802bb044b0885df351c7947f521552421e..0c8ddb522bf8ed84c02f41fe3125a731cb2bb6bc 100644 (file)
@@ -74,10 +74,10 @@ test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
 test "$LD_FLAG" = "N" && DATA_ADDR=.
 test -n "$CREATE_SHLIB" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
 test -z "$CREATE_SHLIB" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
-DATA_SEGMENT_ALIGN="ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))"
+DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
 DATA_SEGMENT_END=""
 if test -n "${COMMONPAGESIZE}"; then
-  DATA_SEGMENT_ALIGN="DATA_SEGMENT_ALIGN(${MAXPAGESIZE}, ${COMMONPAGESIZE})"
+  DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
   DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
 fi
 INTERP=".interp       ${RELOCATING-0} : { *(.interp) }"