+2002-09-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * netbsd-aout.h (NETBSD_LINK_SPEC_AOUT): New, takes old definition of
+ LINK_SPEC.
+ (LINK_SPEC): Define to NETBSD_LINK_SPEC_AOUT.
+ * arm/netbsd.h (SUBTARGET_EXTRA_SEPCS): Add NETBSD_LINK_SPEC_AOUT.
+ (LINK_SPEC): Rework to use NETBSD_LINK_SPEC_AOUT).
+
2002-09-21 Richard Earnshaw <rearnsha@arm.com>
PR opt/7930
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
- { "netbsd_cpp_spec", NETBSD_CPP_SPEC },
+ { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \
+ { "netbsd_link_spec", NETBSD_LINK_SPEC_AOUT },
#undef CPP_SPEC
#define CPP_SPEC "\
/* Pass -X to the linker so that it will strip symbols starting with 'L' */
#undef LINK_SPEC
-#define LINK_SPEC "\
--X %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} \
-%{static:-Bstatic}} %{shared} %{assert*} \
-"
+#define LINK_SPEC "-X %(netbsd_link_spec)"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
/* Provide a LINK_SPEC appropriate for NetBSD a.out. Here we provide
support for the special GCC options -static, -assert, and -nostdlib. */
-#undef LINK_SPEC
-#define LINK_SPEC \
+#undef NETBSD_LINK_SPEC_AOUT
+#define NETBSD_LINK_SPEC_AOUT \
"%{nostdlib:-nostdlib} \
%{!shared: \
%{!nostdlib: \
%{R*} \
%{assert*}"
+/* Default LINK_SPEC. */
+#undef LINK_SPEC
+#define LINK_SPEC NETBSD_LINK_SPEC_AOUT
/* Some imports from svr4.h in support of shared libraries. */