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: "H.J. Lu" X-Patchwork-Id: 912412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-92480-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="AdKVr2oG"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40jntf1zS2z9s15 for ; Sat, 12 May 2018 23:31:54 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; q=dns; s=default; b=u8IiH4b+g9z5PIzr /bZVWUwh63m5fo7xzR/yV0CF1eSn4cc4WduBgst7KwdeMspsCNnrUIw9FM3aQnUd nDHFjJmh6Nd0hIaMiMcRGVVB5/NqKPcLzyncbovSUXDyBnt9Kqdy4w0q9fV0FkZZ DUC0bvBMWEPl9eS4JktqZl1oP5s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :mime-version:content-type; s=default; bh=At2ZzLfW19p6ob5rEZoemZ AHLfU=; b=AdKVr2oGMHOvnO4090I1T17N+QvGAYE3zl3gqorKIPTXTLw3AjLsYF MJs3VOZGZbwL2IEtWflGa6TFrM7bR+ld0g5ARsaGErZxKVKf3trRelecKfJGqGcK PbTtuFLAZAehuhMOczstesnViHjGV7lZ2xEGKmNYGOV85sEecUUAo= 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