Index: c/src/lib/libbsp/bfin/TLL6527M/bsp_specs
===================================================================
--- c/src/lib/libbsp/bfin/TLL6527M/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/bfin/TLL6527M/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
Index: c/src/lib/libbsp/bfin/bf537Stamp/bsp_specs
===================================================================
--- c/src/lib/libbsp/bfin/bf537Stamp/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/bfin/bf537Stamp/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
Index: c/src/lib/libbsp/bfin/eZKit533/bsp_specs
===================================================================
--- c/src/lib/libbsp/bfin/eZKit533/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/bfin/eZKit533/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
Index: c/src/lib/libbsp/epiphany/epiphany_sim/bsp_specs
===================================================================
--- c/src/lib/libbsp/epiphany/epiphany_sim/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/epiphany/epiphany_sim/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
Index: c/src/lib/libbsp/i386/pc386/bsp_specs
===================================================================
--- c/src/lib/libbsp/i386/pc386/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/i386/pc386/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -2,4 +2,7 @@
 %rename startfile old_startfile
 %rename link old_link
+
+*endfile:
+crtend.o%s crtn.o%s
 
 *startfile:
@@ -9,5 +12,2 @@
 *link:
 %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
-
-*endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
Index: c/src/lib/libbsp/m32c/m32cbsp/bsp_specs
===================================================================
--- c/src/lib/libbsp/m32c/m32cbsp/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/m32c/m32cbsp/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -7,7 +7,9 @@
 %{!nostdlib: %{qrtems: start.o%s crtbegin.o%s -e _start}}
 
+*endfile:
+%{!qrtems: %(old_endfile)} \
+%{!nostdlib: %{qrtems: crtend.o%s}}
+
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
+%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
 
-*endfile:
-%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s}}
Index: c/src/lib/libbsp/mips/hurricane/bsp_specs
===================================================================
--- c/src/lib/libbsp/mips/hurricane/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/mips/hurricane/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -4,6 +4,6 @@
 
 *startfile:
-%{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
+%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: \
+start.o%s crti.o%s crtbegin.o%s -e start}}
 
 *link:
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s }
Index: c/src/lib/libbsp/moxie/moxiesim/bsp_specs
===================================================================
--- c/src/lib/libbsp/moxie/moxiesim/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/moxie/moxiesim/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -8,6 +8,4 @@
 
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
+%(old_link) %{!qrtems: %(old_link)} %{qrtems: crtend.o%s -dc -dp -N}
 
-*endfile:
-%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s}}
Index: c/src/lib/libbsp/nios2/nios2_iss/bsp_specs
===================================================================
--- c/src/lib/libbsp/nios2/nios2_iss/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/nios2/nios2_iss/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtnn.o%s}
Index: c/src/lib/libbsp/or1k/generic_or1k/bsp_specs
===================================================================
--- c/src/lib/libbsp/or1k/generic_or1k/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/or1k/generic_or1k/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
Index: c/src/lib/libbsp/powerpc/beatnik/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/beatnik/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/beatnik/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -7,7 +7,7 @@
 %{!nostdlib: %{qrtems:  ecrti%O%s rtems_crti%O%s crtbegin.o%s -e __rtems_entry_point -u __vectors motld_start.o%s}}
 
+*link:
+%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
Index: c/src/lib/libbsp/powerpc/gen83xx/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/gen83xx/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/gen83xx/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -5,5 +5,5 @@
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s  crtbegin.o%s start.o%s}}
 
 *endfile:
@@ -11,4 +11,4 @@
 
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors}
+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N}
 
Index: c/src/lib/libbsp/powerpc/haleakala/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/haleakala/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/haleakala/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -4,5 +4,5 @@
 
 *startfile:
-%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
+%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems:  ecrti%O%s rtems_crti%O%s  crtbegin.o%s}}
 
 *endfile:
@@ -10,4 +10,4 @@
 
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors -u download_entry}
+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -u download_entry -N }
 
Index: c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/motorola_powerpc/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -8,7 +8,7 @@
   vectors_entry%O%s start.o%s -e __rtems_entry_point -u __vectors}}
 
+*link:
+%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
Index: c/src/lib/libbsp/powerpc/mvme3100/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/mvme3100/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/mvme3100/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -7,7 +7,7 @@
 %{!nostdlib: %{qrtems:  ecrti%O%s rtems_crti%O%s crtbegin.o%s -e __rtems_entry_point -u __vectors motld_start.o%s}}
 
+*link:
+%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
Index: c/src/lib/libbsp/powerpc/mvme5500/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/mvme5500/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/mvme5500/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -7,7 +7,7 @@
 %{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s -e __rtems_entry_point -u __vectors mvme5500start.o%s}}
 
+*link:
+%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
Index: c/src/lib/libbsp/powerpc/psim/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/psim/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/psim/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -8,7 +8,7 @@
     start.o%s -e _start -u __vectors}}
 
+*link:
+%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
Index: c/src/lib/libbsp/powerpc/qemuppc/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/qemuppc/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/qemuppc/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -8,7 +8,7 @@
     start.o%s -e _start -u __vectors}}
 
+*link:
+%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
+
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
Index: c/src/lib/libbsp/powerpc/qoriq/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/qoriq/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/qoriq/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -5,5 +5,5 @@
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s  crtbegin.o%s start.o%s}}
 
 *endfile:
@@ -11,3 +11,4 @@
 
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors %(link_os)}
+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N %(link_os)}
+
Index: c/src/lib/libbsp/powerpc/virtex/bsp_specs
===================================================================
--- c/src/lib/libbsp/powerpc/virtex/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/powerpc/virtex/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,4 @@
 
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors}
+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N}
+
Index: c/src/lib/libbsp/riscv/riscv_generic/bsp_specs
===================================================================
--- c/src/lib/libbsp/riscv/riscv_generic/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/riscv/riscv_generic/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -11,3 +11,3 @@
 
 *endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
+%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
Index: c/src/lib/libbsp/sparc/erc32/bsp_specs
===================================================================
--- c/src/lib/libbsp/sparc/erc32/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/sparc/erc32/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -2,4 +2,7 @@
 %rename startfile old_startfile
 %rename link old_link
+
+*endfile:
+%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
 
 *startfile:
@@ -9,5 +12,2 @@
 *link:
 %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
-
-*endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
Index: c/src/lib/libbsp/sparc/leon2/bsp_specs
===================================================================
--- c/src/lib/libbsp/sparc/leon2/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/sparc/leon2/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -2,4 +2,7 @@
 %rename startfile old_startfile
 %rename link old_link
+
+*endfile:
+crtend.o%s crtn.o%s
 
 *startfile:
@@ -9,5 +12,2 @@
 *link:
 %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
-
-*endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
Index: c/src/lib/libbsp/sparc/leon3/bsp_specs
===================================================================
--- c/src/lib/libbsp/sparc/leon3/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/sparc/leon3/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -2,4 +2,7 @@
 %rename startfile old_startfile
 %rename link old_link
+
+*endfile:
+crtend.o%s crtn.o%s
 
 *startfile:
@@ -9,5 +12,2 @@
 *link:
 %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
-
-*endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
Index: c/src/lib/libbsp/sparc64/niagara/bsp_specs
===================================================================
--- c/src/lib/libbsp/sparc64/niagara/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/sparc64/niagara/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -5,9 +5,11 @@
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
+%{!nostdlib: %{qrtems: start.o%s crtbegin.o%s -e _start}}
+
+*endfile:
+%{!qrtems: %(old_endfile)} \
+%{!nostdlib: %{qrtems: crtend.o%s}}
 
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
+%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
 
-*endfile:
-%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s crtn.o%s}}
Index: c/src/lib/libbsp/sparc64/usiii/bsp_specs
===================================================================
--- c/src/lib/libbsp/sparc64/usiii/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/sparc64/usiii/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -5,9 +5,11 @@
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
+%{!nostdlib: %{qrtems: start.o%s crtbegin.o%s -e _start}}
+
+*endfile:
+%{!qrtems: %(old_endfile)} \
+%{!nostdlib: %{qrtems: crtend.o%s}}
 
 *link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
+%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
 
-*endfile:
-%{!qrtems: %(old_endfile)} %{!nostdlib: %{qrtems: crtend.o%s crtn.o%s}}
Index: c/src/lib/libbsp/v850/gdbv850sim/bsp_specs
===================================================================
--- c/src/lib/libbsp/v850/gdbv850sim/bsp_specs	(revision d9769c96cf8370a5231fe8590c36d3706f828565)
+++ c/src/lib/libbsp/v850/gdbv850sim/bsp_specs	(revision 229286564305645fdf37686495cde7f55d823f03)
@@ -7,7 +7,9 @@
 %{!nostdlib: %{qrtems: start.o%s -e _start}}
 
+*endfile:
+%{!qrtems: %(old_endfile)} %{qrtems: %(old_endfile)} \
+%{!nostdlib: %{qrtems:}}
+
 *link:
-%{!qrtems: %(old_link)} %{qrtems: %(old_link)}
+%(old_link) %{!qrtems: %(old_link)} %{qrtems: %(old_link)}
 
-*endfile:
-%{!qrtems: %(old_endfile)} %{qrtems: %(old_link)}
