From patchwork Thu Aug 29 19:17:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 19618 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7EDC125E4D for ; Thu, 29 Aug 2013 19:17:40 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id hu16sf1356624qab.10 for ; Thu, 29 Aug 2013 12:17:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:cc:subject:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=lJYJWU5uHrpdI/VrSRM7EImB+wskchJoThaJKHiXreo=; b=QFWI0bJ0VMiZb3D9AnifTqAR9je7WVMza9oU6MOdYrP4bep1iMvNec79QxRZynJ22k WtAgdT4Qf3cv/KgqPRXbp/knsLeMQ6t46hHk/xsXeRyu+E2STHUhQbL1bQ28Gp2aB2hK Sem/z8gGaw5PfatNXUNkurFW5PrB87HIOH0k3IJvWxuvKyZ3h/JRLQiWTEu2zqTfmt52 roMpTKI9+/mS6Py9slKKLnJpkCYCI6S/cb+VNrfkF2WIO9n/pbRqqPay4e8PBTSeZMmj 2oL/ojIgbMpACG+B8zLOmoGTwKdDZ7bJ+ZzWAe8ss2NzXLZuXLEFvVqduMJqHB8hAMUP WjzQ== X-Received: by 10.236.223.130 with SMTP id v2mr1749253yhp.34.1377803860126; Thu, 29 Aug 2013 12:17:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.29.102 with SMTP id j6ls807552qeh.93.gmail; Thu, 29 Aug 2013 12:17:40 -0700 (PDT) X-Received: by 10.58.137.167 with SMTP id qj7mr4391946veb.1.1377803859898; Thu, 29 Aug 2013 12:17:39 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id mq14si1474789vcb.56.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 12:17:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id m17so647866vca.3 for ; Thu, 29 Aug 2013 12:17:39 -0700 (PDT) X-Gm-Message-State: ALoCoQn3E0c9TBAxiCFszWToe/eLrgAdKxAv0M8SDKIO4pNRNVPUEI7wusyu1o6o5qqvs+VH/5/w X-Received: by 10.52.249.50 with SMTP id yr18mr2713718vdc.25.1377803859707; Thu, 29 Aug 2013 12:17:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp41693vcz; Thu, 29 Aug 2013 12:17:39 -0700 (PDT) X-Received: by 10.15.27.133 with SMTP id p5mr5549084eeu.65.1377803858492; Thu, 29 Aug 2013 12:17:38 -0700 (PDT) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by mx.google.com with ESMTPS id q8si4861419eem.180.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 12:17:38 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.53 is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=74.125.83.53; Received: by mail-ee0-f53.google.com with SMTP id b15so457500eek.12 for ; Thu, 29 Aug 2013 12:17:38 -0700 (PDT) X-Received: by 10.14.184.3 with SMTP id r3mr6352887eem.49.1377803857896; Thu, 29 Aug 2013 12:17:37 -0700 (PDT) Received: from localhost.localdomain (cpc6-seac21-2-0-cust453.7-2.cable.virginmedia.com. [82.1.113.198]) by mx.google.com with ESMTPSA id m54sm48586799eex.2.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Aug 2013 12:17:36 -0700 (PDT) Message-ID: <521F9E4E.5040906@linaro.org> Date: Thu, 29 Aug 2013 20:17:34 +0100 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: libc-ports@sourceware.org CC: patches@linaro.org Subject: [PATCH] ARM: Fix clone code when built for Thumb. X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The mov lr, pc instruction will lose the Thumb bit from the return address so use blx lr instead. ports/ChangeLog.arm: 2013-08-29 Will Newton * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use blx instead of mov lr, pc. --- ports/sysdeps/unix/sysv/linux/arm/clone.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/sysdeps/unix/sysv/linux/arm/clone.S b/ports/sysdeps/unix/sysv/linux/arm/clone.S index ce9c2a5..6e74fa7 100644 --- a/ports/sysdeps/unix/sysv/linux/arm/clone.S +++ b/ports/sysdeps/unix/sysv/linux/arm/clone.S @@ -93,8 +93,8 @@ PSEUDO_END (__clone) mov lr, pc bx ip #else - mov lr, pc - ldr pc, [sp], #8 + ldr lr, [sp], #8 + blx lr #endif @ and we are done, passing the return value through r0