From a15529fda8d132621328c3fe32997a3d9c55aef4 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 14 May 2018 09:23:55 -0700 Subject: [PATCH] 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) --- ChangeLog | 5 +++++ sysdeps/i386/crti.S | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1db9747..46114b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2018-05-14 H.J. Lu + * sysdeps/i386/crti.S (_init): Replace PREINIT_FUNCTION@PLT + with *%eax in call. + +2018-05-14 H.J. Lu + * sysdeps/i386/ldsodefs.h: Removed. * sysdeps/x86_64/ldsodefs.h: Moved to ... * sysdeps/x86/ldsodefs.h: This. diff --git a/sysdeps/i386/crti.S b/sysdeps/i386/crti.S index c0422f9..065460b 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.7.4