i386: Load external function address via GOT slot
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 22 Jan 2019 14:53:41 +0000 (14:53 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 22 Jan 2019 14:53:41 +0000 (06:53 -0800)
commit12f154688d9e942614d49178dee92b766afb64bb
treeedc5ed79863d994cd35b293ee30303d2db1928e4
parent44a7251e1e97caf3b2315f20d48519ff8fced152
i386: Load external function address via GOT slot

With noplt attribute, we load the external function address via the GOT
slot so that linker won't create an PLT entry for extern function address.

gcc/

PR target/88954
* config/i386/i386.c (ix86_force_load_from_GOT_p): Also check
noplt attribute.

gcc/testsuite/

PR target/88954
* gcc.target/i386/pr88954-1.c: New test.
* gcc.target/i386/pr88954-2.c: Likewise.

From-SVN: r268152
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr88954-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr88954-2.c [new file with mode: 0644]