From patchwork Mon Aug 15 12:37:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 659195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3sCZlp1Qbyz9t2x for ; Mon, 15 Aug 2016 22:38:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=ownH7UUs; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=x7lwx2KiEN5GSNimtvNJVrcbIij2Y 3wJX/43oW+5rAmXLrz0hSEvDSsXigWM5qlISJaHHNwRGzX/HHV6xq25F8auOOEGX bp9tKErpn/uWFSL4wIEHJCCHSYHLLJJouDg/q/E6TD6CCocf7Kh/4wSHh8A/uq+M frAMCC0qZfX3l8= 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:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=pd5gFVBVIlAPKJ4Lcp+1zthutAo=; b=own H7UUs3SUgrPCUrXDLq0xUzj5AVSjikxFgmPEew8OGh4NL66Wub7usQONfbVN0u+u gdHR6x8Ds/oyBXCCUAWBQxMWkSv6du2nH0c7lPyUYvCgO8JqG4ibzONDz6w2uoLC A0kSc4AVQexVM3IfV4wGrpG4GRhshxFSNqORtHKg= Received: (qmail 9314 invoked by alias); 15 Aug 2016 12:38:08 -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 9303 invoked by uid 89); 15 Aug 2016 12:38:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=BAYES_50, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=pic, ENTRY, PIC, Called X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] arm: mark __startcontext as .cantunwind X-Yow: Spreading peanut butter reminds me of opera!! I wonder why? Date: Mon, 15 Aug 2016 14:37:53 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 __startcontext marks the bottom of the call stack of the contexts created by makecontext. [BZ #20435] * sysdeps/unix/sysv/linux/arm/setcontext.S (__startcontext): Mark as .cantunwind. --- sysdeps/unix/sysv/linux/arm/setcontext.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S index 603e508..d1f168f 100644 --- a/sysdeps/unix/sysv/linux/arm/setcontext.S +++ b/sysdeps/unix/sysv/linux/arm/setcontext.S @@ -86,12 +86,19 @@ weak_alias(__setcontext, setcontext) /* Called when a makecontext() context returns. Start the context in R4 or fall through to exit(). */ + /* Unwind descriptors are looked up based on PC - 2, so we have to + make sure to mark the instruction preceding the __startcontext + label as .cantunwind. */ + .fnstart + .cantunwind + nop ENTRY(__startcontext) movs r0, r4 bne PLTJMP(__setcontext) @ New context was 0 - exit b PLTJMP(HIDDEN_JUMPTARGET(exit)) + .fnend END(__startcontext) #ifdef PIC