Replace PREINIT_FUNCTION@PLT with *%rax in call

Since we have loaded address of PREINIT_FUNCTION into %rax, we can
avoid extra branch to PLT slot.

	[BZ #19745]
	* sysdeps/x86_64/crti.S (_init): Replace PREINIT_FUNCTION@PLT
	with *%rax in call.
This commit is contained in:
H.J. Lu 2016-03-04 15:36:18 -08:00
parent 21683b5a7d
commit 16b23e0363
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
[BZ #19745]
* sysdeps/x86_64/crti.S (_init): Replace PREINIT_FUNCTION@PLT
with *%rax in call.
2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
[BZ #19745]

View File

@ -66,7 +66,7 @@ _init:
movq PREINIT_FUNCTION@GOTPCREL(%rip), %rax
testq %rax, %rax
je .Lno_weak_fn
call PREINIT_FUNCTION@PLT
call *%rax
.Lno_weak_fn:
#else
call PREINIT_FUNCTION