linux.h (STARTFILE_SPEC): Support PIE.
authorKazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Fri, 8 Jul 2005 10:00:15 +0000 (10:00 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Fri, 8 Jul 2005 10:00:15 +0000 (10:00 +0000)
* config/m32r/linux.h (STARTFILE_SPEC): Support PIE.
  (ENDFILE_SPEC): Likewise.
* config/m32r/m32r.h (ASM_SPEC): Likewise.

From-SVN: r101757

gcc/ChangeLog
gcc/config/m32r/linux.h
gcc/config/m32r/m32r.h

index f0494163eed7a682da07e3ad1b6e38317630d0ab..d8ac67a19305ac96b56092ca5dacc81011e99341 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-08  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+       * config/m32r/linux.h (STARTFILE_SPEC): Support PIE.
+       (ENDFILE_SPEC): Likewise.
+       * config/m32r/m32r.h (ASM_SPEC): Likewise.
+
 2005-07-08  David Billinghurst  <David.Billinghurst@riotinto.com>
 
        * final.c: Include sdbout.h when required.
index 6da0e7fbdaeecd74ef731469ebb6479d7b081131..c338ed6d592b882341084e8e05bf35c5e51651da 100644 (file)
     %{profile:-lc_p} %{!profile: -lc}}"
 
 #undef  STARTFILE_SPEC
+#if defined HAVE_LD_PIE
+#define STARTFILE_SPEC \
+  "%{!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:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+#endif
 
 #undef  ENDFILE_SPEC
 #define ENDFILE_SPEC \
-  "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+  "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
 
 #undef  SUBTARGET_CPP_SPEC
 #define SUBTARGET_CPP_SPEC "\
index ca6e86f53a7a66a4f3690f4440bcdbaab337a980..4b85a4264063820bd5ef31b8a425037627713918 100644 (file)
 
 /* Options to pass on to the assembler.  */
 #undef  ASM_SPEC
-#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic:-K PIC} %{fPIC:-K PIC}"
+#define ASM_SPEC "%{v} %(asm_cpu) %(relax) %{fpic|fpie:-K PIC} %{fPIC|fPIE:-K PIC}"
 
 #define LINK_SPEC "%{v} %(link_cpu) %(relax)"