]> git.ipfire.org Git - thirdparty/gcc.git/commit
2015-06-04 Sriraman Tallam <tmsriram@google.com>
authortmsriram <tmsriram@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Jun 2015 21:14:10 +0000 (21:14 +0000)
committertmsriram <tmsriram@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Jun 2015 21:14:10 +0000 (21:14 +0000)
commit4641882f2e4634b56893c438f34b12fb0f3d2ede
tree6b25a7412ce088321aa5a46c7d80ebb9b7e8b619
parent8fa3561113f8432706fc5426408fe7b63ad17eca
2015-06-04  Sriraman Tallam  <tmsriram@google.com>

* c-family/c-common.c (noplt): New attribute.
(handle_noplt_attribute): New handler.
* calls.c (prepare_call_address): Check for noplt
attribute.
* config/i386/i386.c (ix86_expand_call): Check
for noplt attribute.
(ix86_nopic_noplt_attribute_p): New function.
(ix86_output_call_insn): Output indirect call for non-pic
no plt calls.
* doc/extend.texi (noplt): Document new attribute.
* doc/invoke.texi: Document new attribute.
* testsuite/gcc.target/i386/noplt-1.c: New test.
* testsuite/gcc.target/i386/noplt-2.c: New test.
* testsuite/gcc.target/i386/noplt-3.c: New test.
* testsuite/gcc.target/i386/noplt-4.c: New test.

This patch does two things:

* Adds new generic function attribute "noplt" that is similar in functionality
  to -fno-plt except that it applies only to calls to functions that are marked
  with this attribute.
* For x86_64, it makes -fno-plt(and the attribute) also work for non-PIC code by
  directly generating an indirect call via a GOT entry.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224138 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-family/c-common.c
gcc/calls.c
gcc/config/i386/i386.c
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/noplt-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/noplt-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/noplt-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/noplt-4.c [new file with mode: 0644]