public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: binutils@sources.redhat.com
Subject: [PATCH] Fix DATA_SEGMENT_ALIGN
Date: Mon, 04 Mar 2002 07:21:00 -0000	[thread overview]
Message-ID: <20020304162130.P2204@sunsite.ms.mff.cuni.cz> (raw)

Hi!

Somehow forgot to post this.
If DATA_SEGMENT_ALIGN (X, Y); is not used in the linker
script (e.g. because of -N), there is no point to use DATA_SEGMENT_END ().
Ok to commit?

2002-02-15  Jakub Jelinek  <jakub@redhat.com>

	* scripttempl/elf.sc: Only use DATA_SEGMENT_END() together with
	DATA_SEGMENT_ALIGN.

--- ld/scripttempl/elf.sc.jj	Tue Feb 12 15:10:29 2002
+++ ld/scripttempl/elf.sc	Fri Feb 15 23:17:52 2002
@@ -70,9 +70,13 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=$
 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) }"
@@ -320,7 +324,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) }

	Jakub

             reply	other threads:[~2002-03-04 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-04  7:21 Jakub Jelinek [this message]
2002-03-04 15:49 ` Alan Modra
2002-03-11  6:59 Jakub Jelinek
2002-03-11 13:33 ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020304162130.P2204@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).