From 25119b21dcf803317093d30bf27e77ea4aa1b75a Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Fri, 6 Jun 2003 03:41:38 +0000 Subject: [PATCH] linux.h (STARTFILE_SPEC): Handle -pie. * config/sh/linux.h (STARTFILE_SPEC): Handle -pie. Simplify. (ENDFILE_SPEC): Redefine to handle -pie. From-SVN: r67527 --- gcc/ChangeLog | 5 +++++ gcc/config/sh/linux.h | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc34fec8a8d..417e59a5ac2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-06-06 Kaz Kojima + + * config/sh/linux.h (STARTFILE_SPEC): Handle -pie. Simplify. + (ENDFILE_SPEC): Redefine to handle -pie. + 2003-06-05 Phil Edwards * Makefile.in (qmtest-g++): Use target_alias, not target. diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index 4fa432b8e27..861cc5a420f 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -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. */ -- 2.30.2