Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 17 Sep 2019 23:04:05 -0700
From: Andre McCurdy <armccurdy@...il.com>
To: musl@...ts.openwall.com
Cc: Andre McCurdy <armccurdy@...il.com>
Subject: [PATCH] arm: avoid conditional branch to PLT in sigsetjmp.s

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
---
 src/signal/arm/sigsetjmp.s | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/signal/arm/sigsetjmp.s b/src/signal/arm/sigsetjmp.s
index 318addba..69ebbf49 100644
--- a/src/signal/arm/sigsetjmp.s
+++ b/src/signal/arm/sigsetjmp.s
@@ -6,9 +6,10 @@
 sigsetjmp:
 __sigsetjmp:
 	tst r1,r1
-	beq setjmp
+	bne 1f
+	b setjmp
 
-	str lr,[r0,#256]
+1:	str lr,[r0,#256]
 	str r4,[r0,#260+8]
 	mov r4,r0
 
-- 
2.23.0

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.