This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] i386: Replace PREINIT_FUNCTION@PLT with *%eax in call
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 12 May 2018 06:31:45 -0700
- Subject: [PATCH] i386: Replace PREINIT_FUNCTION@PLT with *%eax in call
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Since we have loaded address of PREINIT_FUNCTION into %eax, we can
avoid extra branch to PLT slot.
Any comments?
H.J.
---
* sysdeps/i386/crti.S (_init): Replace PREINIT_FUNCTION@PLT
with *%eax in call.
---
sysdeps/i386/crti.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/i386/crti.S b/sysdeps/i386/crti.S
index c0422f9ce3..065460b813 100644
--- a/sysdeps/i386/crti.S
+++ b/sysdeps/i386/crti.S
@@ -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
--
2.17.0