aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog14
-rw-r--r--ld/Makefile.am194
-rw-r--r--ld/Makefile.in202
-rw-r--r--ld/emulparams/gld960.sh4
-rw-r--r--ld/emulparams/gld960coff.sh4
-rw-r--r--ld/emulparams/lnk960.sh4
-rw-r--r--ld/emulparams/m88kbcs.sh4
-rw-r--r--ld/emulparams/vanilla.sh4
-rwxr-xr-xld/genscripts.sh99
-rwxr-xr-xld/genscripts_extra.sh335
10 files changed, 292 insertions, 572 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 7961b76..03f47d6 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,19 @@
2003-10-16 Alan Modra <amodra@bigpond.net.au>
+ * Makefile.am (GENSCRIPTS_EXTRA, GEN_EXTRA_DEPENDS): Remove. Use
+ GENSCRIPTS and GEN_DEPENDS in place of these.
+ * Makefile.in: Regenerate.
+ * genscripts_extra.sh: Delete. Merge extra functionality to..
+ * genscripts.sh: ..here.
+
+ * emulparams/gld960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Define.
+ * emulparams/gld960coff.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
+ * emulparams/lnk960.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
+ * emulparams/m88kbcs.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
+ * emulparams/vanilla.sh (TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
+
+2003-10-16 Alan Modra <amodra@bigpond.net.au>
+
* emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse): Don't
use $EMULATION_NAME to call bfd function.
diff --git a/ld/Makefile.am b/ld/Makefile.am
index fea073b..549c27b 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -446,12 +446,6 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
-# FIXME: genscripts_extra.sh is a drop in replacement for genscripts.sh
-# with some added functionality. The rules below ought to be changed
-# to use genscripts_extra.sh and then genscripts.sh should be made obsolete.
-GENSCRIPTS_EXTRA = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts_extra.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
-GEN_EXTRA_DEPENDS = $(srcdir)/genscripts_extra.sh stringify.sed
-
@TDIRS@
ea29k.c: $(srcdir)/emulparams/a29k.sh \
@@ -1083,192 +1077,192 @@ emn10200.c: $(srcdir)/emulparams/mn10200.sh \
${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x110 "$(tdir_msp430x110)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x112 "$(tdir_msp430x112)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1101 "$(tdir_msp430x1101)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1111 "$(tdir_msp430x1111)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1121 "$(tdir_msp430x1121)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1122 "$(tdir_msp430x1122)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1132 "$(tdir_msp430x1132)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x122 "$(tdir_msp430x122)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x123 "$(tdir_msp430x123)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1222 "$(tdir_msp430x1222)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1232 "$(tdir_msp430x1232)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x133 "$(tdir_msp430x133)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x135 "$(tdir_msp430x135)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1331 "$(tdir_msp430x1331)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1351 "$(tdir_msp430x1351)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x147 "$(tdir_msp430x147)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x148 "$(tdir_msp430x148)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x149 "$(tdir_msp430x149)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x155 "$(tdir_msp430x155)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x156 "$(tdir_msp430x156)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x157 "$(tdir_msp430x157)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x167 "$(tdir_msp430x167)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x168 "$(tdir_msp430x168)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x169 "$(tdir_msp430x169)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x311 "$(tdir_msp430x311)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x312 "$(tdir_msp430x312)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x313 "$(tdir_msp430x313)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x314 "$(tdir_msp430x314)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x315 "$(tdir_msp430x315)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x323 "$(tdir_msp430x323)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x325 "$(tdir_msp430x325)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x336 "$(tdir_msp430x336)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x337 "$(tdir_msp430x337)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x412 "$(tdir_msp430x412)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x413 "$(tdir_msp430x413)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xE423 "$(tdir_msp430xE423)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xE425 "$(tdir_msp430xE425)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xE427 "$(tdir_msp430xE427)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xW423 "$(tdir_msp430xW423)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xW425 "$(tdir_msp430xW425)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xW427 "$(tdir_msp430xW427)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x435 "$(tdir_msp430x435)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x436 "$(tdir_msp430x436)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x437 "$(tdir_msp430x437)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x447 "$(tdir_msp430x447)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x448 "$(tdir_msp430x448)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x449 "$(tdir_msp430x449)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
enews.c: $(srcdir)/emulparams/news.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} news "$(tdir_news)"
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 1006b3f..a12d6ed 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -537,12 +537,6 @@ POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
-# FIXME: genscripts_extra.sh is a drop in replacement for genscripts.sh
-# with some added functionality. The rules below ought to be changed
-# to use genscripts_extra.sh and then genscripts.sh should be made obsolete.
-GENSCRIPTS_EXTRA = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts_extra.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
-GEN_EXTRA_DEPENDS = $(srcdir)/genscripts_extra.sh stringify.sed
-
# We need this for automake to use YLWRAP.
EXTRA_ld_new_SOURCES = deffilep.y
@@ -611,7 +605,7 @@ deffilep.c ldgram.c ldlex.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = gtar
+TAR = tar
GZIP_ENV = --best
SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
OBJECTS = $(ld_new_OBJECTS)
@@ -888,7 +882,7 @@ uninstall-man:
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -908,7 +902,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $$MAKEFLAGS; amf=$$2; \
+ @set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
@@ -1093,7 +1087,7 @@ distclean-generic:
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "ldlexcdeffilephdeffilepcldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexc deffileph deffilepc ldgramh ldgramc $(MAINTAINERCLEANFILES)
+ -test -z "ldlex.cdeffilep.hdeffilep.cldgram.hldgram.c$(MAINTAINERCLEANFILES)" || rm -f ldlex.c deffilep.h deffilep.c ldgram.h ldgram.c $(MAINTAINERCLEANFILES)
mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
@@ -1809,192 +1803,192 @@ emn10200.c: $(srcdir)/emulparams/mn10200.sh \
${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x110 "$(tdir_msp430x110)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x112 "$(tdir_msp430x112)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1101 "$(tdir_msp430x1101)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1111 "$(tdir_msp430x1111)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1121 "$(tdir_msp430x1121)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1122 "$(tdir_msp430x1122)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1132 "$(tdir_msp430x1132)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x122 "$(tdir_msp430x122)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x123 "$(tdir_msp430x123)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1222 "$(tdir_msp430x1222)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1232 "$(tdir_msp430x1232)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x133 "$(tdir_msp430x133)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x135 "$(tdir_msp430x135)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1331 "$(tdir_msp430x1331)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x1351 "$(tdir_msp430x1351)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x147 "$(tdir_msp430x147)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x148 "$(tdir_msp430x148)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x149 "$(tdir_msp430x149)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x155 "$(tdir_msp430x155)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x156 "$(tdir_msp430x156)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x157 "$(tdir_msp430x157)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x167 "$(tdir_msp430x167)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x168 "$(tdir_msp430x168)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x169 "$(tdir_msp430x169)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x311 "$(tdir_msp430x311)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x312 "$(tdir_msp430x312)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x313 "$(tdir_msp430x313)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x314 "$(tdir_msp430x314)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x315 "$(tdir_msp430x315)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x323 "$(tdir_msp430x323)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x325 "$(tdir_msp430x325)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x336 "$(tdir_msp430x336)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x337 "$(tdir_msp430x337)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x412 "$(tdir_msp430x412)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x413 "$(tdir_msp430x413)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xE423 "$(tdir_msp430xE423)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xE425 "$(tdir_msp430xE425)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xE427 "$(tdir_msp430xE427)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xW423 "$(tdir_msp430xW423)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xW425 "$(tdir_msp430xW425)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430xW427 "$(tdir_msp430xW427)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x435 "$(tdir_msp430x435)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x436 "$(tdir_msp430x436)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x437 "$(tdir_msp430x437)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x447 "$(tdir_msp430x447)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x448 "$(tdir_msp430x448)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
- ${GEN_EXTRA_DEPENDS}
- ${GENSCRIPTS_EXTRA} msp430x449 "$(tdir_msp430x449)" msp430all
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
enews.c: $(srcdir)/emulparams/news.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} news "$(tdir_news)"
diff --git a/ld/emulparams/gld960.sh b/ld/emulparams/gld960.sh
index ef81a78..1e03965 100644
--- a/ld/emulparams/gld960.sh
+++ b/ld/emulparams/gld960.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=i960
OUTPUT_FORMAT=""
-TEXT_START_ADDR=??
-TARGET_PAGE_SIZE=??
+TEXT_START_ADDR=0
+TARGET_PAGE_SIZE=128
ARCH=i960
TEMPLATE_NAME=gld960
GLD_STYLE=1
diff --git a/ld/emulparams/gld960coff.sh b/ld/emulparams/gld960coff.sh
index 7820220..65b0dca 100644
--- a/ld/emulparams/gld960coff.sh
+++ b/ld/emulparams/gld960coff.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=i960
OUTPUT_FORMAT=""
-TEXT_START_ADDR=??
-TARGET_PAGE_SIZE=??
+TEXT_START_ADDR=0
+TARGET_PAGE_SIZE=128
ARCH=i960
TEMPLATE_NAME=gld960c
GLD_STYLE=1
diff --git a/ld/emulparams/lnk960.sh b/ld/emulparams/lnk960.sh
index 3cf3fc4..4a650f7 100644
--- a/ld/emulparams/lnk960.sh
+++ b/ld/emulparams/lnk960.sh
@@ -1,6 +1,6 @@
SCRIPT_NAME=i960
OUTPUT_FORMAT=""
-TEXT_START_ADDR=??
-TARGET_PAGE_SIZE=??
+TEXT_START_ADDR=0
+TARGET_PAGE_SIZE=128
ARCH=i960
TEMPLATE_NAME=lnk960
diff --git a/ld/emulparams/m88kbcs.sh b/ld/emulparams/m88kbcs.sh
index 6c6737c..d48a1eb 100644
--- a/ld/emulparams/m88kbcs.sh
+++ b/ld/emulparams/m88kbcs.sh
@@ -1,5 +1,5 @@
SCRIPT_NAME=m88kbcs
OUTPUT_FORMAT="coff-m88kbcs"
-TEXT_START_ADDR=??
-TARGET_PAGE_SIZE=??
+TEXT_START_ADDR=0
+TARGET_PAGE_SIZE=128
ARCH=m88k
diff --git a/ld/emulparams/vanilla.sh b/ld/emulparams/vanilla.sh
index d8a3b72..eabb7cd 100644
--- a/ld/emulparams/vanilla.sh
+++ b/ld/emulparams/vanilla.sh
@@ -1,5 +1,5 @@
SCRIPT_NAME=vanilla
-TEXT_START_ADDR=??
-TARGET_PAGE_SIZE=??
+TEXT_START_ADDR=0
+TARGET_PAGE_SIZE=128
ARCH=unknown
TEMPLATE_NAME=vanilla
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index c06c0d5..4c7226a 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -1,15 +1,61 @@
#!/bin/sh
# genscripts.sh - generate the ld-emulation-target specific files
#
-# Usage: genscripts.sh srcdir libdir exec_prefix \
-# host target target_alias default_emulation \
-# native_lib_dirs use_sysroot this_emulation tool_dir
+# Usage: genscripts_extra.sh \
+# srcdir \
+# libdir \
+# exec_prefix \
+# host \
+# target \
+# target_alias \
+# default_emulation \
+# native_lib_dirs \
+# use_sysroot \
+# this_emulation \
+# optional:
+# tool_dir \
+# customizer_script
#
# Sample usage:
-# genscripts.sh /djm/ld-devo/devo/ld /usr/local/lib /usr/local \
-# sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sparc-sun-sunos4.1.3 sun4 \
-# "" no sun3 sparc-sun-sunos4.1.3
-# produces sun3.x sun3.xbn sun3.xn sun3.xr sun3.xu em_sun3.c
+#
+# genscripts_extra.sh \
+# /sources/ld \
+# /usr/local/lib \
+# /usr/local \
+# sparc-sun-sunos4.1.3 \
+# sparc-sun-sunos4.1.3 \
+# sparc-sun-sunos4.1.3 \
+# sun4 \
+# "" \
+# no \
+# sun3 \
+# sparc-sun-sunos4.1.3 \
+# sparc.sh
+#
+# produces the linker scripts:
+#
+# sun3.x [default linker script]
+# sun3.xbn [used when the linker is invoked with "-N"]
+# sun3.xn [used when the linker is invoked with "-n"]
+# sun3.xr [used when the linker is invoked with "-r"]
+# sun3.xu [used when the linker is invoked with "-Ur"]
+# and maybe:
+# sun3.xc [used when the linker is invoked with "-z combreloc"]
+# sun3.xsc [used when the linker is invoked with "--shared"]
+# sun3.xdc [used when the linker is invoked with "-pie"]
+#
+# It also produced the C source file:
+#
+# em_sun3.c
+#
+# which is then compiled into the linker.
+#
+# The linker scripts are created by running the shell script
+# /sources/ld/emulparams/sparc.sh to set the value of ${SCRIPT_NAME}
+# (and any other variables it wants to). ${SCRIPT_NAME} is then
+# invoked with a variable called ${LD_FLAG} to tell it which version
+# of the linker script to create.
+
srcdir=$1
libdir=$2
@@ -22,16 +68,23 @@ NATIVE_LIB_DIRS=$8
use_sysroot=$9
shift 9
EMULATION_NAME=$1
-shift
-# Can't use ${1:-$target_alias} here due to an Ultrix shell bug.
-if [ "x$1" = "x" ] ; then
+TOOL_LIB=$2
+CUSTOMIZER_SCRIPT=$3
+
+# Can't use ${TOOL_LIB:-$target_alias} here due to an Ultrix shell bug.
+if [ "x${TOOL_LIB}" = "x" ] ; then
tool_lib=${exec_prefix}/${target_alias}/lib
else
- tool_lib=${exec_prefix}/$1/lib
+ tool_lib=${exec_prefix}/${TOOL_LIB}/lib
+fi
+
+if [ "x${CUSTOMIZER_SCRIPT}" = "x" ] ; then
+ CUSTOMIZER_SCRIPT=${EMULATION_NAME}
fi
+CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh"
# Include the emulation-specific parameters:
-. ${srcdir}/emulparams/${EMULATION_NAME}.sh
+. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
if test -d ldscripts; then
true
@@ -164,7 +217,7 @@ fi
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.
+# values specified in the emulparams/<script_to_run>.sh file or default.
DATA_ALIGNMENT_="${DATA_ALIGNMENT_-${DATA_ALIGNMENT-ALIGN(${SEGMENT_SIZE})}}"
DATA_ALIGNMENT_n="${DATA_ALIGNMENT_n-${DATA_ALIGNMENT_}}"
@@ -176,7 +229,7 @@ LD_FLAG=r
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
( echo "/* Script for ld -r: link without relocation */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr
@@ -184,7 +237,7 @@ LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
CONSTRUCTING=" "
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
@@ -192,7 +245,7 @@ LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
RELOCATING=" "
( echo "/* Default linker script, for normal executables */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x
@@ -200,14 +253,14 @@ LD_FLAG=n
DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
TEXT_START_ADDR=${NONPAGED_TEXT_START_ADDR-${TEXT_START_ADDR}}
( echo "/* Script for -n: mix text and data on same page */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn
LD_FLAG=N
DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
( echo "/* Script for -N: mix text and data on same page; don't align data */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn
@@ -216,7 +269,7 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
LD_FLAG=c
COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
( echo "/* Script for -z combreloc: combine and sort reloc sections */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
rm -f ${COMBRELOC}
@@ -230,7 +283,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
# Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
(
echo "/* Script for ld --shared: link shared library */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
@@ -238,7 +291,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
rm -f ${COMBRELOC}
@@ -254,7 +307,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
# Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
(
echo "/* Script for ld -pie: link position independent executable */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
@@ -262,7 +315,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
- . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
rm -f ${COMBRELOC}
diff --git a/ld/genscripts_extra.sh b/ld/genscripts_extra.sh
deleted file mode 100755
index 0b50670..0000000
--- a/ld/genscripts_extra.sh
+++ /dev/null
@@ -1,335 +0,0 @@
-#!/bin/sh
-# genscripts_extra.sh - A copy of genscripts.sh with the ability to accept
-# a second optional parameter - the name of the script to run in order to
-# customise the linker scripts generated for a particular emulation.
-# This allows targets with large numbers of similar emulations to only
-# have one script to customise them all.
-#
-# Usage: genscripts_extra.sh \
-# srcdir \
-# libdir \
-# exec_prefix \
-# host \
-# target \
-# target_alias \
-# default_emulation \
-# native_lib_dirs \
-# use_sysroot \
-# this_emulation
-# optional:
-# tool_dir
-# customizer_script
-#
-# Sample usage:
-#
-# genscripts_extra.sh \
-# /sources/ld \
-# /usr/local/lib \
-# /usr/local \
-# sparc-sun-sunos4.1.3 \
-# sparc-sun-sunos4.1.3 \
-# sparc-sun-sunos4.1.3 \
-# sun4 \
-# "" \
-# no \
-# sun3 \
-# sparc-sun-sunos4.1.3
-# sparc.sh
-#
-# produces the linker scripts:
-#
-# sun3.x [default linker script]
-# sun3.xbn [used when the linker is invoked with "-N"]
-# sun3.xn [used when the linker is invoked with "-n"]
-# sun3.xr [used when the linker is invoked with "-r"]
-# sun3.xu [used when the linker is invoked with "-Ur"]
-# and maybe:
-# sun3.xc [used when the linker is invoked with "-z combreloc"]
-# sun3.xsc [used when the linker is invoked with "--shared"]
-# sun3.xdc [used when the linker is invoked with "-pie"]
-#
-# It also produced the C source file:
-#
-# em_sun3.c
-#
-# which is then compiled into the linker.
-#
-# The linker scripts are created by running the shell script
-# /sources/ld/emulparams/sparc.sh to set the value of ${SCRIPT_NAME}
-# (and any other variables it wants to). ${SCRIPT_NAME} is then
-# invoked with a variable called ${LD_FLAG} to tell it which version
-# of the linker script to create.
-
-
-srcdir=$1
-libdir=$2
-exec_prefix=$3
-host=$4
-target=$5
-target_alias=$6
-EMULATION_LIBPATH=$7
-NATIVE_LIB_DIRS=$8
-use_sysroot=$9
-shift 9
-EMULATION_NAME=$1
-TOOL_LIB=$2
-CUSTOMIZER_SCRIPT=$3
-shift
-# Can't use ${1:-$target_alias} here due to an Ultrix shell bug.
-if [ "x$TOOL_LIB" = "x" ] ; then
- tool_lib=${exec_prefix}/${target_alias}/lib
-else
- tool_lib=${exec_prefix}/$TOOL_LIB/lib
-fi
-
-if [ "x${CUSTOMIZER_SCRIPT}" = "x" ] ; then
- CUSTOMIZER_SCRIPT=${EMULATION_NAME}
-fi
-
-# Include the emulation-specific parameters:
-. ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
-
-if test -d ldscripts; then
- true
-else
- mkdir ldscripts
-fi
-
-# Set some flags for the emultempl scripts. USE_LIBPATH will
-# be set for any libpath-using emulation; NATIVE will be set for a
-# libpath-using emulation where ${host} = ${target}. NATIVE
-# may already have been set by the emulparams file, but that's OK
-# (it'll just get set to "yes" twice).
-
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- if [ "x${host}" = "x${target}" ] ; then
- NATIVE=yes
- USE_LIBPATH=yes
- elif [ "x${use_sysroot}" = "xyes" ] ; then
- USE_LIBPATH=yes
- fi
- ;;
-esac
-
-# If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also.
-if test "x$NATIVE" = "xyes" ; then
- USE_LIBPATH=yes
-fi
-
-# Set the library search path, for libraries named by -lfoo.
-# If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used.
-# Otherwise, the default is set here.
-#
-# The format is the usual list of colon-separated directories.
-# To force a logically empty LIB_PATH, do LIBPATH=":".
-#
-# If we are using a sysroot, prefix library paths with "=" to indicate this.
-#
-# If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
-# the library path with the suffix applied.
-
-if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
- LIB_PATH2=
- if [ x"$use_sysroot" != xyes ] ; then
- LIB_PATH2=${libdir}
- fi
- for lib in ${NATIVE_LIB_DIRS}; do
- # The "=" is harmless if we aren't using a sysroot, but also needless.
- if [ "x${use_sysroot}" = "xyes" ] ; then
- lib="=${lib}"
- fi
- addsuffix=
- case "${LIBPATH_SUFFIX}:${lib}" in
- :*) ;;
- *:*${LIBPATH_SUFFIX}) ;;
- *) addsuffix=yes ;;
- esac
- if test -n "$addsuffix"; then
- case :${LIB_PATH}: in
- *:${lib}${LIBPATH_SUFFIX}:*) ;;
- ::) LIB_PATH=${lib}${LIBPATH_SUFFIX} ;;
- *) LIB_PATH=${LIB_PATH}:${lib}${LIBPATH_SUFFIX} ;;
- esac
- case :${LIB_PATH}:${LIB_PATH2}: in
- *:${lib}:*) ;;
- *::) LIB_PATH2=${lib} ;;
- *) LIB_PATH2=${LIB_PATH2}:${lib} ;;
- esac
- else
- case :${LIB_PATH2}: in
- *:${lib}:*) ;;
- ::) LIB_PATH2=${lib} ;;
- *) LIB_PATH2=${LIB_PATH2}:${lib} ;;
- esac
- fi
- done
- case :${LIB_PATH}:${LIB_PATH2}: in
- *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;;
- *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;;
- esac
-fi
-
-
-# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for
-# sysrooted configurations and when LIBPATH=":".
-if [ "x${use_sysroot}" != "xyes" ] ; then
- case :${LIB_PATH}: in
- ::: | *:${tool_lib}:*) ;;
- ::) LIB_PATH=${tool_lib} ;;
- *) LIB_PATH=${tool_lib}:${LIB_PATH} ;;
- esac
-fi
-
-LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
-
-# We need it for testsuite.
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*)
- test -d tmpdir || mkdir tmpdir
- test -f tmpdir/libpath.exp || \
- echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
- ;;
-esac
-
-# Generate 5 or 6 script files from a master script template in
-# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh. Which one of the 5 or 6
-# script files is actually used depends on command line options given
-# to ld. (SCRIPT_NAME was set in the emulparams_file.)
-#
-# A .x script file is the default script.
-# A .xr script is for linking without relocation (-r flag).
-# A .xu script is like .xr, but *do* create constructors (-Ur flag).
-# A .xn script is for linking with -n flag (mix text and data on same page).
-# A .xbn script is for linking with -N flag (mix text and data on same page).
-# A .xs script is for generating a shared library with the --shared
-# flag; it is only generated if $GENERATE_SHLIB_SCRIPT is set by the
-# emulation parameters.
-# A .xc script is for linking with -z combreloc; it is only generated if
-# $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
-# $SCRIPT_NAME is "elf".
-# A .xsc script is for linking with --shared -z combreloc; it is generated
-# if $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
-# $SCRIPT_NAME is "elf" and $GENERATE_SHLIB_SCRIPT is set by the emulation
-# parameters too.
-
-if [ "x$SCRIPT_NAME" = "xelf" ]; then
- GENERATE_COMBRELOC_SCRIPT=yes
-fi
-
-SEGMENT_SIZE=${SEGMENT_SIZE-${MAXPAGESIZE-${TARGET_PAGE_SIZE}}}
-
-# Determine DATA_ALIGNMENT for the 5 variants, using
-# values specified in the emulparams/<script_to_run>.sh file or default.
-
-DATA_ALIGNMENT_="${DATA_ALIGNMENT_-${DATA_ALIGNMENT-ALIGN(${SEGMENT_SIZE})}}"
-DATA_ALIGNMENT_n="${DATA_ALIGNMENT_n-${DATA_ALIGNMENT_}}"
-DATA_ALIGNMENT_N="${DATA_ALIGNMENT_N-${DATA_ALIGNMENT-.}}"
-DATA_ALIGNMENT_r="${DATA_ALIGNMENT_r-${DATA_ALIGNMENT-}}"
-DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
-
-LD_FLAG=r
-DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
-DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
-( echo "/* Script for ld -r: link without relocation */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr
-
-LD_FLAG=u
-DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
-CONSTRUCTING=" "
-( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
-
-LD_FLAG=
-DATA_ALIGNMENT=${DATA_ALIGNMENT_}
-RELOCATING=" "
-( echo "/* Default linker script, for normal executables */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x
-
-LD_FLAG=n
-DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
-TEXT_START_ADDR=${NONPAGED_TEXT_START_ADDR-${TEXT_START_ADDR}}
-( echo "/* Script for -n: mix text and data on same page */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn
-
-LD_FLAG=N
-DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
-( echo "/* Script for -N: mix text and data on same page; don't align data */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn
-
-if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
- DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
- LD_FLAG=c
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
- ( echo "/* Script for -z combreloc: combine and sort reloc sections */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
- rm -f ${COMBRELOC}
- COMBRELOC=
-fi
-
-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.
- (
- echo "/* Script for ld --shared: link shared library */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs
- if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
- LD_FLAG=cshared
- DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
- ( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
- rm -f ${COMBRELOC}
- COMBRELOC=
- fi
- unset CREATE_SHLIB
-fi
-
-if test -n "$GENERATE_PIE_SCRIPT"; then
- LD_FLAG=pie
- DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
- CREATE_PIE=" "
- # Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
- (
- echo "/* Script for ld -pie: link position independent executable */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd
- if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
- LD_FLAG=cpie
- DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
- COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
- ( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
- . ${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh ${EMULATION_NAME}
- . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
- ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
- rm -f ${COMBRELOC}
- COMBRELOC=
- fi
- unset CREATE_PIE
-fi
-
-case " $EMULATION_LIBPATH " in
- *" ${EMULATION_NAME} "*) COMPILE_IN=true;;
-esac
-
-# Generate e${EMULATION_NAME}.c.
-. ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em