diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/emulparams/elf64ppc.sh | 2 | ||||
-rwxr-xr-x | ld/genscripts.sh | 2 | ||||
-rw-r--r-- | ld/scripttempl/elf.sc | 4 |
4 files changed, 11 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 26d5437..6eff379 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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. diff --git a/ld/emulparams/elf64ppc.sh b/ld/emulparams/elf64ppc.sh index 7418555..c849c65 100644 --- a/ld/emulparams/elf64ppc.sh +++ b/ld/emulparams/elf64ppc.sh @@ -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 diff --git a/ld/genscripts.sh b/ld/genscripts.sh index 36e0a9d..ea99551 100755 --- a/ld/genscripts.sh +++ b/ld/genscripts.sh @@ -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. diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 6bbe1b8..0c8ddb5 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -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) }" |