From patchwork Sat May 12 13:31:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 27254 Received: (qmail 128873 invoked by alias); 12 May 2018 13:31:48 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 128860 invoked by uid 89); 12 May 2018 13:31:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM autolearn=ham version=3.3.2 spammy=ebx X-HELO: mga02.intel.com X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False X-ExtLoop1: 1 Date: Sat, 12 May 2018 06:31:45 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] i386: Replace PREINIT_FUNCTION@PLT with *%eax in call Message-ID: <20180512133145.GA30506@gmail.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.5 (2018-04-13) Since we have loaded address of PREINIT_FUNCTION into %eax, we can avoid extra branch to PLT slot. Any comments? H.J. Acked-by: Christian Brauner (Ubuntu) --- * 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