* scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Mar 2002 11:56:23 +0000 (11:56 +0000)
committerJakub Jelinek <jakub@redhat.com>
Tue, 5 Mar 2002 11:56:23 +0000 (11:56 +0000)
DATA_SEGMENT_ALIGN.

ld/ChangeLog
ld/scripttempl/elf.sc

index 28f9b7d99e7a9f71cf836f2201b31655e5bc0818..66a68ff82f579476371301fa9fd52509503c69d8 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-05  Jakub Jelinek  <jakub@redhat.com>
+
+       * scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
+       DATA_SEGMENT_ALIGN.
+
 2002-03-04  H.J. Lu <hjl@gnu.org>
 
        * scripttempl/elf.sc: Put .preinit_array, .init_array and
index a6bc4bc8016a28698672da2afd178ed7f3234a21..f205a6fc6122cf10d35dfea0c922800dacc4eff0 100644 (file)
@@ -70,9 +70,13 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
 test -z "${ELFSIZE}" && ELFSIZE=32
 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))"
-if [ -n "${COMMONPAGESIZE}" ]; then
+DATA_SEGMENT_END=""
+if test -n "${COMMONPAGESIZE}"; then
   DATA_SEGMENT_ALIGN="DATA_SEGMENT_ALIGN(${MAXPAGESIZE}, ${COMMONPAGESIZE})"
+  DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
 fi
 INTERP=".interp       ${RELOCATING-0} : { *(.interp) }"
 PLT=".plt          ${RELOCATING-0} : { *(.plt) }"
@@ -337,7 +341,7 @@ cat <<EOF
   ${RELOCATING+_end = .;}
   ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
   ${RELOCATING+PROVIDE (end = .);}
-  ${COMMONPAGESIZE+${RELOCATING+. = DATA_SEGMENT_END (.);}}
+  ${RELOCATING+${DATA_SEGMENT_END}}
 
   /* Stabs debugging sections.  */
   .stab          0 : { *(.stab) }