]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
i386: Replace PREINIT_FUNCTION@PLT with *%eax in call
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 14 May 2018 16:23:55 +0000 (09:23 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 14 May 2018 16:24:06 +0000 (09:24 -0700)
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>
ChangeLog
sysdeps/i386/crti.S

index 1db9747b3a22ba5301837901d54d652fd4ee08f1..46114b4187d4ca4770237c9ed85c0efeda23f538 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index c0422f9ce3382f90965b5fd6ea98403a928c943b..065460b813253561de247d9f5aaf90d6fa79715d 100644 (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