]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
linux.h (STARTFILE_SPEC): Handle -pie.
authorKaz Kojima <kkojima@gcc.gnu.org>
Fri, 6 Jun 2003 03:41:38 +0000 (03:41 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Fri, 6 Jun 2003 03:41:38 +0000 (03:41 +0000)
* config/sh/linux.h (STARTFILE_SPEC): Handle -pie.  Simplify.
(ENDFILE_SPEC): Redefine to handle -pie.

From-SVN: r67527

gcc/ChangeLog
gcc/config/sh/linux.h

index bc34fec8a8d149581aef767360f38f70ce5e857e..417e59a5ac2139cc273620263a7d8cb6fbac2498 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-06  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/linux.h (STARTFILE_SPEC): Handle -pie.  Simplify.
+       (ENDFILE_SPEC): Redefine to handle -pie.
+
 2003-06-05  Phil Edwards <phil@jaj.com>
 
        * Makefile.in (qmtest-g++): Use target_alias, not target.
index 4fa432b8e2753982f5b86bbfc9790789270221f1..861cc5a420f5ca6fbf73b6ce281397d1e3b5b7b3 100644 (file)
@@ -88,12 +88,19 @@ do { \
 #endif
 
 #undef STARTFILE_SPEC
+#if defined HAVE_LD_PIE
 #define STARTFILE_SPEC \
-  "%{!shared: \
-     %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
-                      %{!p:%{profile:gcrt1.o%s} \
-                        %{!profile:crt1.o%s}}}} \
-   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+  "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#else
+#define STARTFILE_SPEC \
+  "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
+   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+#endif
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
 /* Output assembler code to STREAM to call the profiler.  */