diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2015-05-11 16:20:57 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2015-05-11 16:20:57 +0300 |
commit | b91fd3c76ac503f11d94ff00fd9399e949735148 (patch) | |
tree | 532861d0edff899e1bd9fe5d71d6a207bb11a98a /gcc/calls.c | |
parent | 9e4b3dd6bcbbd4cac2d461cef58fc912de8c33cd (diff) | |
download | gcc-b91fd3c76ac503f11d94ff00fd9399e949735148.zip gcc-b91fd3c76ac503f11d94ff00fd9399e949735148.tar.gz gcc-b91fd3c76ac503f11d94ff00fd9399e949735148.tar.bz2 |
calls.c (prepare_call_address): Transform PLT call to GOT lookup and indirect call by forcing address into a...
* calls.c (prepare_call_address): Transform PLT call to GOT lookup and
indirect call by forcing address into a pseudo with -fno-plt.
* common.opt (flag_plt): New option.
* doc/invoke.texi (Code Generation Options): Add -fno-plt.
([-fno-plt]): Document.
From-SVN: r223003
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index aaac1ad..51b896e 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_type, rtx funexp, rtx static_chain_value, && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) : memory_address (FUNCTION_MODE, funexp)); + else if (flag_pic && !flag_plt && fndecl_or_type + && TREE_CODE (fndecl_or_type) == FUNCTION_DECL + && !targetm.binds_local_p (fndecl_or_type)) + { + funexp = force_reg (Pmode, funexp); + } else if (! sibcallp) { if (!NO_FUNCTION_CSE && optimize && ! flag_no_function_cse) |