aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-03-16 17:10:07 +1030
committerAlan Modra <amodra@gmail.com>2023-03-16 17:30:28 +1030
commit6752dd75f76457902729a5f03d09fa28ec5d68c3 (patch)
treece27cbdcc9d0cabe75983869af5822018d30fd7d /ld
parent3e8b13bf7745cde3a0bb027041df7cad4b29b510 (diff)
downloadgdb-6752dd75f76457902729a5f03d09fa28ec5d68c3.zip
gdb-6752dd75f76457902729a5f03d09fa28ec5d68c3.tar.gz
gdb-6752dd75f76457902729a5f03d09fa28ec5d68c3.tar.bz2
Re: Add --enable-linker-verssion
Output sections without any input sections to initialise their flags have their flags initialised by data statements to LOAD, ALLOC, HAS_CONTENTS by default. This is wrong for .comment. Fix that by making the script initialise the section type to INFO, one of the noalloc section types. That also allows the address of .comment to be set to zero, as is usual for non-alloc sections. Also, use source_sh for all of the sourced scripts to set up make dependencies. PR 30187 * scripttempl/misc-sections.sc: Set .comment address to zero and type to INFO. * scripttempl/ft32.sc: Fix breakages from last edit. * scripttempl/arclinux.sc: Use source_sh to source DWARF.sc and misc-sections.sc. * scripttempl/avr.sc: Likewise. * scripttempl/dlx.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf32cr16.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf64bpf.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfm9s12z.sc: Likewise. * scripttempl/elfmicroblaze.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/i386beos.sc: Likewise. * scripttempl/i386go32.sc: Likewise. * scripttempl/ia64vms.sc: Likewise. * scripttempl/ip2k.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/mmo.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/pru.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/visium.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * scripttempl/z80.sc: Likewise. * testsuite/ld-scripts/ld-version-2.d: Don't skip ft32 or pru.
Diffstat (limited to 'ld')
-rw-r--r--ld/scripttempl/arclinux.sc5
-rw-r--r--ld/scripttempl/avr.sc4
-rw-r--r--ld/scripttempl/dlx.sc5
-rw-r--r--ld/scripttempl/elf.sc5
-rw-r--r--ld/scripttempl/elf32cr16.sc4
-rw-r--r--ld/scripttempl/elf32crx.sc4
-rw-r--r--ld/scripttempl/elf32msp430.sc4
-rw-r--r--ld/scripttempl/elf64bpf.sc2
-rw-r--r--ld/scripttempl/elf64hppa.sc4
-rw-r--r--ld/scripttempl/elf_chaos.sc4
-rw-r--r--ld/scripttempl/elfarc.sc4
-rw-r--r--ld/scripttempl/elfarcv2.sc4
-rw-r--r--ld/scripttempl/elfd10v.sc4
-rw-r--r--ld/scripttempl/elfd30v.sc4
-rw-r--r--ld/scripttempl/elfm68hc11.sc4
-rw-r--r--ld/scripttempl/elfm68hc12.sc4
-rw-r--r--ld/scripttempl/elfm9s12z.sc4
-rw-r--r--ld/scripttempl/elfmicroblaze.sc4
-rw-r--r--ld/scripttempl/elfxgate.sc4
-rw-r--r--ld/scripttempl/elfxtensa.sc5
-rw-r--r--ld/scripttempl/epiphany_4x4.sc5
-rw-r--r--ld/scripttempl/ft32.sc13
-rw-r--r--ld/scripttempl/i386beos.sc2
-rw-r--r--ld/scripttempl/i386go32.sc2
-rw-r--r--ld/scripttempl/ia64vms.sc2
-rw-r--r--ld/scripttempl/ip2k.sc5
-rw-r--r--ld/scripttempl/iq2000.sc5
-rw-r--r--ld/scripttempl/mep.sc5
-rw-r--r--ld/scripttempl/misc-sections.sc2
-rw-r--r--ld/scripttempl/mmo.sc2
-rw-r--r--ld/scripttempl/nds32elf.sc5
-rw-r--r--ld/scripttempl/pru.sc5
-rw-r--r--ld/scripttempl/v850.sc5
-rw-r--r--ld/scripttempl/v850_rh850.sc5
-rw-r--r--ld/scripttempl/visium.sc2
-rw-r--r--ld/scripttempl/xstormy16.sc5
-rw-r--r--ld/scripttempl/z80.sc4
-rw-r--r--ld/testsuite/ld-scripts/ld-version-2.d1
38 files changed, 70 insertions, 87 deletions
diff --git a/ld/scripttempl/arclinux.sc b/ld/scripttempl/arclinux.sc
index 9c24e5b..20429df 100644
--- a/ld/scripttempl/arclinux.sc
+++ b/ld/scripttempl/arclinux.sc
@@ -656,9 +656,8 @@ EOF
test -z "${NON_ALLOC_DYN}" || emit_dyn
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index 3677e07..61cccfc 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -328,13 +328,13 @@ cat <<EOF
EOF
fi
-. $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
cat <<EOF
.note.gnu.build-id ${RELOCATING-0} : { *(.note.gnu.build-id) }
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/dlx.sc b/ld/scripttempl/dlx.sc
index f5673f4..8d7a9d5 100644
--- a/ld/scripttempl/dlx.sc
+++ b/ld/scripttempl/dlx.sc
@@ -41,9 +41,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 92f100b..1e3c5aa 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -722,9 +722,8 @@ EOF
test -z "${NON_ALLOC_DYN}" || emit_dyn
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/elf32cr16.sc b/ld/scripttempl/elf32cr16.sc
index aedc17b..cefae42 100644
--- a/ld/scripttempl/elf32cr16.sc
+++ b/ld/scripttempl/elf32cr16.sc
@@ -171,8 +171,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elf32crx.sc b/ld/scripttempl/elf32crx.sc
index 747bfbb1..594eaa1 100644
--- a/ld/scripttempl/elf32crx.sc
+++ b/ld/scripttempl/elf32crx.sc
@@ -169,8 +169,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32msp430.sc
index 4b0ac8d..6edc908 100644
--- a/ld/scripttempl/elf32msp430.sc
+++ b/ld/scripttempl/elf32msp430.sc
@@ -332,8 +332,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
test -n "${RELOCATING}" && cat <<EOF
.MSP430.attributes 0 :
diff --git a/ld/scripttempl/elf64bpf.sc b/ld/scripttempl/elf64bpf.sc
index 8ff588b..7415458 100644
--- a/ld/scripttempl/elf64bpf.sc
+++ b/ld/scripttempl/elf64bpf.sc
@@ -679,7 +679,7 @@ EOF
test -z "${NON_ALLOC_DYN}" || emit_dyn
-. $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/elf64hppa.sc b/ld/scripttempl/elf64hppa.sc
index e80d248..e85dd39 100644
--- a/ld/scripttempl/elf64hppa.sc
+++ b/ld/scripttempl/elf64hppa.sc
@@ -533,8 +533,8 @@ if test -n "${NON_ALLOC_DYN}"; then
rm -f ldscripts/dyntmp.$$
fi
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/elf_chaos.sc b/ld/scripttempl/elf_chaos.sc
index f3b2776..72f91c9 100644
--- a/ld/scripttempl/elf_chaos.sc
+++ b/ld/scripttempl/elf_chaos.sc
@@ -327,8 +327,8 @@ cat <<EOF
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/elfarc.sc b/ld/scripttempl/elfarc.sc
index ccba4a1..57cd0a5 100644
--- a/ld/scripttempl/elfarc.sc
+++ b/ld/scripttempl/elfarc.sc
@@ -409,8 +409,8 @@ test -n "${RELOCATING}" && cat <<EOF
}
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
/* ARC Extension Sections */
diff --git a/ld/scripttempl/elfarcv2.sc b/ld/scripttempl/elfarcv2.sc
index 5b547c1..f1b8a69 100644
--- a/ld/scripttempl/elfarcv2.sc
+++ b/ld/scripttempl/elfarcv2.sc
@@ -294,8 +294,8 @@ SECTIONS
.note.gnu.build-id : { *(.note.gnu.build-id) }
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
/* ARC Extension Sections */
diff --git a/ld/scripttempl/elfd10v.sc b/ld/scripttempl/elfd10v.sc
index c08192c..e52aaed 100644
--- a/ld/scripttempl/elfd10v.sc
+++ b/ld/scripttempl/elfd10v.sc
@@ -174,8 +174,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elfd30v.sc b/ld/scripttempl/elfd30v.sc
index 2c95f5c..97fafb3 100644
--- a/ld/scripttempl/elfd30v.sc
+++ b/ld/scripttempl/elfd30v.sc
@@ -199,8 +199,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${RELOCATING+PROVIDE (__stack = ${STACK_START_ADDR});}
diff --git a/ld/scripttempl/elfm68hc11.sc b/ld/scripttempl/elfm68hc11.sc
index e796a5f..ea4321c 100644
--- a/ld/scripttempl/elfm68hc11.sc
+++ b/ld/scripttempl/elfm68hc11.sc
@@ -430,8 +430,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elfm68hc12.sc b/ld/scripttempl/elfm68hc12.sc
index 6fa7089..a5a623b 100644
--- a/ld/scripttempl/elfm68hc12.sc
+++ b/ld/scripttempl/elfm68hc12.sc
@@ -432,7 +432,7 @@ SECTIONS
${RELOCATING+${VECTORS}}
EOF
-. $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
cat <<EOF
/* Treatment of DWARF debug section must be at end of the linker
@@ -441,7 +441,7 @@ cat <<EOF
symbols are found. */
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elfm9s12z.sc b/ld/scripttempl/elfm9s12z.sc
index d77e213..c09b3f7 100644
--- a/ld/scripttempl/elfm9s12z.sc
+++ b/ld/scripttempl/elfm9s12z.sc
@@ -422,7 +422,7 @@ SECTIONS
${RELOCATING+${VECTORS}}
EOF
-. $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
cat <<EOF
/* Treatment of DWARF debug section must be at end of the linker
@@ -431,7 +431,7 @@ cat <<EOF
symbols are found. */
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elfmicroblaze.sc b/ld/scripttempl/elfmicroblaze.sc
index 6c17172..5121c5d 100644
--- a/ld/scripttempl/elfmicroblaze.sc
+++ b/ld/scripttempl/elfmicroblaze.sc
@@ -234,8 +234,8 @@ SECTIONS
}
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elfxgate.sc b/ld/scripttempl/elfxgate.sc
index f810788..2655e89 100644
--- a/ld/scripttempl/elfxgate.sc
+++ b/ld/scripttempl/elfxgate.sc
@@ -432,8 +432,8 @@ SECTIONS
${RELOCATING+${VECTORS}}
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc
index a6cd174..7c71525 100644
--- a/ld/scripttempl/elfxtensa.sc
+++ b/ld/scripttempl/elfxtensa.sc
@@ -543,9 +543,8 @@ if test -n "${NON_ALLOC_DYN}"; then
rm -f ldscripts/dyntmp.$$
fi
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/epiphany_4x4.sc b/ld/scripttempl/epiphany_4x4.sc
index 42e2f7e..0f4e74f 100644
--- a/ld/scripttempl/epiphany_4x4.sc
+++ b/ld/scripttempl/epiphany_4x4.sc
@@ -626,9 +626,8 @@ if test -n "${NON_ALLOC_DYN}"; then
rm -f ldscripts/dyntmp.$$
fi
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/ft32.sc b/ld/scripttempl/ft32.sc
index e2d5a6b..e52e75c 100644
--- a/ld/scripttempl/ft32.sc
+++ b/ld/scripttempl/ft32.sc
@@ -60,14 +60,11 @@ SECTIONS
${RELOCATING+ __data_load_start = LOADADDR(.data); }
${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
+EOF
- .stab 0 ${RELOCATING+(NOLOAD)} :
- {
- *(.stab)
- }
- .stabstr 0 ${RELOCATING+(NOLOAD)} :
- {
- *(.stabstr)
- }
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
+
+cat <<EOF
}
EOF
diff --git a/ld/scripttempl/i386beos.sc b/ld/scripttempl/i386beos.sc
index 284fcb3..1a2422e 100644
--- a/ld/scripttempl/i386beos.sc
+++ b/ld/scripttempl/i386beos.sc
@@ -174,7 +174,7 @@ SECTIONS
}
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/i386go32.sc b/ld/scripttempl/i386go32.sc
index 49959af..9459f00 100644
--- a/ld/scripttempl/i386go32.sc
+++ b/ld/scripttempl/i386go32.sc
@@ -91,7 +91,7 @@ SECTIONS
.stabstr 0 : { *(.stabstr) }
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/ia64vms.sc b/ld/scripttempl/ia64vms.sc
index da37c39..4e0f4c0 100644
--- a/ld/scripttempl/ia64vms.sc
+++ b/ld/scripttempl/ia64vms.sc
@@ -122,7 +122,7 @@ SECTIONS
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
.note : { *(.vms.note) }
diff --git a/ld/scripttempl/ip2k.sc b/ld/scripttempl/ip2k.sc
index 89a2f16..0ce66ba 100644
--- a/ld/scripttempl/ip2k.sc
+++ b/ld/scripttempl/ip2k.sc
@@ -137,9 +137,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/iq2000.sc b/ld/scripttempl/iq2000.sc
index 44228e7..47bd777 100644
--- a/ld/scripttempl/iq2000.sc
+++ b/ld/scripttempl/iq2000.sc
@@ -408,9 +408,8 @@ cat <<EOF
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
diff --git a/ld/scripttempl/mep.sc b/ld/scripttempl/mep.sc
index 1a0252d..6b80c36 100644
--- a/ld/scripttempl/mep.sc
+++ b/ld/scripttempl/mep.sc
@@ -408,9 +408,8 @@ cat <<EOF
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${STACK_ADDR+${STACK}}
diff --git a/ld/scripttempl/misc-sections.sc b/ld/scripttempl/misc-sections.sc
index 115ef1a..6de910a 100644
--- a/ld/scripttempl/misc-sections.sc
+++ b/ld/scripttempl/misc-sections.sc
@@ -13,7 +13,7 @@ cat <<EOF
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
- .comment : { *(.comment); LINKER_VERSION; }
+ .comment 0 (INFO) : { *(.comment); LINKER_VERSION; }
.gnu.build.attributes : { *(.gnu.build.attributes${RELOCATING+ .gnu.build.attributes.*}) }
diff --git a/ld/scripttempl/mmo.sc b/ld/scripttempl/mmo.sc
index 823f258..746fb1a 100644
--- a/ld/scripttempl/mmo.sc
+++ b/ld/scripttempl/mmo.sc
@@ -128,7 +128,7 @@ SECTIONS
.stab.indexstr 0 : { *(.stab.indexstr) }
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
.MMIX.reg_contents :
diff --git a/ld/scripttempl/nds32elf.sc b/ld/scripttempl/nds32elf.sc
index b3acb01..9645e80 100644
--- a/ld/scripttempl/nds32elf.sc
+++ b/ld/scripttempl/nds32elf.sc
@@ -601,9 +601,8 @@ EOF
test -z "${NON_ALLOC_DYN}" || emit_dyn
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${ATTRS_SECTIONS}
diff --git a/ld/scripttempl/pru.sc b/ld/scripttempl/pru.sc
index a24005b..8531cb8 100644
--- a/ld/scripttempl/pru.sc
+++ b/ld/scripttempl/pru.sc
@@ -204,9 +204,8 @@ SECTIONS
.note.gnu.build-id ${RELOCATING-0} : { *(.note.gnu.build-id) }
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/v850.sc b/ld/scripttempl/v850.sc
index 515aeb1..3de6bdd 100644
--- a/ld/scripttempl/v850.sc
+++ b/ld/scripttempl/v850.sc
@@ -198,9 +198,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
/* User stack. */
diff --git a/ld/scripttempl/v850_rh850.sc b/ld/scripttempl/v850_rh850.sc
index a068893..2c70914 100644
--- a/ld/scripttempl/v850_rh850.sc
+++ b/ld/scripttempl/v850_rh850.sc
@@ -218,9 +218,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
/* User stack. */
diff --git a/ld/scripttempl/visium.sc b/ld/scripttempl/visium.sc
index def19ca..d11dafd 100644
--- a/ld/scripttempl/visium.sc
+++ b/ld/scripttempl/visium.sc
@@ -167,7 +167,7 @@ SECTIONS
EOF
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/scripttempl/xstormy16.sc b/ld/scripttempl/xstormy16.sc
index 2b3c051..ccae0a2 100644
--- a/ld/scripttempl/xstormy16.sc
+++ b/ld/scripttempl/xstormy16.sc
@@ -205,9 +205,8 @@ SECTIONS
EOF
-. $srcdir/scripttempl/misc-sections.sc
-
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
diff --git a/ld/scripttempl/z80.sc b/ld/scripttempl/z80.sc
index 75a6a4a..1ea8bee 100644
--- a/ld/scripttempl/z80.sc
+++ b/ld/scripttempl/z80.sc
@@ -51,8 +51,8 @@ SECTIONS
}
EOF
-. $srcdir/scripttempl/misc-sections.sc
-. $srcdir/scripttempl/DWARF.sc
+source_sh $srcdir/scripttempl/misc-sections.sc
+source_sh $srcdir/scripttempl/DWARF.sc
cat <<EOF
}
diff --git a/ld/testsuite/ld-scripts/ld-version-2.d b/ld/testsuite/ld-scripts/ld-version-2.d
index 7612349..c8738fd 100644
--- a/ld/testsuite/ld-scripts/ld-version-2.d
+++ b/ld/testsuite/ld-scripts/ld-version-2.d
@@ -2,7 +2,6 @@
# ld: --enable-linker-version -e 0
# readelf: -p.comment
# target: [is_elf_format]
-# skip: ft32-*-* pru-*-*
String dump of section '.comment':
.*GNU ld \(GNU Binutils\) 2.*