aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-08-08 13:14:38 +0000
committerAlan Modra <amodra@gmail.com>2001-08-08 13:14:38 +0000
commit179c732cf647335e10ad15576c0efa6905f35f36 (patch)
tree74f67c73c129f8d6858024a4bfe2fdf33baf1a2a /ld
parent8fd3e36b8404118d6331e42fef1257af6fa54e5e (diff)
downloadfsf-binutils-gdb-179c732cf647335e10ad15576c0efa6905f35f36.zip
fsf-binutils-gdb-179c732cf647335e10ad15576c0efa6905f35f36.tar.gz
fsf-binutils-gdb-179c732cf647335e10ad15576c0efa6905f35f36.tar.bz2
* 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')
-rw-r--r--ld/ChangeLog6
-rwxr-xr-xld/genscripts.sh30
2 files changed, 24 insertions, 12 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 7f0e2cf..27e9657 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ * 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.
+
2001-08-04 Alan Modra <amodra@bigpond.net.au>
* emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index f6a2970..d3ab768 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