From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14950 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andre McCurdy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] arm: avoid conditional branch to PLT in sigsetjmp.s Date: Thu, 21 Nov 2019 12:54:41 -0800 Message-ID: References: <20190918060405.17630-1-armccurdy@gmail.com> <20190918195406.GB9017@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="47020"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14966-gllmg-musl=m.gmane.org@lists.openwall.com Thu Nov 21 21:55:10 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iXtTp-000C47-1v for gllmg-musl@m.gmane.org; Thu, 21 Nov 2019 21:55:09 +0100 Original-Received: (qmail 1363 invoked by uid 550); 21 Nov 2019 20:55:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 1345 invoked from network); 21 Nov 2019 20:55:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=zKCZPeCj8c4lkyir3HltPH20aDvfL7R2+X+Oxcy3daY=; b=kUjbXf66pa73DWQAjMwlrdubjYJshzrwVNNOGXMb/B9Uha4OHz7bx3Hz/jhMv248D6 z6UIB6Tgzm4cWWTYnaB30qXTSVDOaJk1vys4JQUobIrRYK/xHW4G4iMjsq3tYUPTVFOh siE6PByQ8/8CkCwoI4XHmhHbHa2cnfLA0xFOQewRC/vkDCVUaB1avlFMpoBGa0Quwwnn Jbf3QILtSjpntFE0CS+ZedDLtN+fuRfxabgQMdpeRvUszIY91zHYO2vv5t0IJhMzMepH q1PJvFF1x60fNodNsxYEe7X+KJoaxDKLHwyRW7Wcu5kwjAebGqB1xYuAOrRZh3gG6Mzr rjLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=zKCZPeCj8c4lkyir3HltPH20aDvfL7R2+X+Oxcy3daY=; b=SBW1V3KG5MxvIbs0jUdwhwQ3Xk+acCoFajPfChEKtAnmufvKSRDQIeOXt+TEi+coGm Sk7aEzcUfaifYNa4WdoekGTTVbCPaxUqaJboywDNTRfcVqxgG/6NPRLaJD/3uFTkC80U UKhW3p+6zbaYyNOzQHeI4KhUsn270/RF+ST0I4JSKCfajuQWdMdJYsDhQUUGEegSSQbm ej6z9WW67bXSGIRb10r2tTrjxHwJ5BB2WHBy25Kujm0x2TuMF2elV8ZW2qD2CEmR9nu7 79Ro683A1r6iZbR/8oohBgLwGFx/5g4VDpelbkRGoFP6d+iuz7Lkd9sDDVQ2TkQ9ouq1 vhxg== X-Gm-Message-State: APjAAAUscJSUgWH02QKW15j03dFNVyhgAN08CuorSJ+qB6vAyvfMmHkt MVNtFV6I/s0R8QiPh3l+1bWmlyztLvaBGVhKc242/w== X-Google-Smtp-Source: APXvYqw5X0X3CEWn8HdezkcWwHQL/qafglGPrD1heR+2Z79vxXDA5vAe1HzGJ+17mF8/Kk5pkzXUB4/cKrdejZ6/xi4= X-Received: by 2002:a05:6102:835:: with SMTP id k21mr7549012vsb.11.1574369693487; Thu, 21 Nov 2019 12:54:53 -0800 (PST) In-Reply-To: <20190918195406.GB9017@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14950 Archived-At: On Wed, Sep 18, 2019 at 12:54 PM Rich Felker wrote: > On Wed, Sep 18, 2019 at 10:52:13AM -0700, Andre McCurdy wrote: > > On Wed, Sep 18, 2019 at 7:29 AM Khem Raj wrote: > > > On Tue, Sep 17, 2019 at 11:04 PM Andre McCurdy wrote: > > > > > > > > The R_ARM_THM_JUMP19 relocation type generated for the original code > > > > when targeting Thumb 2 is not supported by the gold linker: > > > > > > > > | .../arm-oe-linux-musleabi/9.2.0/ld: error: conditional branch to PLT in THUMB-2 not supported yet. > > > > | src/signal/arm/sigsetjmp.s:9: error: unexpected opcode while processing relocation R_ARM_THM_JUMP19 > > > > > > if it is thumb2 specific another option could be to use `it eq` before > > > beq which should turn branch into an unconditional branch, which then > > > uses R_ARM_THM_JUMP24 relocation that has a range of 16MB. > > > > That would work too. Thumb 2 specific code would need to be guarded by > > #ifdef __thumb2__ though (which I think implies also renaming the file > > from .s to .S ?) and I'm not sure if the extra complexity justifies > > saving one instruction in the ARM case. > > I don't think it does. Also, current style is not to use "it" at all, > but rather -Wa,-mimplicit-it=always. I'm not sure if unified syntax > accepts "it" in arm mode when the following insn has a matching > condition suffix, but here it wouldn't I think... Any issues with merging this now?