From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14981 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: Sat, 7 Dec 2019 13:03:05 -0500 Message-ID: <20191207180305.GB1666@brightrain.aerifal.cx> 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=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="124877"; 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-14997-gllmg-musl=m.gmane.org@lists.openwall.com Sat Dec 07 19:03:20 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 1ideQK-000WPD-5Y for gllmg-musl@m.gmane.org; Sat, 07 Dec 2019 19:03:20 +0100 Original-Received: (qmail 26080 invoked by uid 550); 7 Dec 2019 18:03:18 -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 26052 invoked from network); 7 Dec 2019 18:03:17 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14981 Archived-At: On Thu, Nov 21, 2019 at 12:54:41PM -0800, Andre McCurdy wrote: > 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? Looks fine. Applying. Sorry I overlooked this. Rich