From patchwork Wed May 18 18:00:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 12350 Received: (qmail 78954 invoked by alias); 18 May 2016 18:01:02 -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 78934 invoked by uid 89); 18 May 2016 18:01:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=PLT X-HELO: mail-qg0-f67.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=3Yg0o5WIVO7KYIo0CA8unEYHBCuBgPnwCYd/IH5aM20=; b=FdfyEWMFdwebmYccgxHLURbx/KWI5KR4khkV5pIcR5ZZFE2YA2LlE9xqVkDnlTNoGO CWOICCGoBKTIM0PWIy0u4UuHS5wwJL6/U8LtlLfNrsUVh9iPbbounaIWlZwJNrnf5Jbn lhHJqYRlPbllRR1LrVmIV9VFrOJKwzPUI2ThnkgtEZ5YuxooaNwOtZLDCjUX1ABY/P6C q43v+x/R7rVfnS+rCSG5y0UfhngG+bbSmY2JD1xUnGQHKAVsi7e8RYgKWI2kItdk8vUy q2+QppTuIrphhyl05TR3HTdCgwI7ED4I63wGbE5dsyOZaDBUN3C2f1rpH+V4Sa/6WKJA G1Gw== X-Gm-Message-State: AOPr4FWE6qg4ou5CNzMAWJgI76lGyk4rUUbN1GHrGklz7TyeNAaAG8p8d924ZHWblqQkHTzK37x4oie0xPsQdQ== MIME-Version: 1.0 X-Received: by 10.140.152.16 with SMTP id 16mr9327714qhy.77.1463594450134; Wed, 18 May 2016 11:00:50 -0700 (PDT) In-Reply-To: <20160504175417.GA22590@intel.com> References: <20160504175417.GA22590@intel.com> Date: Wed, 18 May 2016 11:00:49 -0700 Message-ID: Subject: Re: [PATCH] Don't call internal __pthread_unwind via PLT From: "H.J. Lu" To: GNU C Library On Wed, May 4, 2016 at 10:54 AM, H.J. Lu wrote: > There is no need to call the internal funtion, __GI___pthread_unwind, > in x86-64 cancellation.S. > > Tested on x86-64. OK for master? > > H.J. > --- > * sysdeps/unix/sysv/linux/x86_64/cancellation.S (JUMPTARGET): New > if __pthread_unwind defined to __GI___pthread_unwind. I am going to check in this updated patch. From 5fe984ca739b566ffa7982005927b2ddc7925a87 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 4 May 2016 10:46:18 -0700 Subject: [PATCH] Don't call internal __pthread_unwind via PLT Add PTHREAD_UNWIND to replace JUMPTARGET(__pthread_unwind) and define it to __GI___pthread_unwind within libpthread. * sysdeps/unix/sysv/linux/x86_64/cancellation.S (PTHREAD_UNWIND): New (__pthread_unwind): Renamed to ... (PTHREAD_UNWIND): This. (__pthread_enable_asynccancel): Replace JUMPTARGET(__pthread_unwind) with PTHREAD_UNWIND. --- sysdeps/unix/sysv/linux/x86_64/cancellation.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/x86_64/cancellation.S b/sysdeps/unix/sysv/linux/x86_64/cancellation.S index 04a0e59..bd22aa0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/cancellation.S +++ b/sysdeps/unix/sysv/linux/x86_64/cancellation.S @@ -21,9 +21,11 @@ #include #include "lowlevellock.h" +#define PTHREAD_UNWIND JUMPTARGET(__pthread_unwind) #if IS_IN (libpthread) # if defined SHARED && !defined NO_HIDDEN -# define __pthread_unwind __GI___pthread_unwind +# undef PTHREAD_UNWIND +# define PTHREAD_UNWIND __GI___pthread_unwind # endif #else # ifndef SHARED @@ -76,7 +78,7 @@ ENTRY(__pthread_enable_asynccancel) lock orl $TCB_EXITING_BITMASK, %fs:CANCELHANDLING mov %fs:CLEANUP_JMP_BUF, %RDI_LP - call JUMPTARGET(__pthread_unwind) + call PTHREAD_UNWIND hlt END(__pthread_enable_asynccancel) -- 2.5.5