From 16b23e03632623cd81a21fc5a24db546595addac Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 4 Mar 2016 15:36:18 -0800 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ sysdeps/x86_64/crti.S | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index af555291a9..f5b8d1e552 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-03-04 H.J. Lu + + [BZ #19745] + * sysdeps/x86_64/crti.S (_init): Replace PREINIT_FUNCTION@PLT + with *%rax in call. + 2016-03-04 H.J. Lu [BZ #19745] diff --git a/sysdeps/x86_64/crti.S b/sysdeps/x86_64/crti.S index a34525974a..e9d86ed08a 100644 --- a/sysdeps/x86_64/crti.S +++ b/sysdeps/x86_64/crti.S @@ -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