From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14692 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: Wed, 18 Sep 2019 10:52:13 -0700 Message-ID: References: <20190918060405.17630-1-armccurdy@gmail.com> 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="8943"; mail-complaints-to="usenet@blaine.gmane.org" Cc: musl@lists.openwall.com To: Khem Raj Original-X-From: musl-return-14708-gllmg-musl=m.gmane.org@lists.openwall.com Wed Sep 18 19:52:41 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 1iAe88-00029G-To for gllmg-musl@m.gmane.org; Wed, 18 Sep 2019 19:52:41 +0200 Original-Received: (qmail 29698 invoked by uid 550); 18 Sep 2019 17:52:38 -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 28656 invoked from network); 18 Sep 2019 17:52:37 -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 :cc; bh=SZ78PZiYLLlAudERrPtUWPDAe6uCUpprD0dPtL+ZqUk=; b=pUkrxfAvHfks51Qn7/2WaU+23/7WB7RHMNzt8TjrRATWfGUl/5bQgkBhZAJzqM83Jg Qxmt6jBMArMp50lRnA9P5Pz/EukW9I/AyLv6kRgdGBLbayEJ1rVLK3FhnVHcrnG5s4rc w+pp6tveqyMZdEnuf9GS2vveoZ3VY9DmplQbnOlp1EfXbgdfVy9W70nptqnYiPw0NMUs uePjoJRdQ9Y2tikygJFbSG7Cf2c4O1Bxy1v2dn6ynSK2ayGJQN6FNlzp6FagmbbkeeiL kmUNi+duH2KP9kpEDG33J+hrlC3L58SWCRFfcah2l+BuzDj8y108vSOZztd1UfZhfto9 xf1g== 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:cc; bh=SZ78PZiYLLlAudERrPtUWPDAe6uCUpprD0dPtL+ZqUk=; b=ZwPEvX0fgpASMiihArcOQP9JkYJl1fDKi1Smfv43KF49oUquK4wjwEulk8xBZ26uin IXv93btj59zLDavqWthqRKNE9w9achIsg5U9q8TyWUeUKayzYvnfcVDdIf8GgI5uZRv9 h0/x7dA4OQD+1vt3cpBBVbygdGVUfD7BToPjEcJxfD/5B7bW4JJr8I2wLJsXJHz+tzme W70RXhc29QxY4iK0YrEu7deLOEPLiUnHMajjFvO1cCvi8uGuux9P4eBETrKsivGiGbHh +j5VzjZte5r04Qu5R139OMRIv50ChSpsShA9hATcc0f374sTS5swhCGpKA/+9VNpxnDE 1Thw== X-Gm-Message-State: APjAAAVVrP2tsVAS/GaW6Jhqs7kHZc7runLWRM70TmJl0j0lX49r47BO JhqWKDQrT8n9xXql0+zQIJTj5ALXZDH7iZLM/Os= X-Google-Smtp-Source: APXvYqzecC4UQnVsQRL6HvkQ9DSuJk1CkW7G4ezpQs0GvJBlMjPTrxudIPfW4Oiog07srxMUl6Rpe6Uu5Vp6LkAqQhE= X-Received: by 2002:a67:d29d:: with SMTP id z29mr3051711vsi.222.1568829145639; Wed, 18 Sep 2019 10:52:25 -0700 (PDT) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:14692 Archived-At: 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.