diff options
author | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2005-07-08 10:00:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2005-07-08 10:00:15 +0000 |
commit | 29f9d52d10a453b3f2c2b6057827ae18b8ae0e0f (patch) | |
tree | 80b5b73384b26ecd7939a41fa6b6d46c1b75b53a /gcc | |
parent | ce82daed2b93fdb8088635865bc197231ed94ba2 (diff) | |
download | gcc-29f9d52d10a453b3f2c2b6057827ae18b8ae0e0f.zip gcc-29f9d52d10a453b3f2c2b6057827ae18b8ae0e0f.tar.gz gcc-29f9d52d10a453b3f2c2b6057827ae18b8ae0e0f.tar.bz2 |
linux.h (STARTFILE_SPEC): Support PIE.
* config/m32r/linux.h (STARTFILE_SPEC): Support PIE.
(ENDFILE_SPEC): Likewise.
* config/m32r/m32r.h (ASM_SPEC): Likewise.
From-SVN: r101757
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/m32r/linux.h | 8 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.h | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f049416..d8ac67a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/m32r/linux.h b/gcc/config/m32r/linux.h index 6da0e7f..c338ed6 100644 --- a/gcc/config/m32r/linux.h +++ b/gcc/config/m32r/linux.h @@ -85,14 +85,20 @@ %{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 "\ diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h index ca6e86f..4b85a42 100644 --- a/gcc/config/m32r/m32r.h +++ b/gcc/config/m32r/m32r.h @@ -183,7 +183,7 @@ /* 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)" |