summaryrefslogtreecommitdiff
path: root/ld/genscripts.sh
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2001-08-08 13:14:38 +0000
committerAlan Modra <amodra@bigpond.net.au>2001-08-08 13:14:38 +0000
commitcb1028c658ebbbf0eeb5bf26e778e231b2dec438 (patch)
tree771d90ccb5602ba669468555fb08647c65349708 /ld/genscripts.sh
parent174bf3d809f53f3c7963e5dd600654c4fa6ba14b (diff)
downloadbinutils-redhat-cb1028c658ebbbf0eeb5bf26e778e231b2dec438.tar.gz
* genscripts.sh: Source the emulparams script before each output
script is generated so that variables like `RELOCATING' may affect variables defined in the emulparams script.
Diffstat (limited to 'ld/genscripts.sh')
-rwxr-xr-xld/genscripts.sh30
1 files changed, 18 insertions, 12 deletions
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index f6a29703d4..d3ab768ae8 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -99,39 +99,45 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
LD_FLAG=r
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xr
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xr
LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
CONSTRUCTING=" "
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xu
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xu
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
RELOCATING=" "
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.x
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.x
LD_FLAG=n
DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
TEXT_START_ADDR=${NONPAGED_TEXT_START_ADDR-${TEXT_START_ADDR}}
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xn
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xn
LD_FLAG=N
DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xbn
+( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xbn
if test -n "$GENERATE_SHLIB_SCRIPT"; then
LD_FLAG=shared
DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
CREATE_SHLIB=" "
# Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
- (. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xs
+ ( . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d' > ldscripts/${EMULATION_NAME}.xs
fi
for i in $EMULATION_LIBPATH ; do