diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-08-28 19:14:49 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-04-22 08:07:18 -0700 |
commit | 76271b17ab85f7d40934ba318f9da9d0d18026ea (patch) | |
tree | d2fbb2c4e178aa63580df92d7a433e3832854e89 /ltgcc.m4 | |
parent | c052a8d50027bdbf0e25570eb77bd75aaec399e1 (diff) | |
download | gcc-hjl/pr67400/64-bit.tar.gz |
Load external function address via GOT slothjl/pr67400/64-bit
For -fno-plt, 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/pr67400
* config/i386/i386-protos.h (ix86_force_load_from_GOT_p): New.
* config/i386/i386.c (ix86_force_load_from_GOT_p): New function.
(ix86_legitimate_address_p): Allow UNSPEC_GOTPCREL if
ix86_force_load_from_GOT_p returns true.
(ix86_print_operand_address): Support UNSPEC_GOTPCREL if
ix86_force_load_from_GOT_p returns true.
(ix86_expand_move): Load the external function address via the
GOT slot if ix86_force_load_from_GOT_p returns true.
* config/i386/predicates.md (x86_64_immediate_operand): Return
false if ix86_force_load_from_GOT_p returns true.
gcc/testsuite/
PR target/pr67400
* gcc.target/i386/pr67400-1.c: New test.
* gcc.target/i386/pr67400-2.c: Likewise.
* gcc.target/i386/pr67400-3.c: Likewise.
* gcc.target/i386/pr67400-4.c: Likewise.
Diffstat (limited to 'ltgcc.m4')
0 files changed, 0 insertions, 0 deletions