diff options
author | Alan Modra <amodra@bigpond.net.au> | 2005-06-01 00:30:26 +0000 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2005-06-01 10:00:26 +0930 |
commit | 7f970b709293482a5ce87bb4f01a765aae831a26 (patch) | |
tree | a43884596f7b3725ff1193f949aede640e008d89 /gcc/config/rs6000/sysv4.h | |
parent | d2348bd59174b5f3c5c492da6190f80c3f6d745b (diff) | |
download | gcc-7f970b709293482a5ce87bb4f01a765aae831a26.zip gcc-7f970b709293482a5ce87bb4f01a765aae831a26.tar.gz gcc-7f970b709293482a5ce87bb4f01a765aae831a26.tar.bz2 |
configure.ac: Add --enable-secureplt.
* configure.ac: Add --enable-secureplt.
(HAVE_AS_REL16): Test for R_PPC_REL16 relocs.
* config.in: Regenerate.
* configure: Regenerate.
* config.gcc (powerpc64-*-linux*, powerpc-*-linux*): Add
rs6000/secureplt.h to tm_file when enable_secureplt.
* doc/invoke.texi (msecure-plt, mbss-plt): Document.
* doc/install.texi: Document --enable-targets and --enable-secureplt.
Correct xrefs to "Using the GNU Compiler Collection (GCC)".
* config/rs6000/secureplt.h: New file.
* config/rs6000/sysv4.h (TARGET_SECURE_PLT): Define.
(SUBTARGET_OVERRIDE_OPTIONS): Error if -msecure-plt given without
assembler support.
(CC1_SECURE_PLT_DEFAULT_SPEC): Define.
(CC1_SPEC): Delete duplicate mno-sdata. Invoke cc1_secure_plt_default.
(SUBTARGET_EXTRA_SPECS): Add cc1_secure_plt_default.
* config/rs6000/sysv4.opt (msecure-plt, bss-plt): Add options.
* config/rs6000/rs6000.h (TARGET_SECURE_PLT): Define.
* config/rs6000/rs6000.c (rs6000_emit_load_toc_table): Handle
TARGET_SECURE_PLT got register load sequence.
(rs6000_emit_prologue): Call rs6000_emit_load_toc_table when
TARGET_SECURE_PLT.
(rs6000_elf_declare_function_name): Don't emit toc address offset
word when TARGET_SECURE_PLT.
* config/rs6000/rs6000.md (elf_high, elf_low): Move past load_toc_*.
(load_toc_v4_PIC_1) Enable for TARGET_SECURE_PLT.
(load_toc_v4_PIC_3b, load_toc_v4_PIC_3c): New insns.
(call, call_value): Mark pic_offset_table_rtx used for sysv pic and
TARGET_SECURE_PLT.
(call_nonlocal_sysv, call_value_nonlocal_sysv, sibcall_nonlocal_sysv,
sibcall_value_nonlocal_sysv): Add 32768 offset when TARGET_SECURE_PLT
and -fPIC.
* config/rs6000/tramp.asm (trampoline_initial): Use "bcl 20,31".
(__trampoline_setup): Likewise. Init r30 before plt call.
From-SVN: r100415
Diffstat (limited to 'gcc/config/rs6000/sysv4.h')
-rw-r--r-- | gcc/config/rs6000/sysv4.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index a8b06ae..ed5deb1 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -59,6 +59,11 @@ extern enum rs6000_sdata_type rs6000_sdata; #define TARGET_NO_TOC (! TARGET_TOC) #define TARGET_NO_EABI (! TARGET_EABI) +#ifdef HAVE_AS_REL16 +#undef TARGET_SECURE_PLT +#define TARGET_SECURE_PLT secure_plt +#endif + extern const char *rs6000_abi_name; extern const char *rs6000_sdata_name; extern const char *rs6000_tls_size_string; /* For -mtls-size= */ @@ -205,6 +210,11 @@ do { \ error ("-mcall-aixdesc must be big endian"); \ } \ \ + if (TARGET_SECURE_PLT != secure_plt) \ + { \ + error ("-msecure-plt not supported by your assembler"); \ + } \ + \ /* Treat -fPIC the same as -mrelocatable. */ \ if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX) \ target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC | MASK_NO_FP_IN_TOC; \ @@ -750,6 +760,10 @@ extern int fixuplabelno; #define CC1_ENDIAN_DEFAULT_SPEC "%(cc1_endian_big)" +#ifndef CC1_SECURE_PLT_DEFAULT_SPEC +#define CC1_SECURE_PLT_DEFAULT_SPEC "" +#endif + /* Pass -G xxx to the compiler and set correct endian mode. */ #define CC1_SPEC "%{G*} \ %{mlittle|mlittle-endian: %(cc1_endian_little); \ @@ -762,7 +776,6 @@ extern int fixuplabelno; mcall-gnu : -mbig %(cc1_endian_big); \ mcall-i960-old : -mlittle %(cc1_endian_little); \ : %(cc1_endian_default)} \ -%{mno-sdata: -msdata=none } \ %{meabi: %{!mcall-*: -mcall-sysv }} \ %{!meabi: %{!mno-eabi: \ %{mrelocatable: -meabi } \ @@ -774,6 +787,7 @@ extern int fixuplabelno; %{mcall-openbsd: -mno-eabi }}} \ %{msdata: -msdata=default} \ %{mno-sdata: -msdata=none} \ +%{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \ %{profile: -p}" /* Don't put -Y P,<path> for cross compilers. */ @@ -1214,6 +1228,7 @@ ncrtn.o%s" { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \ { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \ { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ |