aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-04-12 20:32:57 +0930
committerAlan Modra <amodra@gmail.com>2019-04-13 12:13:22 +0930
commitc40e31a1217f6ec9dd47e2e6806c2562096e31fe (patch)
tree1d05c38dd02cfbeca8f7706a112067e3cba052ab /ld/emulparams
parent50ff67e6cf65dbe1b8fbbdb7a6c2e43919af95f4 (diff)
downloadgdb-c40e31a1217f6ec9dd47e2e6806c2562096e31fe.zip
gdb-c40e31a1217f6ec9dd47e2e6806c2562096e31fe.tar.gz
gdb-c40e31a1217f6ec9dd47e2e6806c2562096e31fe.tar.bz2
Automatic makefile dependencies for generated ld/e*.c
This patch modifies genscripts.sh to emit dependency info along with the generated emulation e*.c files. This is done by a new source_sh function that records its arg to a file (.deps/e*.Tc), using the function whenever a shell script is sourced. Entries in the file are made unique and written to .deps/e*.Pc. These files are then included by the Makefile. * Makefile.am (GENSCRIPTS): Pass LIB_PATH as a parameter. Add DEPDIR parameter. (ELF_DEPS, ELF_GEN_DEPS, ELF_X86_DEPS): Delete. (ALL_EMULATION_SOURCES, ALL_64_EMULATION_SOURCES): Depend on $GEN_DEPENDS. (e*.c): Delete all dependencies, instead include dependencies from $DEPDIR/*.Pc. * Makefile.in: Regenerate. * configure.ac (source_sh): Define and use function. * configure: Regenerate. * emulparams/aarch64cloudabib.sh, * emulparams/aarch64elf32b.sh, * emulparams/aarch64elfb.sh, * emulparams/aarch64fbsdb.sh, * emulparams/aarch64linux32b.sh, * emulparams/aarch64linuxb.sh, * emulparams/arcelf.sh, * emulparams/arcelf_prof.sh, * emulparams/arclinux.sh, * emulparams/arclinux_nps.sh, * emulparams/arclinux_prof.sh, * emulparams/arcv2elf.sh, * emulparams/arcv2elfx.sh, * emulparams/armelf_fbsd.sh, * emulparams/armelf_linux_eabi.sh, * emulparams/armelf_linux_fdpiceabi.sh, * emulparams/armelf_nacl.sh, * emulparams/armelf_nbsd.sh, * emulparams/armelf_vxworks.sh, * emulparams/armelfb.sh, * emulparams/armelfb_fbsd.sh, * emulparams/armelfb_fuchsia.sh, * emulparams/armelfb_linux.sh, * emulparams/armelfb_linux_eabi.sh, * emulparams/armelfb_linux_fdpiceabi.sh, * emulparams/armelfb_nacl.sh, * emulparams/armelfb_nbsd.sh, * emulparams/armsymbian.sh, * emulparams/cskyelf_linux.sh, * emulparams/elf32_sparc_sol2.sh, * emulparams/elf32_sparc_vxworks.sh, * emulparams/elf32_tic6x_be.sh, * emulparams/elf32_tic6x_elf_be.sh, * emulparams/elf32_tic6x_elf_le.sh, * emulparams/elf32_tic6x_linux_be.sh, * emulparams/elf32_tic6x_linux_le.sh, * emulparams/elf32_x86_64.sh, * emulparams/elf32_x86_64_nacl.sh, * emulparams/elf32b4300.sh, * emulparams/elf32bfinfd.sh, * emulparams/elf32bmipn32.sh, * emulparams/elf32bsmip.sh, * emulparams/elf32btsmip.sh, * emulparams/elf32btsmip_fbsd.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32btsmipn32_fbsd.sh, * emulparams/elf32ebmip.sh, * emulparams/elf32ebmipvxworks.sh, * emulparams/elf32elmip.sh, * emulparams/elf32elmipvxworks.sh, * emulparams/elf32frvfd.sh, * emulparams/elf32l4300.sh, * emulparams/elf32lm32fd.sh, * emulparams/elf32lmip.sh, * emulparams/elf32lppc.sh, * emulparams/elf32lppclinux.sh, * emulparams/elf32lppcnto.sh, * emulparams/elf32lppcsim.sh, * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32lriscv.sh, * emulparams/elf32lriscv_ilp32.sh, * emulparams/elf32lriscv_ilp32f.sh, * emulparams/elf32lsmip.sh, * emulparams/elf32ltsmip.sh, * emulparams/elf32ltsmip_fbsd.sh, * emulparams/elf32ltsmipn32.sh, * emulparams/elf32ltsmipn32_fbsd.sh, * emulparams/elf32microblazeel.sh, * emulparams/elf32or1k_linux.sh, * emulparams/elf32ppc.sh, * emulparams/elf32ppc_fbsd.sh, * emulparams/elf32ppccommon.sh, * emulparams/elf32ppclinux.sh, * emulparams/elf32ppcnto.sh, * emulparams/elf32ppcsim.sh, * emulparams/elf32ppcvxworks.sh, * emulparams/elf32ppcwindiss.sh, * emulparams/elf32tilegx_be.sh, * emulparams/elf64_ia64_fbsd.sh, * emulparams/elf64_sparc_fbsd.sh, * emulparams/elf64_sparc_sol2.sh, * emulparams/elf64alpha_fbsd.sh, * emulparams/elf64alpha_nbsd.sh, * emulparams/elf64bmip-defs.sh, * emulparams/elf64bmip.sh, * emulparams/elf64btsmip.sh, * emulparams/elf64btsmip_fbsd.sh, * emulparams/elf64lppc.sh, * emulparams/elf64lriscv-defs.sh, * emulparams/elf64lriscv.sh, * emulparams/elf64lriscv_lp64.sh, * emulparams/elf64lriscv_lp64f.sh, * emulparams/elf64ltsmip.sh, * emulparams/elf64ltsmip_fbsd.sh, * emulparams/elf64ppc.sh, * emulparams/elf64ppc_fbsd.sh, * emulparams/elf64rdos.sh, * emulparams/elf64tilegx_be.sh, * emulparams/elf_i386.sh, * emulparams/elf_i386_be.sh, * emulparams/elf_i386_fbsd.sh, * emulparams/elf_i386_ldso.sh, * emulparams/elf_i386_nacl.sh, * emulparams/elf_i386_sol2.sh, * emulparams/elf_i386_vxworks.sh, * emulparams/elf_iamcu.sh, * emulparams/elf_k1om.sh, * emulparams/elf_k1om_fbsd.sh, * emulparams/elf_l1om.sh, * emulparams/elf_l1om_fbsd.sh, * emulparams/elf_x86_64.sh, * emulparams/elf_x86_64_cloudabi.sh, * emulparams/elf_x86_64_fbsd.sh, * emulparams/elf_x86_64_nacl.sh, * emulparams/elf_x86_64_sol2.sh, * emulparams/h8300helf.sh, * emulparams/h8300helf_linux.sh, * emulparams/h8300hnelf.sh, * emulparams/h8300self.sh, * emulparams/h8300self_linux.sh, * emulparams/h8300snelf.sh, * emulparams/h8300sxelf.sh, * emulparams/h8300sxelf_linux.sh, * emulparams/h8300sxnelf.sh, * emulparams/hppanbsd.sh, * emulparams/hppaobsd.sh, * emulparams/m32rlelf.sh, * emulparams/m32rlelf_linux.sh, * emulparams/m68kelfnbsd.sh, * emulparams/mn10300.sh, * emulparams/msp430X.sh, * emulparams/nds32belf.sh, * emulparams/nds32belf16m.sh, * emulparams/nds32belf_linux.sh, * emulparams/pjlelf.sh, * emulparams/ppclynx.sh, * emulparams/score7_elf.sh, * emulparams/shelf_fd.sh, * emulparams/shelf_linux.sh, * emulparams/shelf_nbsd.sh, * emulparams/shelf_uclinux.sh, * emulparams/shelf_vxworks.sh, * emulparams/shl.sh, * emulparams/shlelf.sh, * emulparams/shlelf_fd.sh, * emulparams/shlelf_nbsd.sh, * emulparams/shlelf_vxworks.sh: Use source_sh. * genscripts.sh: Adjust for changed parameters. Emit dependencies for e*.c to .deps/*.Pc. (source_sh): New function, use it throughout to source scripts. * genscrba.sh (source_em): Use source_sh.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/aarch64cloudabib.sh2
-rw-r--r--ld/emulparams/aarch64elf32b.sh2
-rw-r--r--ld/emulparams/aarch64elfb.sh2
-rw-r--r--ld/emulparams/aarch64fbsdb.sh2
-rw-r--r--ld/emulparams/aarch64linux32b.sh2
-rw-r--r--ld/emulparams/aarch64linuxb.sh2
-rw-r--r--ld/emulparams/arcelf.sh2
-rw-r--r--ld/emulparams/arcelf_prof.sh2
-rw-r--r--ld/emulparams/arclinux.sh2
-rw-r--r--ld/emulparams/arclinux_nps.sh4
-rw-r--r--ld/emulparams/arclinux_prof.sh2
-rw-r--r--ld/emulparams/arcv2elf.sh2
-rw-r--r--ld/emulparams/arcv2elfx.sh2
-rw-r--r--ld/emulparams/armelf_fbsd.sh4
-rw-r--r--ld/emulparams/armelf_linux_eabi.sh2
-rw-r--r--ld/emulparams/armelf_linux_fdpiceabi.sh2
-rw-r--r--ld/emulparams/armelf_nacl.sh4
-rw-r--r--ld/emulparams/armelf_nbsd.sh2
-rw-r--r--ld/emulparams/armelf_vxworks.sh4
-rw-r--r--ld/emulparams/armelfb.sh2
-rw-r--r--ld/emulparams/armelfb_fbsd.sh2
-rw-r--r--ld/emulparams/armelfb_fuchsia.sh2
-rw-r--r--ld/emulparams/armelfb_linux.sh2
-rw-r--r--ld/emulparams/armelfb_linux_eabi.sh2
-rw-r--r--ld/emulparams/armelfb_linux_fdpiceabi.sh2
-rw-r--r--ld/emulparams/armelfb_nacl.sh2
-rw-r--r--ld/emulparams/armelfb_nbsd.sh2
-rw-r--r--ld/emulparams/armsymbian.sh2
-rw-r--r--ld/emulparams/cskyelf_linux.sh2
-rw-r--r--ld/emulparams/elf32_sparc_sol2.sh4
-rw-r--r--ld/emulparams/elf32_sparc_vxworks.sh4
-rw-r--r--ld/emulparams/elf32_tic6x_be.sh2
-rw-r--r--ld/emulparams/elf32_tic6x_elf_be.sh2
-rw-r--r--ld/emulparams/elf32_tic6x_elf_le.sh2
-rw-r--r--ld/emulparams/elf32_tic6x_linux_be.sh2
-rw-r--r--ld/emulparams/elf32_tic6x_linux_le.sh2
-rw-r--r--ld/emulparams/elf32_x86_64.sh12
-rw-r--r--ld/emulparams/elf32_x86_64_nacl.sh4
-rw-r--r--ld/emulparams/elf32b4300.sh2
-rw-r--r--ld/emulparams/elf32bfinfd.sh2
-rw-r--r--ld/emulparams/elf32bmipn32.sh2
-rw-r--r--ld/emulparams/elf32bsmip.sh2
-rw-r--r--ld/emulparams/elf32btsmip.sh2
-rw-r--r--ld/emulparams/elf32btsmip_fbsd.sh4
-rw-r--r--ld/emulparams/elf32btsmipn32.sh2
-rw-r--r--ld/emulparams/elf32btsmipn32_fbsd.sh4
-rw-r--r--ld/emulparams/elf32ebmip.sh2
-rw-r--r--ld/emulparams/elf32ebmipvxworks.sh4
-rw-r--r--ld/emulparams/elf32elmip.sh2
-rw-r--r--ld/emulparams/elf32elmipvxworks.sh4
-rw-r--r--ld/emulparams/elf32frvfd.sh2
-rw-r--r--ld/emulparams/elf32l4300.sh2
-rw-r--r--ld/emulparams/elf32lm32fd.sh2
-rw-r--r--ld/emulparams/elf32lmip.sh2
-rw-r--r--ld/emulparams/elf32lppc.sh2
-rw-r--r--ld/emulparams/elf32lppclinux.sh2
-rw-r--r--ld/emulparams/elf32lppcnto.sh2
-rw-r--r--ld/emulparams/elf32lppcsim.sh2
-rw-r--r--ld/emulparams/elf32lr5900.sh2
-rw-r--r--ld/emulparams/elf32lr5900n32.sh2
-rw-r--r--ld/emulparams/elf32lriscv.sh2
-rw-r--r--ld/emulparams/elf32lriscv_ilp32.sh2
-rw-r--r--ld/emulparams/elf32lriscv_ilp32f.sh2
-rw-r--r--ld/emulparams/elf32lsmip.sh2
-rw-r--r--ld/emulparams/elf32ltsmip.sh2
-rw-r--r--ld/emulparams/elf32ltsmip_fbsd.sh4
-rw-r--r--ld/emulparams/elf32ltsmipn32.sh2
-rw-r--r--ld/emulparams/elf32ltsmipn32_fbsd.sh4
-rw-r--r--ld/emulparams/elf32microblazeel.sh2
-rw-r--r--ld/emulparams/elf32or1k_linux.sh2
-rw-r--r--ld/emulparams/elf32ppc.sh4
-rw-r--r--ld/emulparams/elf32ppc_fbsd.sh4
-rw-r--r--ld/emulparams/elf32ppccommon.sh2
-rw-r--r--ld/emulparams/elf32ppclinux.sh2
-rw-r--r--ld/emulparams/elf32ppcnto.sh2
-rw-r--r--ld/emulparams/elf32ppcsim.sh2
-rw-r--r--ld/emulparams/elf32ppcvxworks.sh6
-rw-r--r--ld/emulparams/elf32ppcwindiss.sh2
-rw-r--r--ld/emulparams/elf32tilegx_be.sh2
-rw-r--r--ld/emulparams/elf64_ia64_fbsd.sh4
-rw-r--r--ld/emulparams/elf64_sparc_fbsd.sh4
-rw-r--r--ld/emulparams/elf64_sparc_sol2.sh4
-rw-r--r--ld/emulparams/elf64alpha_fbsd.sh4
-rw-r--r--ld/emulparams/elf64alpha_nbsd.sh2
-rw-r--r--ld/emulparams/elf64bmip-defs.sh2
-rw-r--r--ld/emulparams/elf64bmip.sh2
-rw-r--r--ld/emulparams/elf64btsmip.sh2
-rw-r--r--ld/emulparams/elf64btsmip_fbsd.sh4
-rw-r--r--ld/emulparams/elf64lppc.sh2
-rw-r--r--ld/emulparams/elf64lriscv-defs.sh2
-rw-r--r--ld/emulparams/elf64lriscv.sh2
-rw-r--r--ld/emulparams/elf64lriscv_lp64.sh2
-rw-r--r--ld/emulparams/elf64lriscv_lp64f.sh2
-rw-r--r--ld/emulparams/elf64ltsmip.sh2
-rw-r--r--ld/emulparams/elf64ltsmip_fbsd.sh4
-rw-r--r--ld/emulparams/elf64ppc.sh4
-rw-r--r--ld/emulparams/elf64ppc_fbsd.sh4
-rw-r--r--ld/emulparams/elf64rdos.sh2
-rw-r--r--ld/emulparams/elf64tilegx_be.sh2
-rw-r--r--ld/emulparams/elf_i386.sh10
-rw-r--r--ld/emulparams/elf_i386_be.sh6
-rw-r--r--ld/emulparams/elf_i386_fbsd.sh4
-rw-r--r--ld/emulparams/elf_i386_ldso.sh8
-rw-r--r--ld/emulparams/elf_i386_nacl.sh4
-rw-r--r--ld/emulparams/elf_i386_sol2.sh4
-rw-r--r--ld/emulparams/elf_i386_vxworks.sh8
-rw-r--r--ld/emulparams/elf_iamcu.sh8
-rw-r--r--ld/emulparams/elf_k1om.sh8
-rw-r--r--ld/emulparams/elf_k1om_fbsd.sh4
-rw-r--r--ld/emulparams/elf_l1om.sh8
-rw-r--r--ld/emulparams/elf_l1om_fbsd.sh4
-rw-r--r--ld/emulparams/elf_x86_64.sh12
-rw-r--r--ld/emulparams/elf_x86_64_cloudabi.sh2
-rw-r--r--ld/emulparams/elf_x86_64_fbsd.sh4
-rw-r--r--ld/emulparams/elf_x86_64_nacl.sh4
-rw-r--r--ld/emulparams/elf_x86_64_sol2.sh4
-rw-r--r--ld/emulparams/h8300helf.sh2
-rw-r--r--ld/emulparams/h8300helf_linux.sh2
-rw-r--r--ld/emulparams/h8300hnelf.sh2
-rw-r--r--ld/emulparams/h8300self.sh2
-rw-r--r--ld/emulparams/h8300self_linux.sh2
-rw-r--r--ld/emulparams/h8300snelf.sh2
-rw-r--r--ld/emulparams/h8300sxelf.sh2
-rw-r--r--ld/emulparams/h8300sxelf_linux.sh2
-rw-r--r--ld/emulparams/h8300sxnelf.sh2
-rw-r--r--ld/emulparams/hppanbsd.sh2
-rw-r--r--ld/emulparams/hppaobsd.sh2
-rw-r--r--ld/emulparams/m32rlelf.sh2
-rw-r--r--ld/emulparams/m32rlelf_linux.sh2
-rw-r--r--ld/emulparams/m68kelfnbsd.sh2
-rw-r--r--ld/emulparams/mn10300.sh2
-rw-r--r--ld/emulparams/msp430X.sh2
-rw-r--r--ld/emulparams/nds32belf.sh2
-rw-r--r--ld/emulparams/nds32belf16m.sh2
-rw-r--r--ld/emulparams/nds32belf_linux.sh2
-rw-r--r--ld/emulparams/pjlelf.sh2
-rw-r--r--ld/emulparams/ppclynx.sh2
-rw-r--r--ld/emulparams/score7_elf.sh2
-rw-r--r--ld/emulparams/shelf_fd.sh2
-rw-r--r--ld/emulparams/shelf_linux.sh2
-rw-r--r--ld/emulparams/shelf_nbsd.sh2
-rw-r--r--ld/emulparams/shelf_uclinux.sh2
-rw-r--r--ld/emulparams/shelf_vxworks.sh2
-rw-r--r--ld/emulparams/shl.sh2
-rw-r--r--ld/emulparams/shlelf.sh2
-rw-r--r--ld/emulparams/shlelf_fd.sh2
-rw-r--r--ld/emulparams/shlelf_nbsd.sh2
-rw-r--r--ld/emulparams/shlelf_vxworks.sh2
148 files changed, 212 insertions, 212 deletions
diff --git a/ld/emulparams/aarch64cloudabib.sh b/ld/emulparams/aarch64cloudabib.sh
index 909d0f3..a7d1b62 100644
--- a/ld/emulparams/aarch64cloudabib.sh
+++ b/ld/emulparams/aarch64cloudabib.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/aarch64cloudabi.sh
+source_sh ${srcdir}/emulparams/aarch64cloudabi.sh
OUTPUT_FORMAT="elf64-bigaarch64-cloudabi"
diff --git a/ld/emulparams/aarch64elf32b.sh b/ld/emulparams/aarch64elf32b.sh
index aa0a2c5..bb0a8e8 100644
--- a/ld/emulparams/aarch64elf32b.sh
+++ b/ld/emulparams/aarch64elf32b.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/aarch64elf32.sh
+source_sh ${srcdir}/emulparams/aarch64elf32.sh
OUTPUT_FORMAT="elf32-bigaarch64"
diff --git a/ld/emulparams/aarch64elfb.sh b/ld/emulparams/aarch64elfb.sh
index 7a3ff97..afda802 100644
--- a/ld/emulparams/aarch64elfb.sh
+++ b/ld/emulparams/aarch64elfb.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/aarch64elf.sh
+source_sh ${srcdir}/emulparams/aarch64elf.sh
OUTPUT_FORMAT="elf64-bigaarch64"
diff --git a/ld/emulparams/aarch64fbsdb.sh b/ld/emulparams/aarch64fbsdb.sh
index 2c55dde..cabe9d3 100644
--- a/ld/emulparams/aarch64fbsdb.sh
+++ b/ld/emulparams/aarch64fbsdb.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/aarch64fbsd.sh
+source_sh ${srcdir}/emulparams/aarch64fbsd.sh
OUTPUT_FORMAT="elf64-bigaarch64"
diff --git a/ld/emulparams/aarch64linux32b.sh b/ld/emulparams/aarch64linux32b.sh
index e92feec..c85d530 100644
--- a/ld/emulparams/aarch64linux32b.sh
+++ b/ld/emulparams/aarch64linux32b.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/aarch64linux32.sh
+source_sh ${srcdir}/emulparams/aarch64linux32.sh
OUTPUT_FORMAT="elf32-bigaarch64"
ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64_be_ilp32.so.1\"
diff --git a/ld/emulparams/aarch64linuxb.sh b/ld/emulparams/aarch64linuxb.sh
index 7523205..d3524c7 100644
--- a/ld/emulparams/aarch64linuxb.sh
+++ b/ld/emulparams/aarch64linuxb.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/aarch64linux.sh
+source_sh ${srcdir}/emulparams/aarch64linux.sh
OUTPUT_FORMAT="elf64-bigaarch64"
ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64_be.so.1\"
diff --git a/ld/emulparams/arcelf.sh b/ld/emulparams/arcelf.sh
index 21c5c82..875df7e 100644
--- a/ld/emulparams/arcelf.sh
+++ b/ld/emulparams/arcelf.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=elfarc
TEMPLATE_NAME=elf32
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arcelf_prof.sh b/ld/emulparams/arcelf_prof.sh
index c94e3cb..74e9604 100644
--- a/ld/emulparams/arcelf_prof.sh
+++ b/ld/emulparams/arcelf_prof.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=elfarc
TEMPLATE_NAME=elf32
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arclinux.sh b/ld/emulparams/arclinux.sh
index 63e56ec..d342819 100644
--- a/ld/emulparams/arclinux.sh
+++ b/ld/emulparams/arclinux.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
ARCH=arc
SCRIPT_NAME=arclinux
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arclinux_nps.sh b/ld/emulparams/arclinux_nps.sh
index b1c6a7d..c5bcac8 100644
--- a/ld/emulparams/arclinux_nps.sh
+++ b/ld/emulparams/arclinux_nps.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/arclinux.sh
+source_sh ${srcdir}/emulparams/arclinux.sh
# Extend the OTHER_SECTIONS for nps.
-. ${srcdir}/emulparams/arc-nps.sh
+source_sh ${srcdir}/emulparams/arc-nps.sh
diff --git a/ld/emulparams/arclinux_prof.sh b/ld/emulparams/arclinux_prof.sh
index ebcbd9b..fbbf20d 100644
--- a/ld/emulparams/arclinux_prof.sh
+++ b/ld/emulparams/arclinux_prof.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
SCRIPT_NAME=arclinux
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
OUTPUT_FORMAT="elf32-bigarc"
diff --git a/ld/emulparams/arcv2elf.sh b/ld/emulparams/arcv2elf.sh
index feedbe8..4b0cf55 100644
--- a/ld/emulparams/arcv2elf.sh
+++ b/ld/emulparams/arcv2elf.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
MACHINE=
SCRIPT_NAME=elfarcv2
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/arcv2elfx.sh b/ld/emulparams/arcv2elfx.sh
index 8a56509..cfe7ea0 100644
--- a/ld/emulparams/arcv2elfx.sh
+++ b/ld/emulparams/arcv2elfx.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/arc-endianness.sh
+source_sh ${srcdir}/emulparams/arc-endianness.sh
MACHINE=
SCRIPT_NAME=elfarcv2
if [ "x${ARC_ENDIAN}" = "xbig" ]; then
diff --git a/ld/emulparams/armelf_fbsd.sh b/ld/emulparams/armelf_fbsd.sh
index b2a3921..be88c2f 100644
--- a/ld/emulparams/armelf_fbsd.sh
+++ b/ld/emulparams/armelf_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/armelf.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
TEXT_START_ADDR=0x00010000
diff --git a/ld/emulparams/armelf_linux_eabi.sh b/ld/emulparams/armelf_linux_eabi.sh
index 5b0c6b8..e1b6a11 100644
--- a/ld/emulparams/armelf_linux_eabi.sh
+++ b/ld/emulparams/armelf_linux_eabi.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/armelf_linux.sh
+source_sh ${srcdir}/emulparams/armelf_linux.sh
# Use the ARM ABI-compliant exception-handling sections.
OTHER_READONLY_SECTIONS="
diff --git a/ld/emulparams/armelf_linux_fdpiceabi.sh b/ld/emulparams/armelf_linux_fdpiceabi.sh
index aa604aa..97d41f8 100644
--- a/ld/emulparams/armelf_linux_fdpiceabi.sh
+++ b/ld/emulparams/armelf_linux_fdpiceabi.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/armelf_linux.sh
+source_sh ${srcdir}/emulparams/armelf_linux.sh
OUTPUT_FORMAT="elf32-littlearm-fdpic"
BIG_OUTPUT_FORMAT="elf32-bigarm-fdpic"
diff --git a/ld/emulparams/armelf_nacl.sh b/ld/emulparams/armelf_nacl.sh
index 9319577..3d5a3b0 100644
--- a/ld/emulparams/armelf_nacl.sh
+++ b/ld/emulparams/armelf_nacl.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/armelf_linux_eabi.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/armelf_linux_eabi.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
BIG_OUTPUT_FORMAT="elf32-bigarm-nacl"
LITTLE_OUTPUT_FORMAT="elf32-littlearm-nacl"
OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
diff --git a/ld/emulparams/armelf_nbsd.sh b/ld/emulparams/armelf_nbsd.sh
index 517cd62..37e1a4a 100644
--- a/ld/emulparams/armelf_nbsd.sh
+++ b/ld/emulparams/armelf_nbsd.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TEXT_START_ADDR=0x00008000
TARGET2_TYPE=got-rel
diff --git a/ld/emulparams/armelf_vxworks.sh b/ld/emulparams/armelf_vxworks.sh
index ca5c907..5f57535 100644
--- a/ld/emulparams/armelf_vxworks.sh
+++ b/ld/emulparams/armelf_vxworks.sh
@@ -1,6 +1,6 @@
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
OUTPUT_FORMAT="elf32-littlearm-vxworks"
BIG_OUTPUT_FORMAT="elf32-bigarm-vxworks"
LITTLE_OUTPUT_FORMAT="$OUTPUT_FORMAT"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/armelfb.sh b/ld/emulparams/armelfb.sh
index 2d8f382..c6cf060 100644
--- a/ld/emulparams/armelfb.sh
+++ b/ld/emulparams/armelfb.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_fbsd.sh b/ld/emulparams/armelfb_fbsd.sh
index a28b476..bde0a50 100644
--- a/ld/emulparams/armelfb_fbsd.sh
+++ b/ld/emulparams/armelfb_fbsd.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf_fbsd.sh
+source_sh ${srcdir}/emulparams/armelf_fbsd.sh
OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_fuchsia.sh b/ld/emulparams/armelfb_fuchsia.sh
index 7e6f34a..6759a95 100644
--- a/ld/emulparams/armelfb_fuchsia.sh
+++ b/ld/emulparams/armelfb_fuchsia.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf_fuchsia.sh
+source_sh ${srcdir}/emulparams/armelf_fuchsia.sh
OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/armelfb_linux.sh b/ld/emulparams/armelfb_linux.sh
index 9ce9e9a..e14ea53 100644
--- a/ld/emulparams/armelfb_linux.sh
+++ b/ld/emulparams/armelfb_linux.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf_linux.sh
+source_sh ${srcdir}/emulparams/armelf_linux.sh
OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_linux_eabi.sh b/ld/emulparams/armelfb_linux_eabi.sh
index f71c741..50d7195 100644
--- a/ld/emulparams/armelfb_linux_eabi.sh
+++ b/ld/emulparams/armelfb_linux_eabi.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf_linux_eabi.sh
+source_sh ${srcdir}/emulparams/armelf_linux_eabi.sh
OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armelfb_linux_fdpiceabi.sh b/ld/emulparams/armelfb_linux_fdpiceabi.sh
index 988ea7a..c0033f2 100644
--- a/ld/emulparams/armelfb_linux_fdpiceabi.sh
+++ b/ld/emulparams/armelfb_linux_fdpiceabi.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf_linux_fdpiceabi.sh
+source_sh ${srcdir}/emulparams/armelf_linux_fdpiceabi.sh
OUTPUT_FORMAT="elf32-bigarm-fdpic"
diff --git a/ld/emulparams/armelfb_nacl.sh b/ld/emulparams/armelfb_nacl.sh
index df4089a..ae5085d 100644
--- a/ld/emulparams/armelfb_nacl.sh
+++ b/ld/emulparams/armelfb_nacl.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf_nacl.sh
+source_sh ${srcdir}/emulparams/armelf_nacl.sh
OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/armelfb_nbsd.sh b/ld/emulparams/armelfb_nbsd.sh
index 7ab6ce0..082712f 100644
--- a/ld/emulparams/armelfb_nbsd.sh
+++ b/ld/emulparams/armelfb_nbsd.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/armelf_nbsd.sh
+source_sh ${srcdir}/emulparams/armelf_nbsd.sh
OUTPUT_FORMAT="elf32-bigarm"
diff --git a/ld/emulparams/armsymbian.sh b/ld/emulparams/armsymbian.sh
index f852702..1959685 100644
--- a/ld/emulparams/armsymbian.sh
+++ b/ld/emulparams/armsymbian.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/armelf.sh
+source_sh ${srcdir}/emulparams/armelf.sh
SCRIPT_NAME="armbpabi"
GENERATE_COMBRELOC_SCRIPT=1
OUTPUT_FORMAT="elf32-littlearm-symbian"
diff --git a/ld/emulparams/cskyelf_linux.sh b/ld/emulparams/cskyelf_linux.sh
index 135ea1f..84fbbf8 100644
--- a/ld/emulparams/cskyelf_linux.sh
+++ b/ld/emulparams/cskyelf_linux.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/cskyelf.sh
+source_sh ${srcdir}/emulparams/cskyelf.sh
unset EMBEDDED
unset ENTRY
diff --git a/ld/emulparams/elf32_sparc_sol2.sh b/ld/emulparams/elf32_sparc_sol2.sh
index 46ca284..07c8430 100644
--- a/ld/emulparams/elf32_sparc_sol2.sh
+++ b/ld/emulparams/elf32_sparc_sol2.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32_sparc.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf32_sparc.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE=solaris2
OUTPUT_FORMAT="elf32-sparc-sol2"
diff --git a/ld/emulparams/elf32_sparc_vxworks.sh b/ld/emulparams/elf32_sparc_vxworks.sh
index 12a9b38..5402e5e 100644
--- a/ld/emulparams/elf32_sparc_vxworks.sh
+++ b/ld/emulparams/elf32_sparc_vxworks.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32_sparc.sh
+source_sh ${srcdir}/emulparams/elf32_sparc.sh
OUTPUT_FORMAT="elf32-sparc-vxworks"
unset DATA_PLT
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32_tic6x_be.sh b/ld/emulparams/elf32_tic6x_be.sh
index 648320f..24d6e65 100644
--- a/ld/emulparams/elf32_tic6x_be.sh
+++ b/ld/emulparams/elf32_tic6x_be.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
OUTPUT_FORMAT="elf32-tic6x-be"
diff --git a/ld/emulparams/elf32_tic6x_elf_be.sh b/ld/emulparams/elf32_tic6x_elf_be.sh
index a393933..23d1f8c 100644
--- a/ld/emulparams/elf32_tic6x_elf_be.sh
+++ b/ld/emulparams/elf32_tic6x_elf_be.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
OUTPUT_FORMAT="elf32-tic6x-elf-be"
diff --git a/ld/emulparams/elf32_tic6x_elf_le.sh b/ld/emulparams/elf32_tic6x_elf_le.sh
index 8c86ee4..22f09d6 100644
--- a/ld/emulparams/elf32_tic6x_elf_le.sh
+++ b/ld/emulparams/elf32_tic6x_elf_le.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
OUTPUT_FORMAT="elf32-tic6x-elf-le"
BIG_OUTPUT_FORMAT="elf32-tic6x-elf-be"
diff --git a/ld/emulparams/elf32_tic6x_linux_be.sh b/ld/emulparams/elf32_tic6x_linux_be.sh
index 3133951..2173c33 100644
--- a/ld/emulparams/elf32_tic6x_linux_be.sh
+++ b/ld/emulparams/elf32_tic6x_linux_be.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
OUTPUT_FORMAT="elf32-tic6x-linux-be"
diff --git a/ld/emulparams/elf32_tic6x_linux_le.sh b/ld/emulparams/elf32_tic6x_linux_le.sh
index 06defa0..dc354c1 100644
--- a/ld/emulparams/elf32_tic6x_linux_le.sh
+++ b/ld/emulparams/elf32_tic6x_linux_le.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf32_tic6x_le.sh
+source_sh ${srcdir}/emulparams/elf32_tic6x_le.sh
OUTPUT_FORMAT="elf32-tic6x-linux-le"
BIG_OUTPUT_FORMAT="elf32-tic6x-linux-be"
diff --git a/ld/emulparams/elf32_x86_64.sh b/ld/emulparams/elf32_x86_64.sh
index 6fddf62..43f2519 100644
--- a/ld/emulparams/elf32_x86_64.sh
+++ b/ld/emulparams/elf32_x86_64.sh
@@ -1,9 +1,9 @@
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/reloc_overflow.sh
-. ${srcdir}/emulparams/call_nop.sh
-. ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/reloc_overflow.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/cet.sh
SCRIPT_NAME=elf
ELFSIZE=32
OUTPUT_FORMAT="elf32-x86-64"
diff --git a/ld/emulparams/elf32_x86_64_nacl.sh b/ld/emulparams/elf32_x86_64_nacl.sh
index ea98b28..fd5f3d4 100644
--- a/ld/emulparams/elf32_x86_64_nacl.sh
+++ b/ld/emulparams/elf32_x86_64_nacl.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32_x86_64.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/elf32_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
OUTPUT_FORMAT="elf32-x86-64-nacl"
ARCH="i386:x64-32:nacl" # The :nacl just means one-byte nops for code fill.
diff --git a/ld/emulparams/elf32b4300.sh b/ld/emulparams/elf32b4300.sh
index 52fa295..f351533 100644
--- a/ld/emulparams/elf32b4300.sh
+++ b/ld/emulparams/elf32b4300.sh
@@ -2,7 +2,7 @@
# elf32l4300.sh
EMBEDDED=yes
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
TEXT_START_ADDR=0xa0020000
unset SHLIB_TEXT_START_ADDR
EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
diff --git a/ld/emulparams/elf32bfinfd.sh b/ld/emulparams/elf32bfinfd.sh
index 4c96bc9..b4114b1 100644
--- a/ld/emulparams/elf32bfinfd.sh
+++ b/ld/emulparams/elf32bfinfd.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bfin.sh
+source_sh ${srcdir}/emulparams/elf32bfin.sh
unset STACK_ADDR
OUTPUT_FORMAT="elf32-bfinfdpic"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
diff --git a/ld/emulparams/elf32bmipn32.sh b/ld/emulparams/elf32bmipn32.sh
index 4ad6681..501aaef 100644
--- a/ld/emulparams/elf32bmipn32.sh
+++ b/ld/emulparams/elf32bmipn32.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
OUTPUT_FORMAT="elf32-nbigmips"
BIG_OUTPUT_FORMAT="elf32-nbigmips"
LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
diff --git a/ld/emulparams/elf32bsmip.sh b/ld/emulparams/elf32bsmip.sh
index dfe0fe0..483b79c 100644
--- a/ld/emulparams/elf32bsmip.sh
+++ b/ld/emulparams/elf32bsmip.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
ENTRY=__start
EXTRA_EM_FILE=irix
diff --git a/ld/emulparams/elf32btsmip.sh b/ld/emulparams/elf32btsmip.sh
index f04f39c..98749fb 100644
--- a/ld/emulparams/elf32btsmip.sh
+++ b/ld/emulparams/elf32btsmip.sh
@@ -1,7 +1,7 @@
# If you change this file, please also look at files which source this one:
# elf32ltsmip.sh
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-tradbigmips"
BIG_OUTPUT_FORMAT="elf32-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
diff --git a/ld/emulparams/elf32btsmip_fbsd.sh b/ld/emulparams/elf32btsmip_fbsd.sh
index e2a9011..13985f7 100644
--- a/ld/emulparams/elf32btsmip_fbsd.sh
+++ b/ld/emulparams/elf32btsmip_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf32btsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32btsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
BIG_OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32btsmipn32.sh b/ld/emulparams/elf32btsmipn32.sh
index 5fc325f..db91241 100644
--- a/ld/emulparams/elf32btsmipn32.sh
+++ b/ld/emulparams/elf32btsmipn32.sh
@@ -1,7 +1,7 @@
# If you change this file, please also look at files which source this one:
# elf32ltsmipn32.sh
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
OUTPUT_FORMAT="elf32-ntradbigmips"
BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
diff --git a/ld/emulparams/elf32btsmipn32_fbsd.sh b/ld/emulparams/elf32btsmipn32_fbsd.sh
index 83e2e44..aa3c601 100644
--- a/ld/emulparams/elf32btsmipn32_fbsd.sh
+++ b/ld/emulparams/elf32btsmipn32_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf32ltsmipn32.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ltsmipn32.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
BIG_OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32ebmip.sh b/ld/emulparams/elf32ebmip.sh
index 704b43e..c6d7080 100644
--- a/ld/emulparams/elf32ebmip.sh
+++ b/ld/emulparams/elf32ebmip.sh
@@ -1,2 +1,2 @@
EMBEDDED=yes
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
diff --git a/ld/emulparams/elf32ebmipvxworks.sh b/ld/emulparams/elf32ebmipvxworks.sh
index 6d1cc3c..5ed40a2 100644
--- a/ld/emulparams/elf32ebmipvxworks.sh
+++ b/ld/emulparams/elf32ebmipvxworks.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-bigmips-vxworks"
BIG_OUTPUT_FORMAT="elf32-bigmips-vxworks"
@@ -17,4 +17,4 @@ SHLIB_TEXT_START_ADDR=0
unset TEXT_DYNAMIC
unset DATA_ADDR
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32elmip.sh b/ld/emulparams/elf32elmip.sh
index c94e503..b8d66ec 100644
--- a/ld/emulparams/elf32elmip.sh
+++ b/ld/emulparams/elf32elmip.sh
@@ -1,2 +1,2 @@
EMBEDDED=yes
-. ${srcdir}/emulparams/elf32lmip.sh
+source_sh ${srcdir}/emulparams/elf32lmip.sh
diff --git a/ld/emulparams/elf32elmipvxworks.sh b/ld/emulparams/elf32elmipvxworks.sh
index c123944..b29f050 100644
--- a/ld/emulparams/elf32elmipvxworks.sh
+++ b/ld/emulparams/elf32elmipvxworks.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-littlemips-vxworks"
BIG_OUTPUT_FORMAT="elf32-bigmips-vxworks"
@@ -8,4 +8,4 @@ SHLIB_TEXT_START_ADDR=0
unset TEXT_DYNAMIC
unset DATA_ADDR
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32frvfd.sh b/ld/emulparams/elf32frvfd.sh
index c174669..c9f1d62 100644
--- a/ld/emulparams/elf32frvfd.sh
+++ b/ld/emulparams/elf32frvfd.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32frv.sh
+source_sh ${srcdir}/emulparams/elf32frv.sh
unset STACK_ADDR
OUTPUT_FORMAT="elf32-frvfdpic"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
diff --git a/ld/emulparams/elf32l4300.sh b/ld/emulparams/elf32l4300.sh
index 865792a..428315e 100644
--- a/ld/emulparams/elf32l4300.sh
+++ b/ld/emulparams/elf32l4300.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32b4300.sh
+source_sh ${srcdir}/emulparams/elf32b4300.sh
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
diff --git a/ld/emulparams/elf32lm32fd.sh b/ld/emulparams/elf32lm32fd.sh
index 52e0822..edbea49 100644
--- a/ld/emulparams/elf32lm32fd.sh
+++ b/ld/emulparams/elf32lm32fd.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32lm32.sh
+source_sh ${srcdir}/emulparams/elf32lm32.sh
unset STACK_ADDR
unset DYNAMIC_LINK
OUTPUT_FORMAT="elf32-lm32fdpic"
diff --git a/ld/emulparams/elf32lmip.sh b/ld/emulparams/elf32lmip.sh
index 14d4ded..9560492 100644
--- a/ld/emulparams/elf32lmip.sh
+++ b/ld/emulparams/elf32lmip.sh
@@ -1,7 +1,7 @@
# If you change this file, please also look at files which source this one:
# elf32elmip.sh elf32lsmip.sh
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
diff --git a/ld/emulparams/elf32lppc.sh b/ld/emulparams/elf32lppc.sh
index 8d4e3a0..67a9d53 100644
--- a/ld/emulparams/elf32lppc.sh
+++ b/ld/emulparams/elf32lppc.sh
@@ -1,5 +1,5 @@
# If you change this file, please also look at files which source this one:
# elf32lppcsim.sh elf32lppclinux.sh
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
OUTPUT_FORMAT="elf32-powerpcle"
diff --git a/ld/emulparams/elf32lppclinux.sh b/ld/emulparams/elf32lppclinux.sh
index 9a56372..96b23ee 100644
--- a/ld/emulparams/elf32lppclinux.sh
+++ b/ld/emulparams/elf32lppclinux.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32lppc.sh
+source_sh ${srcdir}/emulparams/elf32lppc.sh
TEXT_START_ADDR=0x10000000
unset EXECUTABLE_SYMBOLS
unset OTHER_END_SYMBOLS
diff --git a/ld/emulparams/elf32lppcnto.sh b/ld/emulparams/elf32lppcnto.sh
index c45260d..8341217 100644
--- a/ld/emulparams/elf32lppcnto.sh
+++ b/ld/emulparams/elf32lppcnto.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
OUTPUT_FORMAT="elf32-powerpcle"
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TEXT_START_ADDR=0x48040000
diff --git a/ld/emulparams/elf32lppcsim.sh b/ld/emulparams/elf32lppcsim.sh
index e743852..d2acb10 100644
--- a/ld/emulparams/elf32lppcsim.sh
+++ b/ld/emulparams/elf32lppcsim.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32lppc.sh
+source_sh ${srcdir}/emulparams/elf32lppc.sh
TEXT_START_ADDR=0x10000000
diff --git a/ld/emulparams/elf32lr5900.sh b/ld/emulparams/elf32lr5900.sh
index e8745ff..a06a666 100644
--- a/ld/emulparams/elf32lr5900.sh
+++ b/ld/emulparams/elf32lr5900.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmip.sh
+source_sh ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
diff --git a/ld/emulparams/elf32lr5900n32.sh b/ld/emulparams/elf32lr5900n32.sh
index 7a3c6d7..56529d3 100644
--- a/ld/emulparams/elf32lr5900n32.sh
+++ b/ld/emulparams/elf32lr5900n32.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
OUTPUT_FORMAT="elf32-nlittlemips"
BIG_OUTPUT_FORMAT="elf32-nbigmips"
diff --git a/ld/emulparams/elf32lriscv.sh b/ld/emulparams/elf32lriscv.sh
index e405da3..da0d7cf 100644
--- a/ld/emulparams/elf32lriscv.sh
+++ b/ld/emulparams/elf32lriscv.sh
@@ -1,6 +1,6 @@
# RV32 code using ILP32D ABI.
# ABI not in emulation name to avoid breaking backward compatibility.
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
OUTPUT_FORMAT="elf32-littleriscv"
# On Linux, first look for 32 bit ILP32D target libraries in /lib/ilp32d as per
diff --git a/ld/emulparams/elf32lriscv_ilp32.sh b/ld/emulparams/elf32lriscv_ilp32.sh
index 6b6affe..4935937 100644
--- a/ld/emulparams/elf32lriscv_ilp32.sh
+++ b/ld/emulparams/elf32lriscv_ilp32.sh
@@ -1,5 +1,5 @@
# RV32 code using ILP32 ABI.
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
OUTPUT_FORMAT="elf32-littleriscv"
# On Linux, first look for 32 bit ILP32 target libraries in /lib/ilp32 as per
diff --git a/ld/emulparams/elf32lriscv_ilp32f.sh b/ld/emulparams/elf32lriscv_ilp32f.sh
index 246f9ed..c684bf8 100644
--- a/ld/emulparams/elf32lriscv_ilp32f.sh
+++ b/ld/emulparams/elf32lriscv_ilp32f.sh
@@ -1,5 +1,5 @@
# RV32 code using ILP32F ABI.
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
OUTPUT_FORMAT="elf32-littleriscv"
# On Linux, first look for 32 bit ILP32F target libraries in /lib/ilp32f as per
diff --git a/ld/emulparams/elf32lsmip.sh b/ld/emulparams/elf32lsmip.sh
index 62e4f98..5b733ad 100644
--- a/ld/emulparams/elf32lsmip.sh
+++ b/ld/emulparams/elf32lsmip.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32lmip.sh
+source_sh ${srcdir}/emulparams/elf32lmip.sh
ENTRY=__start
diff --git a/ld/emulparams/elf32ltsmip.sh b/ld/emulparams/elf32ltsmip.sh
index 4a660f0..7f1e33a 100644
--- a/ld/emulparams/elf32ltsmip.sh
+++ b/ld/emulparams/elf32ltsmip.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32btsmip.sh
+source_sh ${srcdir}/emulparams/elf32btsmip.sh
OUTPUT_FORMAT="elf32-tradlittlemips"
diff --git a/ld/emulparams/elf32ltsmip_fbsd.sh b/ld/emulparams/elf32ltsmip_fbsd.sh
index 98cb987..5243e4e 100644
--- a/ld/emulparams/elf32ltsmip_fbsd.sh
+++ b/ld/emulparams/elf32ltsmip_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf32ltsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ltsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
BIG_OUTPUT_FORMAT="elf32-tradbigmips-freebsd"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32ltsmipn32.sh b/ld/emulparams/elf32ltsmipn32.sh
index 276477d..36d94b6 100644
--- a/ld/emulparams/elf32ltsmipn32.sh
+++ b/ld/emulparams/elf32ltsmipn32.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32btsmipn32.sh
+source_sh ${srcdir}/emulparams/elf32btsmipn32.sh
OUTPUT_FORMAT="elf32-ntradlittlemips"
BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
diff --git a/ld/emulparams/elf32ltsmipn32_fbsd.sh b/ld/emulparams/elf32ltsmipn32_fbsd.sh
index 1d39f69..e229960 100644
--- a/ld/emulparams/elf32ltsmipn32_fbsd.sh
+++ b/ld/emulparams/elf32ltsmipn32_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf32ltsmipn32.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ltsmipn32.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
BIG_OUTPUT_FORMAT="elf32-ntradbigmips-freebsd"
LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips-freebsd"
diff --git a/ld/emulparams/elf32microblazeel.sh b/ld/emulparams/elf32microblazeel.sh
index 14f3b3b..4c658f3 100644
--- a/ld/emulparams/elf32microblazeel.sh
+++ b/ld/emulparams/elf32microblazeel.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32microblaze.sh
+source_sh ${srcdir}/emulparams/elf32microblaze.sh
OUTPUT_FORMAT=$LITTLE_OUTPUT_FORMAT
diff --git a/ld/emulparams/elf32or1k_linux.sh b/ld/emulparams/elf32or1k_linux.sh
index 80ef51c..1cf2da4 100644
--- a/ld/emulparams/elf32or1k_linux.sh
+++ b/ld/emulparams/elf32or1k_linux.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32or1k.sh
+source_sh ${srcdir}/emulparams/elf32or1k.sh
unset EMBEDDED
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
diff --git a/ld/emulparams/elf32ppc.sh b/ld/emulparams/elf32ppc.sh
index 477279c..7385e3f 100644
--- a/ld/emulparams/elf32ppc.sh
+++ b/ld/emulparams/elf32ppc.sh
@@ -2,8 +2,8 @@
# elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh
# elf32ppcsim.sh
-. ${srcdir}/emulparams/elf32ppccommon.sh
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/elf32ppccommon.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
# Yes, we want duplicate .got and .plt sections. The linker chooses the
# appropriate one magically in ppc_after_open
DATA_GOT=
diff --git a/ld/emulparams/elf32ppc_fbsd.sh b/ld/emulparams/elf32ppc_fbsd.sh
index 0025b61..4dca0ec 100644
--- a/ld/emulparams/elf32ppc_fbsd.sh
+++ b/ld/emulparams/elf32ppc_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf32ppc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf32-powerpc-freebsd"
diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
index 11a4d53..2872ca6 100644
--- a/ld/emulparams/elf32ppccommon.sh
+++ b/ld/emulparams/elf32ppccommon.sh
@@ -1,6 +1,6 @@
# The PLT-agnostic parts of a generic 32-bit ELF PowerPC target. Included by:
# elf32ppc.sh elf32ppcvxworks.sh elf64ppc.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/emulparams/elf32ppclinux.sh b/ld/emulparams/elf32ppclinux.sh
index 262731a..d78d611 100644
--- a/ld/emulparams/elf32ppclinux.sh
+++ b/ld/emulparams/elf32ppclinux.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
unset EXECUTABLE_SYMBOLS
unset OTHER_END_SYMBOLS
diff --git a/ld/emulparams/elf32ppcnto.sh b/ld/emulparams/elf32ppcnto.sh
index d0b3e3d..9e1e557 100644
--- a/ld/emulparams/elf32ppcnto.sh
+++ b/ld/emulparams/elf32ppcnto.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TEXT_START_ADDR=0x48040000
diff --git a/ld/emulparams/elf32ppcsim.sh b/ld/emulparams/elf32ppcsim.sh
index c3466cf..fdcb370 100644
--- a/ld/emulparams/elf32ppcsim.sh
+++ b/ld/emulparams/elf32ppcsim.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
diff --git a/ld/emulparams/elf32ppcvxworks.sh b/ld/emulparams/elf32ppcvxworks.sh
index 88c1da0..d16333c 100644
--- a/ld/emulparams/elf32ppcvxworks.sh
+++ b/ld/emulparams/elf32ppcvxworks.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf32ppccommon.sh
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/elf32ppccommon.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
EXTRA_EM_FILE=ppc32elf
OUTPUT_FORMAT="elf32-powerpc-vxworks"
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/elf32ppcwindiss.sh b/ld/emulparams/elf32ppcwindiss.sh
index d454799..84d4a20 100644
--- a/ld/emulparams/elf32ppcwindiss.sh
+++ b/ld/emulparams/elf32ppcwindiss.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
EMBEDDED=yes
diff --git a/ld/emulparams/elf32tilegx_be.sh b/ld/emulparams/elf32tilegx_be.sh
index e3ea498..44b2720 100644
--- a/ld/emulparams/elf32tilegx_be.sh
+++ b/ld/emulparams/elf32tilegx_be.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32tilegx.sh
+source_sh ${srcdir}/emulparams/elf32tilegx.sh
OUTPUT_FORMAT="elf32-tilegx-be"
diff --git a/ld/emulparams/elf64_ia64_fbsd.sh b/ld/emulparams/elf64_ia64_fbsd.sh
index ab7e78f..4a0e0a6 100644
--- a/ld/emulparams/elf64_ia64_fbsd.sh
+++ b/ld/emulparams/elf64_ia64_fbsd.sh
@@ -1,6 +1,6 @@
-. ${srcdir}/emulparams/elf64_ia64.sh
+source_sh ${srcdir}/emulparams/elf64_ia64.sh
TEXT_START_ADDR="0x2000000000000000"
unset DATA_ADDR
unset SMALL_DATA_CTOR
unset SMALL_DATA_DTOR
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
diff --git a/ld/emulparams/elf64_sparc_fbsd.sh b/ld/emulparams/elf64_sparc_fbsd.sh
index 21d13ab..7d70d08 100644
--- a/ld/emulparams/elf64_sparc_fbsd.sh
+++ b/ld/emulparams/elf64_sparc_fbsd.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf64_sparc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64_sparc.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-sparc-freebsd"
diff --git a/ld/emulparams/elf64_sparc_sol2.sh b/ld/emulparams/elf64_sparc_sol2.sh
index 2fad634..b32c5be 100644
--- a/ld/emulparams/elf64_sparc_sol2.sh
+++ b/ld/emulparams/elf64_sparc_sol2.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf64_sparc.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf64_sparc.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE=solaris2
OUTPUT_FORMAT="elf64-sparc-sol2"
diff --git a/ld/emulparams/elf64alpha_fbsd.sh b/ld/emulparams/elf64alpha_fbsd.sh
index fd4a0a4..35b3a01 100644
--- a/ld/emulparams/elf64alpha_fbsd.sh
+++ b/ld/emulparams/elf64alpha_fbsd.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf64alpha.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64alpha.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-alpha-freebsd"
diff --git a/ld/emulparams/elf64alpha_nbsd.sh b/ld/emulparams/elf64alpha_nbsd.sh
index 8116f48..0d139c6 100644
--- a/ld/emulparams/elf64alpha_nbsd.sh
+++ b/ld/emulparams/elf64alpha_nbsd.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf64alpha.sh
+source_sh ${srcdir}/emulparams/elf64alpha.sh
ENTRY=__start
diff --git a/ld/emulparams/elf64bmip-defs.sh b/ld/emulparams/elf64bmip-defs.sh
index 8a0522f..61d6c00 100644
--- a/ld/emulparams/elf64bmip-defs.sh
+++ b/ld/emulparams/elf64bmip-defs.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
INITIAL_READONLY_SECTIONS="
.MIPS.abiflags ${RELOCATING-0} : { *(.MIPS.abiflags) }
diff --git a/ld/emulparams/elf64bmip.sh b/ld/emulparams/elf64bmip.sh
index 281f516..e4e4f3b 100644
--- a/ld/emulparams/elf64bmip.sh
+++ b/ld/emulparams/elf64bmip.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf64bmip-defs.sh
+source_sh ${srcdir}/emulparams/elf64bmip-defs.sh
OUTPUT_FORMAT="elf64-bigmips"
BIG_OUTPUT_FORMAT="elf64-bigmips"
LITTLE_OUTPUT_FORMAT="elf64-littlemips"
diff --git a/ld/emulparams/elf64btsmip.sh b/ld/emulparams/elf64btsmip.sh
index 202585f..0438720 100644
--- a/ld/emulparams/elf64btsmip.sh
+++ b/ld/emulparams/elf64btsmip.sh
@@ -1,7 +1,7 @@
# If you change this file, please also look at files which source this one:
# elf64ltsmip.sh
-. ${srcdir}/emulparams/elf64bmip-defs.sh
+source_sh ${srcdir}/emulparams/elf64bmip-defs.sh
OUTPUT_FORMAT="elf64-tradbigmips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
diff --git a/ld/emulparams/elf64btsmip_fbsd.sh b/ld/emulparams/elf64btsmip_fbsd.sh
index 32889b4..3ad876b 100644
--- a/ld/emulparams/elf64btsmip_fbsd.sh
+++ b/ld/emulparams/elf64btsmip_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf64btsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64btsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
BIG_OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf64lppc.sh b/ld/emulparams/elf64lppc.sh
index 1c47493..71ef0d3 100644
--- a/ld/emulparams/elf64lppc.sh
+++ b/ld/emulparams/elf64lppc.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf64ppc.sh
+source_sh ${srcdir}/emulparams/elf64ppc.sh
OUTPUT_FORMAT="elf64-powerpcle"
NOP=0x00000060
diff --git a/ld/emulparams/elf64lriscv-defs.sh b/ld/emulparams/elf64lriscv-defs.sh
index 930f333..84a700a 100644
--- a/ld/emulparams/elf64lriscv-defs.sh
+++ b/ld/emulparams/elf64lriscv-defs.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf32lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf32lriscv-defs.sh
ELFSIZE=64
diff --git a/ld/emulparams/elf64lriscv.sh b/ld/emulparams/elf64lriscv.sh
index f0a10ab..e07a064 100644
--- a/ld/emulparams/elf64lriscv.sh
+++ b/ld/emulparams/elf64lriscv.sh
@@ -1,6 +1,6 @@
# RV64 code using LP64D ABI.
# ABI not in emulation name to avoid breaking backward compatibility.
-. ${srcdir}/emulparams/elf64lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf64lriscv-defs.sh
OUTPUT_FORMAT="elf64-littleriscv"
# On Linux, first look for 64 bit LP64D target libraries in /lib64/lp64d as per
diff --git a/ld/emulparams/elf64lriscv_lp64.sh b/ld/emulparams/elf64lriscv_lp64.sh
index 80a8f82..b1bb252 100644
--- a/ld/emulparams/elf64lriscv_lp64.sh
+++ b/ld/emulparams/elf64lriscv_lp64.sh
@@ -1,5 +1,5 @@
# RV64 code using LP64 ABI.
-. ${srcdir}/emulparams/elf64lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf64lriscv-defs.sh
OUTPUT_FORMAT="elf64-littleriscv"
# On Linux, first look for 64 bit LP64 target libraries in /lib64/lp64 as per
diff --git a/ld/emulparams/elf64lriscv_lp64f.sh b/ld/emulparams/elf64lriscv_lp64f.sh
index 8f86421..005f191 100644
--- a/ld/emulparams/elf64lriscv_lp64f.sh
+++ b/ld/emulparams/elf64lriscv_lp64f.sh
@@ -1,5 +1,5 @@
# RV64 code using LP64F ABI.
-. ${srcdir}/emulparams/elf64lriscv-defs.sh
+source_sh ${srcdir}/emulparams/elf64lriscv-defs.sh
OUTPUT_FORMAT="elf64-littleriscv"
# On Linux, first look for 64 bit LP64F target libraries in /lib64/lp64f as per
diff --git a/ld/emulparams/elf64ltsmip.sh b/ld/emulparams/elf64ltsmip.sh
index efd6b7d..235ae8a 100644
--- a/ld/emulparams/elf64ltsmip.sh
+++ b/ld/emulparams/elf64ltsmip.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf64btsmip.sh
+source_sh ${srcdir}/emulparams/elf64btsmip.sh
OUTPUT_FORMAT="elf64-tradlittlemips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
diff --git a/ld/emulparams/elf64ltsmip_fbsd.sh b/ld/emulparams/elf64ltsmip_fbsd.sh
index 0cd0616..908b85e 100644
--- a/ld/emulparams/elf64ltsmip_fbsd.sh
+++ b/ld/emulparams/elf64ltsmip_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf64ltsmip.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64ltsmip.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
BIG_OUTPUT_FORMAT="elf64-tradbigmips-freebsd"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips-freebsd"
diff --git a/ld/emulparams/elf64ppc.sh b/ld/emulparams/elf64ppc.sh
index d6b8837..0dd42cf 100644
--- a/ld/emulparams/elf64ppc.sh
+++ b/ld/emulparams/elf64ppc.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf32ppccommon.sh
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/elf32ppccommon.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
EXTRA_EM_FILE=ppc64elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-powerpc"
diff --git a/ld/emulparams/elf64ppc_fbsd.sh b/ld/emulparams/elf64ppc_fbsd.sh
index e1b09ca..7a380a3 100644
--- a/ld/emulparams/elf64ppc_fbsd.sh
+++ b/ld/emulparams/elf64ppc_fbsd.sh
@@ -1,5 +1,5 @@
-. ${srcdir}/emulparams/elf64ppc.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf64ppc.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-powerpc-freebsd"
DEFAULT_PLT_STATIC_CHAIN=1
diff --git a/ld/emulparams/elf64rdos.sh b/ld/emulparams/elf64rdos.sh
index 87164d5..b4f2385 100644
--- a/ld/emulparams/elf64rdos.sh
+++ b/ld/emulparams/elf64rdos.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-x86-64"
diff --git a/ld/emulparams/elf64tilegx_be.sh b/ld/emulparams/elf64tilegx_be.sh
index dd0347d..601b36e 100644
--- a/ld/emulparams/elf64tilegx_be.sh
+++ b/ld/emulparams/elf64tilegx_be.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf64tilegx.sh
+source_sh ${srcdir}/emulparams/elf64tilegx.sh
OUTPUT_FORMAT="elf64-tilegx-be"
diff --git a/ld/emulparams/elf_i386.sh b/ld/emulparams/elf_i386.sh
index 5d3f71f..6f4bc4b 100644
--- a/ld/emulparams/elf_i386.sh
+++ b/ld/emulparams/elf_i386.sh
@@ -1,8 +1,8 @@
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
-. ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/cet.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
NO_RELA_RELOCS=yes
diff --git a/ld/emulparams/elf_i386_be.sh b/ld/emulparams/elf_i386_be.sh
index 63d7b6d..0d8c834 100644
--- a/ld/emulparams/elf_i386_be.sh
+++ b/ld/emulparams/elf_i386_be.sh
@@ -1,6 +1,6 @@
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
EXTRA_EM_FILE="elf-x86"
diff --git a/ld/emulparams/elf_i386_fbsd.sh b/ld/emulparams/elf_i386_fbsd.sh
index 2378598..d1d6604 100644
--- a/ld/emulparams/elf_i386_fbsd.sh
+++ b/ld/emulparams/elf_i386_fbsd.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf_i386.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_i386.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf32-i386-freebsd"
diff --git a/ld/emulparams/elf_i386_ldso.sh b/ld/emulparams/elf_i386_ldso.sh
index 981c701..6bd85e0 100644
--- a/ld/emulparams/elf_i386_ldso.sh
+++ b/ld/emulparams/elf_i386_ldso.sh
@@ -1,7 +1,7 @@
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
EXTRA_EM_FILE="elf-x86"
diff --git a/ld/emulparams/elf_i386_nacl.sh b/ld/emulparams/elf_i386_nacl.sh
index 294f7f5..a8cf385 100644
--- a/ld/emulparams/elf_i386_nacl.sh
+++ b/ld/emulparams/elf_i386_nacl.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf_i386.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/elf_i386.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
OUTPUT_FORMAT="elf32-i386-nacl"
ARCH="i386:nacl" # The :nacl just means one-byte nops for code fill.
diff --git a/ld/emulparams/elf_i386_sol2.sh b/ld/emulparams/elf_i386_sol2.sh
index c45a586..5e63ca8 100644
--- a/ld/emulparams/elf_i386_sol2.sh
+++ b/ld/emulparams/elf_i386_sol2.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf_i386_ldso.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf_i386_ldso.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE="solaris2-x86"
OUTPUT_FORMAT="elf32-i386-sol2"
diff --git a/ld/emulparams/elf_i386_vxworks.sh b/ld/emulparams/elf_i386_vxworks.sh
index efc164f..c4426bc 100644
--- a/ld/emulparams/elf_i386_vxworks.sh
+++ b/ld/emulparams/elf_i386_vxworks.sh
@@ -11,7 +11,7 @@ EXTRA_EM_FILE="elf-x86"
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
-. ${srcdir}/emulparams/vxworks.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
diff --git a/ld/emulparams/elf_iamcu.sh b/ld/emulparams/elf_iamcu.sh
index d30a155..6882a25 100644
--- a/ld/emulparams/elf_iamcu.sh
+++ b/ld/emulparams/elf_iamcu.sh
@@ -1,7 +1,7 @@
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-iamcu"
NO_RELA_RELOCS=yes
diff --git a/ld/emulparams/elf_k1om.sh b/ld/emulparams/elf_k1om.sh
index ec84bd0..6be186e 100644
--- a/ld/emulparams/elf_k1om.sh
+++ b/ld/emulparams/elf_k1om.sh
@@ -1,7 +1,7 @@
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-k1om"
diff --git a/ld/emulparams/elf_k1om_fbsd.sh b/ld/emulparams/elf_k1om_fbsd.sh
index 98f8033..1ffe059 100644
--- a/ld/emulparams/elf_k1om_fbsd.sh
+++ b/ld/emulparams/elf_k1om_fbsd.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf_k1om.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_k1om.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-k1om-freebsd"
diff --git a/ld/emulparams/elf_l1om.sh b/ld/emulparams/elf_l1om.sh
index fade2da..cf831c7 100644
--- a/ld/emulparams/elf_l1om.sh
+++ b/ld/emulparams/elf_l1om.sh
@@ -1,7 +1,7 @@
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-l1om"
diff --git a/ld/emulparams/elf_l1om_fbsd.sh b/ld/emulparams/elf_l1om_fbsd.sh
index a90f81e..0d52b60 100644
--- a/ld/emulparams/elf_l1om_fbsd.sh
+++ b/ld/emulparams/elf_l1om_fbsd.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf_l1om.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_l1om.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-l1om-freebsd"
diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh
index 241911d..0034a8b 100644
--- a/ld/emulparams/elf_x86_64.sh
+++ b/ld/emulparams/elf_x86_64.sh
@@ -1,9 +1,9 @@
-. ${srcdir}/emulparams/plt_unwind.sh
-. ${srcdir}/emulparams/extern_protected_data.sh
-. ${srcdir}/emulparams/dynamic_undefined_weak.sh
-. ${srcdir}/emulparams/reloc_overflow.sh
-. ${srcdir}/emulparams/call_nop.sh
-. ${srcdir}/emulparams/cet.sh
+source_sh ${srcdir}/emulparams/plt_unwind.sh
+source_sh ${srcdir}/emulparams/extern_protected_data.sh
+source_sh ${srcdir}/emulparams/dynamic_undefined_weak.sh
+source_sh ${srcdir}/emulparams/reloc_overflow.sh
+source_sh ${srcdir}/emulparams/call_nop.sh
+source_sh ${srcdir}/emulparams/cet.sh
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-x86-64"
diff --git a/ld/emulparams/elf_x86_64_cloudabi.sh b/ld/emulparams/elf_x86_64_cloudabi.sh
index 4d5f745..1f8732e 100644
--- a/ld/emulparams/elf_x86_64_cloudabi.sh
+++ b/ld/emulparams/elf_x86_64_cloudabi.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
OUTPUT_FORMAT="elf64-x86-64-cloudabi"
diff --git a/ld/emulparams/elf_x86_64_fbsd.sh b/ld/emulparams/elf_x86_64_fbsd.sh
index 35b6a62..7ef974a 100644
--- a/ld/emulparams/elf_x86_64_fbsd.sh
+++ b/ld/emulparams/elf_x86_64_fbsd.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/elf_fbsd.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_fbsd.sh
OUTPUT_FORMAT="elf64-x86-64-freebsd"
diff --git a/ld/emulparams/elf_x86_64_nacl.sh b/ld/emulparams/elf_x86_64_nacl.sh
index a6966bd..3f47e4c 100644
--- a/ld/emulparams/elf_x86_64_nacl.sh
+++ b/ld/emulparams/elf_x86_64_nacl.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/elf_nacl.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/elf_nacl.sh
OUTPUT_FORMAT="elf64-x86-64-nacl"
ARCH="i386:x86-64:nacl" # The :nacl just means one-byte nops for code fill.
diff --git a/ld/emulparams/elf_x86_64_sol2.sh b/ld/emulparams/elf_x86_64_sol2.sh
index 3bd975f..2bd709d 100644
--- a/ld/emulparams/elf_x86_64_sol2.sh
+++ b/ld/emulparams/elf_x86_64_sol2.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf_x86_64.sh
-. ${srcdir}/emulparams/solaris2.sh
+source_sh ${srcdir}/emulparams/elf_x86_64.sh
+source_sh ${srcdir}/emulparams/solaris2.sh
EXTRA_EM_FILE="solaris2-x86"
OUTPUT_FORMAT="elf64-x86-64-sol2"
diff --git a/ld/emulparams/h8300helf.sh b/ld/emulparams/h8300helf.sh
index 1cde35c..2401b6b 100644
--- a/ld/emulparams/h8300helf.sh
+++ b/ld/emulparams/h8300helf.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300h"
STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300helf_linux.sh b/ld/emulparams/h8300helf_linux.sh
index c66ff94..22b3738 100644
--- a/ld/emulparams/h8300helf_linux.sh
+++ b/ld/emulparams/h8300helf_linux.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/h8300elf_linux.sh
+source_sh ${srcdir}/emulparams/h8300elf_linux.sh
ARCH="h8300:h8300h"
STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300hnelf.sh b/ld/emulparams/h8300hnelf.sh
index 4a75ff9..7ee5dd3 100644
--- a/ld/emulparams/h8300hnelf.sh
+++ b/ld/emulparams/h8300hnelf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300hn"
diff --git a/ld/emulparams/h8300self.sh b/ld/emulparams/h8300self.sh
index 7539eec..554de40 100644
--- a/ld/emulparams/h8300self.sh
+++ b/ld/emulparams/h8300self.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300s"
STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300self_linux.sh b/ld/emulparams/h8300self_linux.sh
index 76f3ed7..9ea8ac7 100644
--- a/ld/emulparams/h8300self_linux.sh
+++ b/ld/emulparams/h8300self_linux.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/h8300elf_linux.sh
+source_sh ${srcdir}/emulparams/h8300elf_linux.sh
ARCH="h8300:h8300s"
STACK_ADDR=0x2fefc
diff --git a/ld/emulparams/h8300snelf.sh b/ld/emulparams/h8300snelf.sh
index ddeec11..0d72d76 100644
--- a/ld/emulparams/h8300snelf.sh
+++ b/ld/emulparams/h8300snelf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300sn"
diff --git a/ld/emulparams/h8300sxelf.sh b/ld/emulparams/h8300sxelf.sh
index c0b715f..f578843 100644
--- a/ld/emulparams/h8300sxelf.sh
+++ b/ld/emulparams/h8300sxelf.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300sx"
STACK_ADDR=0x2fefc
TINY_READONLY_SECTION=".tinyrodata :
diff --git a/ld/emulparams/h8300sxelf_linux.sh b/ld/emulparams/h8300sxelf_linux.sh
index b06dc2e..d7e9f28 100644
--- a/ld/emulparams/h8300sxelf_linux.sh
+++ b/ld/emulparams/h8300sxelf_linux.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/h8300elf_linux.sh
+source_sh ${srcdir}/emulparams/h8300elf_linux.sh
ARCH="h8300:h8300sx"
STACK_ADDR=0x2fefc
TINY_READONLY_SECTION=".tinyrodata :
diff --git a/ld/emulparams/h8300sxnelf.sh b/ld/emulparams/h8300sxnelf.sh
index 98e9d49..75fd22e 100644
--- a/ld/emulparams/h8300sxnelf.sh
+++ b/ld/emulparams/h8300sxnelf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/h8300elf.sh
+source_sh ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300sxn"
diff --git a/ld/emulparams/hppanbsd.sh b/ld/emulparams/hppanbsd.sh
index dcc6a93..7fe86b6 100644
--- a/ld/emulparams/hppanbsd.sh
+++ b/ld/emulparams/hppanbsd.sh
@@ -1,6 +1,6 @@
# If you change this file, please also look at files which source this one:
# hppaobsd.sh
-. ${srcdir}/emulparams/hppalinux.sh
+source_sh ${srcdir}/emulparams/hppalinux.sh
OUTPUT_FORMAT="elf32-hppa-netbsd"
diff --git a/ld/emulparams/hppaobsd.sh b/ld/emulparams/hppaobsd.sh
index 0d3bf94..d89a974 100644
--- a/ld/emulparams/hppaobsd.sh
+++ b/ld/emulparams/hppaobsd.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/hppanbsd.sh
+source_sh ${srcdir}/emulparams/hppanbsd.sh
OUTPUT_FORMAT="elf32-hppa"
TEXT_START_ADDR=0x1000
diff --git a/ld/emulparams/m32rlelf.sh b/ld/emulparams/m32rlelf.sh
index 2d4488b..214c208 100644
--- a/ld/emulparams/m32rlelf.sh
+++ b/ld/emulparams/m32rlelf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/m32relf.sh
+source_sh ${srcdir}/emulparams/m32relf.sh
OUTPUT_FORMAT="elf32-m32rle"
diff --git a/ld/emulparams/m32rlelf_linux.sh b/ld/emulparams/m32rlelf_linux.sh
index 6d16a1c..a7a8ab2 100644
--- a/ld/emulparams/m32rlelf_linux.sh
+++ b/ld/emulparams/m32rlelf_linux.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/m32relf_linux.sh
+source_sh ${srcdir}/emulparams/m32relf_linux.sh
OUTPUT_FORMAT="elf32-m32rle-linux"
diff --git a/ld/emulparams/m68kelfnbsd.sh b/ld/emulparams/m68kelfnbsd.sh
index 69e328d..5823933 100644
--- a/ld/emulparams/m68kelfnbsd.sh
+++ b/ld/emulparams/m68kelfnbsd.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/m68kelf.sh
+source_sh ${srcdir}/emulparams/m68kelf.sh
TEXT_START_ADDR=0x2000
TARGET_PAGE_SIZE=0x2000
MACHINE=
diff --git a/ld/emulparams/mn10300.sh b/ld/emulparams/mn10300.sh
index 121987c..ba7a2c4 100644
--- a/ld/emulparams/mn10300.sh
+++ b/ld/emulparams/mn10300.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/mn10200.sh
+source_sh ${srcdir}/emulparams/mn10200.sh
OUTPUT_FORMAT="elf32-mn10300"
ARCH=mn10300
TEMPLATE_NAME=elf32
diff --git a/ld/emulparams/msp430X.sh b/ld/emulparams/msp430X.sh
index 4f5af48..e5f68e4 100644
--- a/ld/emulparams/msp430X.sh
+++ b/ld/emulparams/msp430X.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/msp430elf.sh
+source_sh ${srcdir}/emulparams/msp430elf.sh
ARCH=MSP430x43
ROM_START=0x02000
diff --git a/ld/emulparams/nds32belf.sh b/ld/emulparams/nds32belf.sh
index eee48fa..3179d52 100644
--- a/ld/emulparams/nds32belf.sh
+++ b/ld/emulparams/nds32belf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/nds32elf.sh
+source_sh ${srcdir}/emulparams/nds32elf.sh
OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/nds32belf16m.sh b/ld/emulparams/nds32belf16m.sh
index 9839f7b..491affb 100644
--- a/ld/emulparams/nds32belf16m.sh
+++ b/ld/emulparams/nds32belf16m.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/nds32elf16m.sh
+source_sh ${srcdir}/emulparams/nds32elf16m.sh
OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/nds32belf_linux.sh b/ld/emulparams/nds32belf_linux.sh
index bc99e38..0cb6ebe 100644
--- a/ld/emulparams/nds32belf_linux.sh
+++ b/ld/emulparams/nds32belf_linux.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/nds32elf_linux.sh
+source_sh ${srcdir}/emulparams/nds32elf_linux.sh
OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
diff --git a/ld/emulparams/pjlelf.sh b/ld/emulparams/pjlelf.sh
index 88c2b64..efff956 100644
--- a/ld/emulparams/pjlelf.sh
+++ b/ld/emulparams/pjlelf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/pjelf.sh
+source_sh ${srcdir}/emulparams/pjelf.sh
OUTPUT_FORMAT="elf32-pjl"
diff --git a/ld/emulparams/ppclynx.sh b/ld/emulparams/ppclynx.sh
index 7451678..a58b5b0 100644
--- a/ld/emulparams/ppclynx.sh
+++ b/ld/emulparams/ppclynx.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32ppc.sh
+source_sh ${srcdir}/emulparams/elf32ppc.sh
TEXT_BASE=0x00002000
DYN_TEXT_BASE=0x00400000
diff --git a/ld/emulparams/score7_elf.sh b/ld/emulparams/score7_elf.sh
index 9b7ce9b..5b1bf6d 100644
--- a/ld/emulparams/score7_elf.sh
+++ b/ld/emulparams/score7_elf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/score3_elf.sh
+source_sh ${srcdir}/emulparams/score3_elf.sh
ARCH=score7
diff --git a/ld/emulparams/shelf_fd.sh b/ld/emulparams/shelf_fd.sh
index 7ec25ab..aa9726c 100644
--- a/ld/emulparams/shelf_fd.sh
+++ b/ld/emulparams/shelf_fd.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/shlelf_fd.sh
+source_sh ${srcdir}/emulparams/shlelf_fd.sh
OUTPUT_FORMAT="elf32-shbig-fdpic"
diff --git a/ld/emulparams/shelf_linux.sh b/ld/emulparams/shelf_linux.sh
index b841bef..c7af30b 100644
--- a/ld/emulparams/shelf_linux.sh
+++ b/ld/emulparams/shelf_linux.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/shlelf_linux.sh
+source_sh ${srcdir}/emulparams/shlelf_linux.sh
OUTPUT_FORMAT="elf32-shbig-linux"
diff --git a/ld/emulparams/shelf_nbsd.sh b/ld/emulparams/shelf_nbsd.sh
index b27993d..3913996 100644
--- a/ld/emulparams/shelf_nbsd.sh
+++ b/ld/emulparams/shelf_nbsd.sh
@@ -1,7 +1,7 @@
# If you change this file, please alsolook at files which source this one:
# shlelf_nbsd.sh
-. ${srcdir}/emulparams/shelf.sh
+source_sh ${srcdir}/emulparams/shelf.sh
OUTPUT_FORMAT="elf32-sh-nbsd"
TEXT_START_ADDR=0x400000
diff --git a/ld/emulparams/shelf_uclinux.sh b/ld/emulparams/shelf_uclinux.sh
index dac390e..a22c35a 100644
--- a/ld/emulparams/shelf_uclinux.sh
+++ b/ld/emulparams/shelf_uclinux.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/shelf.sh
+source_sh ${srcdir}/emulparams/shelf.sh
# We do not want a .stack section
unset STACK_ADDR
diff --git a/ld/emulparams/shelf_vxworks.sh b/ld/emulparams/shelf_vxworks.sh
index 4b82e36..4929c0d 100644
--- a/ld/emulparams/shelf_vxworks.sh
+++ b/ld/emulparams/shelf_vxworks.sh
@@ -18,4 +18,4 @@ SYMPREFIX=_
GOT=".got ${RELOCATING-0} : {
${RELOCATING+PROVIDE(__GLOBAL_OFFSET_TABLE_ = .);
*(.got.plt) }*(.got) }"
-. ${srcdir}/emulparams/vxworks.sh
+source_sh ${srcdir}/emulparams/vxworks.sh
diff --git a/ld/emulparams/shl.sh b/ld/emulparams/shl.sh
index 5fbb165..cfba04c 100644
--- a/ld/emulparams/shl.sh
+++ b/ld/emulparams/shl.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/sh.sh
+source_sh ${srcdir}/emulparams/sh.sh
OUTPUT_FORMAT="coff-shl"
diff --git a/ld/emulparams/shlelf.sh b/ld/emulparams/shlelf.sh
index e19678b..b03dbe2 100644
--- a/ld/emulparams/shlelf.sh
+++ b/ld/emulparams/shlelf.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/shelf.sh
+source_sh ${srcdir}/emulparams/shelf.sh
OUTPUT_FORMAT="elf32-shl"
diff --git a/ld/emulparams/shlelf_fd.sh b/ld/emulparams/shlelf_fd.sh
index cf827e5..2b51245 100644
--- a/ld/emulparams/shlelf_fd.sh
+++ b/ld/emulparams/shlelf_fd.sh
@@ -1,7 +1,7 @@
# If you change this file, please also look at files which source this one:
# shelf_fd.sh
-. ${srcdir}/emulparams/shlelf_linux.sh
+source_sh ${srcdir}/emulparams/shlelf_linux.sh
OUTPUT_FORMAT="elf32-sh-fdpic"
GOT=".got ${RELOCATING-0} : {${RELOCATING+ *(.got.funcdesc) *(.got.plt)} *(.got) }"
OTHER_GOT_RELOC_SECTIONS="
diff --git a/ld/emulparams/shlelf_nbsd.sh b/ld/emulparams/shlelf_nbsd.sh
index d6ca82e..060f19e 100644
--- a/ld/emulparams/shlelf_nbsd.sh
+++ b/ld/emulparams/shlelf_nbsd.sh
@@ -1,3 +1,3 @@
-. ${srcdir}/emulparams/shelf_nbsd.sh
+source_sh ${srcdir}/emulparams/shelf_nbsd.sh
OUTPUT_FORMAT="elf32-shl-nbsd"
diff --git a/ld/emulparams/shlelf_vxworks.sh b/ld/emulparams/shlelf_vxworks.sh
index 0a055b1..161d04e 100644
--- a/ld/emulparams/shlelf_vxworks.sh
+++ b/ld/emulparams/shlelf_vxworks.sh
@@ -1,2 +1,2 @@
-. ${srcdir}/emulparams/shelf_vxworks.sh
+source_sh ${srcdir}/emulparams/shelf_vxworks.sh
OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"