mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
X86_64: Don't use PLT nor GOT in static archives [BZ #20750]
There is no need to use PLT nor GOT in static archives to branch to a function, regardless whether static archives is compiled with PIC or not. When static archives are used to create dynamic executable, PLT/GOT may be used. The resulting executable still works correctly. [BZ #20750] * sysdeps/x86_64/sysdep.h (JUMPTARGET): Check SHARED instead of PIC.
This commit is contained in:
parent
389d1f1b23
commit
c9070e6305
@ -1,3 +1,9 @@
|
||||
2016-11-28 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #20750]
|
||||
* sysdeps/x86_64/sysdep.h (JUMPTARGET): Check SHARED instead
|
||||
of PIC.
|
||||
|
||||
2016-11-28 Andrew Pinski <andrew.pinski@caviumnetworks.com>
|
||||
Yury Norov <ynorov@caviumnetworks.com>
|
||||
Steve Ellcey <sellcey@caviumnetworks.com>
|
||||
|
@ -89,13 +89,14 @@ lose: \
|
||||
END (name)
|
||||
|
||||
#undef JUMPTARGET
|
||||
#ifdef PIC
|
||||
#ifdef SHARED
|
||||
# ifdef BIND_NOW
|
||||
# define JUMPTARGET(name) *name##@GOTPCREL(%rip)
|
||||
# else
|
||||
# define JUMPTARGET(name) name##@PLT
|
||||
# endif
|
||||
#else
|
||||
/* For static archives, branch to target directly. */
|
||||
# define JUMPTARGET(name) name
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user