TARGET_PAGE_SIZE.
* scripttempl/elf.sc (DATA_SEGMENT_ALIGN): Incorporate
SEGMENT_SIZE alignment.
* emulparams/elf64ppc.sh (DATA_ADDR): Delete.
(SEGMENT_SIZE): Define.
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.
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
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.
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) }"