From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14695 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] arm: avoid conditional branch to PLT in sigsetjmp.s Date: Wed, 18 Sep 2019 15:54:06 -0400 Message-ID: <20190918195406.GB9017@brightrain.aerifal.cx> References: <20190918060405.17630-1-armccurdy@gmail.com> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="269461"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14711-gllmg-musl=m.gmane.org@lists.openwall.com Wed Sep 18 21:54:23 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 1iAg1t-0017wb-KT for gllmg-musl@m.gmane.org; Wed, 18 Sep 2019 21:54:21 +0200 Original-Received: (qmail 14195 invoked by uid 550); 18 Sep 2019 19:54:19 -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 14174 invoked from network); 18 Sep 2019 19:54:18 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14695 Archived-At: 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... Rich