i386: Replace PREINIT_FUNCTION@PLT with *%eax in call

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

	* sysdeps/i386/crti.S (_init): Replace PREINIT_FUNCTION@PLT
	with *%eax in call.

Acked-by: Christian Brauner (Ubuntu) <christian@brauner.io>
This commit is contained in:
H.J. Lu 2018-05-14 09:23:55 -07:00
parent 98ee36c7a4
commit a15529fda8
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/i386/crti.S (_init): Replace PREINIT_FUNCTION@PLT
with *%eax in call.
2018-05-14 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/i386/ldsodefs.h: Removed.

View File

@ -68,7 +68,7 @@ _init:
movl PREINIT_FUNCTION@GOT(%ebx), %eax
testl %eax, %eax
je .Lno_weak_fn
call PREINIT_FUNCTION@PLT
call *%eax
.Lno_weak_fn:
#else
call PREINIT_FUNCTION