fwd: [klibc] fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

8 messages, 5 authors, 2011-02-17 · open the first message on its own page

fwd: [klibc] fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: maximilian attems <hidden>
Date: 2011-02-16 23:06:48

hello vorlon,

got notified of your patch,
will apply next days upstream unless some critiques are voiced on ml.
thanks.

-- 
maks


----- Forwarded message from Steve Langasek [off-list ref] -----

Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc


I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).

Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.

Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
         ldrcs	r3, 1f
         mvncs	r0, #0
         strcs	r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 
 	.balign 4
 1:
@@ -49,7 +53,11 @@ vfork:
 	str	r2, [r1]
 	neg	r0, r0
 1:
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 
 	.balign	4
 2:
--- klibc-1.5.20.orig/usr/klibc/arch/arm/setjmp.S
+++ klibc-1.5.20/usr/klibc/arch/arm/setjmp.S
@@ -29,7 +29,11 @@
 setjmp:
 	stmia	r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
 	mov	r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 	.size setjmp,.-setjmp
 
 	.text
@@ -39,7 +43,11 @@ setjmp:
 longjmp:
 	ldmia	r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
 	mov	r0, r1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 	.size longjmp,.-longjmp
 
 #else /* __thumb__ */
@@ -75,7 +83,11 @@ setjmp:
 	mov	r7, sp
 	stmia	r0!, {r3, r4, r5, r6, r7}
 	mov	r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 	.size setjmp,.-setjmp
 
 	.text
@@ -96,7 +108,11 @@ longjmp:
 	mov	r0, r1
 	bne	1f
 	mov	r0, #1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 1:	mov	pc, r3
+#else
+1:	bx	r3
+#endif
 	.size longjmp,.-longjmp
 
 #endif /* __thumb__ */

[klibc] fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: Kirill A. Shutemov <hidden>
Date: 2011-02-16 23:50:19

On Thu, Feb 17, 2011 at 12:06:48AM +0100, maximilian attems wrote:
quoted hunk
hello vorlon,

got notified of your patch,
will apply next days upstream unless some critiques are voiced on ml.
thanks.

-- 
maks


----- Forwarded message from Steve Langasek [off-list ref] -----

Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc


I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).

Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.

Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
         ldrcs	r3, 1f
         mvncs	r0, #0
         strcs	r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
NAK. ARMv4T supports bx intruction. ARMv4 doesn't.
quoted hunk
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 
 	.balign 4
 1:
@@ -49,7 +53,11 @@ vfork:
 	str	r2, [r1]
 	neg	r0, r0
 1:
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 
 	.balign	4
 2:
--- klibc-1.5.20.orig/usr/klibc/arch/arm/setjmp.S
+++ klibc-1.5.20/usr/klibc/arch/arm/setjmp.S
@@ -29,7 +29,11 @@
 setjmp:
 	stmia	r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
 	mov	r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 	.size setjmp,.-setjmp
 
 	.text
@@ -39,7 +43,11 @@ setjmp:
 longjmp:
 	ldmia	r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
 	mov	r0, r1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 	.size longjmp,.-longjmp
 
 #else /* __thumb__ */
@@ -75,7 +83,11 @@ setjmp:
 	mov	r7, sp
 	stmia	r0!, {r3, r4, r5, r6, r7}
 	mov	r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 	mov	pc, lr
+#else
+	bx	lr
+#endif
 	.size setjmp,.-setjmp
 
 	.text
@@ -96,7 +108,11 @@ longjmp:
 	mov	r0, r1
 	bne	1f
 	mov	r0, #1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
 1:	mov	pc, r3
+#else
+1:	bx	r3
+#endif
 	.size longjmp,.-longjmp
 
 #endif /* __thumb__ */
_______________________________________________
klibc mailing list
klibc at zytor.com
http://www.zytor.com/mailman/listinfo/klibc
-- 
 Kirill A. Shutemov

[klibc] fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: Steve Langasek <hidden>
Date: 2011-02-17 00:01:44

Thanks for forwarding this on, maks.

On Thu, Feb 17, 2011 at 01:50:19AM +0200, Kirill A. Shutemov wrote:
quoted
Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc
quoted
I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).
quoted
Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.
quoted
Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
quoted
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
         ldrcs	r3, 1f
         mvncs	r0, #0
         strcs	r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
NAK. ARMv4T supports bx intruction. ARMv4 doesn't.
I see from
https://wiki.ubuntu.com/ARM/Thumb2PortingHowto#Identifying%20the%20Target%20Architecture
that you are correct - but then in
https://wiki.ubuntu.com/ARM/Thumb2PortingHowto#Detailed%20Instruction%20Behaviour
the recommendation given is to use exactly this guard for backwards
compatibility.

I'm cc:ing Dave Martin from ARM who drafted this porting guide.  Dave, was
there some other reason besides instruction compatibility to prefer the
original "mov pc,lr" on armv4t, or is this simply a miscopy?
quoted
 	mov	pc, lr
+#else
+	bx	lr
+#endif
Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110216/ff3d096d/attachment.sig>

[klibc] fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: Khem Raj <hidden>
Date: 2011-02-17 00:03:07

On Wed, Feb 16, 2011 at 3:50 PM, Kirill A. Shutemov
[off-list ref] wrote:
On Thu, Feb 17, 2011 at 12:06:48AM +0100, maximilian attems wrote:
quoted
hello vorlon,

got notified of your patch,
will apply next days upstream unless some critiques are voiced on ml.
thanks.

--
maks


----- Forwarded message from Steve Langasek [off-list ref] -----

Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc


I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).

Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.

Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
? ? ? ? ?ldrcs ? ? ? ?r3, 1f
? ? ? ? ?mvncs ? ? ? ?r0, #0
? ? ? ? ?strcs ? ? ? ?r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
NAK. ARMv4T supports bx intruction. ARMv4 doesn't.
Does ARMv4t support BX lr ?

quoted
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif

? ? ? .balign 4
?1:
@@ -49,7 +53,11 @@ vfork:
? ? ? str ? ? r2, [r1]
? ? ? neg ? ? r0, r0
?1:
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif

? ? ? .balign 4
?2:
--- klibc-1.5.20.orig/usr/klibc/arch/arm/setjmp.S
+++ klibc-1.5.20/usr/klibc/arch/arm/setjmp.S
@@ -29,7 +29,11 @@
?setjmp:
? ? ? stmia ? r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
? ? ? mov ? ? r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif
? ? ? .size setjmp,.-setjmp

? ? ? .text
@@ -39,7 +43,11 @@ setjmp:
?longjmp:
? ? ? ldmia ? r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
? ? ? mov ? ? r0, r1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif
? ? ? .size longjmp,.-longjmp

?#else /* __thumb__ */
@@ -75,7 +83,11 @@ setjmp:
? ? ? mov ? ? r7, sp
? ? ? stmia ? r0!, {r3, r4, r5, r6, r7}
? ? ? mov ? ? r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif
? ? ? .size setjmp,.-setjmp

? ? ? .text
@@ -96,7 +108,11 @@ longjmp:
? ? ? mov ? ? r0, r1
? ? ? bne ? ? 1f
? ? ? mov ? ? r0, #1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
?1: ? mov ? ? pc, r3
+#else
+1: ? bx ? ? ?r3
+#endif
? ? ? .size longjmp,.-longjmp

?#endif /* __thumb__ */

_______________________________________________
klibc mailing list
klibc at zytor.com
http://www.zytor.com/mailman/listinfo/klibc
--
?Kirill A. Shutemov

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[klibc] fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: Kirill A. Shutemov <hidden>
Date: 2011-02-17 00:18:14

On Wed, Feb 16, 2011 at 04:01:44PM -0800, Steve Langasek wrote:
Thanks for forwarding this on, maks.

On Thu, Feb 17, 2011 at 01:50:19AM +0200, Kirill A. Shutemov wrote:
quoted
quoted
Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc
quoted
quoted
I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).
quoted
quoted
Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.
quoted
quoted
Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
quoted
quoted
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
         ldrcs	r3, 1f
         mvncs	r0, #0
         strcs	r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
quoted
NAK. ARMv4T supports bx intruction. ARMv4 doesn't.
I see from
https://wiki.ubuntu.com/ARM/Thumb2PortingHowto#Identifying%20the%20Target%20Architecture
that you are correct - but then in
https://wiki.ubuntu.com/ARM/Thumb2PortingHowto#Detailed%20Instruction%20Behaviour
the recommendation given is to use exactly this guard for backwards
compatibility.
glibc-ports:

sysdeps/arm/sysdep.h:
#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \
     && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__))
# define __USE_BX__
#endif

sysdeps/arm/dl-machine.h:
#if defined(__USE_BX__)
#define BX(x) "bx\t" #x
#else
#define BX(x) "mov\tpc, " #x
#endif
I'm cc:ing Dave Martin from ARM who drafted this porting guide.  Dave, was
there some other reason besides instruction compatibility to prefer the
original "mov pc,lr" on armv4t, or is this simply a miscopy?
quoted
quoted
 	mov	pc, lr
+#else
+	bx	lr
+#endif
Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org


-- 
 Kirill A. Shutemov

[klibc] fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: Kirill A. Shutemov <hidden>
Date: 2011-02-17 00:42:13

On Wed, Feb 16, 2011 at 04:03:07PM -0800, Khem Raj wrote:
On Wed, Feb 16, 2011 at 3:50 PM, Kirill A. Shutemov
[off-list ref] wrote:
quoted
On Thu, Feb 17, 2011 at 12:06:48AM +0100, maximilian attems wrote:
quoted
hello vorlon,

got notified of your patch,
will apply next days upstream unless some critiques are voiced on ml.
thanks.

--
maks


----- Forwarded message from Steve Langasek [off-list ref] -----

Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc


I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).

Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.

Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
? ? ? ? ?ldrcs ? ? ? ?r3, 1f
? ? ? ? ?mvncs ? ? ? ?r0, #0
? ? ? ? ?strcs ? ? ? ?r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
NAK. ARMv4T supports bx intruction. ARMv4 doesn't.
Does ARMv4t support BX lr ?
Sure.

See http://wiki.debian.org/ArmEabiPort

-- 
 Kirill A. Shutemov

[klibc] fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: Khem Raj <hidden>
Date: 2011-02-17 03:17:47

On Wed, Feb 16, 2011 at 4:03 PM, Khem Raj [off-list ref] wrote:
On Wed, Feb 16, 2011 at 3:50 PM, Kirill A. Shutemov
[off-list ref] wrote:
quoted
On Thu, Feb 17, 2011 at 12:06:48AM +0100, maximilian attems wrote:
quoted
hello vorlon,

got notified of your patch,
will apply next days upstream unless some critiques are voiced on ml.
thanks.

--
maks


----- Forwarded message from Steve Langasek [off-list ref] -----

Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc


I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).

Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.

Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
? ? ? ? ?ldrcs ? ? ? ?r3, 1f
? ? ? ? ?mvncs ? ? ? ?r0, #0
? ? ? ? ?strcs ? ? ? ?r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
NAK. ARMv4T supports bx intruction. ARMv4 doesn't.
Does ARMv4t support BX lr ?
hmm yes it does. I confused it with blx <Rm> which is unpredictable in
thumb mode on architectures < armv5t
quoted
quoted
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif

? ? ? .balign 4
?1:
@@ -49,7 +53,11 @@ vfork:
? ? ? str ? ? r2, [r1]
? ? ? neg ? ? r0, r0
?1:
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif

? ? ? .balign 4
?2:
--- klibc-1.5.20.orig/usr/klibc/arch/arm/setjmp.S
+++ klibc-1.5.20/usr/klibc/arch/arm/setjmp.S
@@ -29,7 +29,11 @@
?setjmp:
? ? ? stmia ? r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
? ? ? mov ? ? r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif
? ? ? .size setjmp,.-setjmp

? ? ? .text
@@ -39,7 +43,11 @@ setjmp:
?longjmp:
? ? ? ldmia ? r0, {r4, r5, r6, r7, r8, r9, r10, fp, sp, lr}
? ? ? mov ? ? r0, r1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif
? ? ? .size longjmp,.-longjmp

?#else /* __thumb__ */
@@ -75,7 +83,11 @@ setjmp:
? ? ? mov ? ? r7, sp
? ? ? stmia ? r0!, {r3, r4, r5, r6, r7}
? ? ? mov ? ? r0, #0
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
? ? ? mov ? ? pc, lr
+#else
+ ? ? bx ? ? ?lr
+#endif
? ? ? .size setjmp,.-setjmp

? ? ? .text
@@ -96,7 +108,11 @@ longjmp:
? ? ? mov ? ? r0, r1
? ? ? bne ? ? 1f
? ? ? mov ? ? r0, #1
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
?1: ? mov ? ? pc, r3
+#else
+1: ? bx ? ? ?r3
+#endif
? ? ? .size longjmp,.-longjmp

?#endif /* __thumb__ */

_______________________________________________
klibc mailing list
klibc at zytor.com
http://www.zytor.com/mailman/listinfo/klibc
--
?Kirill A. Shutemov

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[klibc] fwd: fix up ARM assembly to use 'bx lr' in place of 'mov pc, lr'.

From: Dave Martin <hidden>
Date: 2011-02-17 09:39:47

On Wed, Feb 16, 2011 at 11:50 PM, Kirill A. Shutemov
[off-list ref] wrote:
On Thu, Feb 17, 2011 at 12:06:48AM +0100, maximilian attems wrote:
quoted
hello vorlon,

got notified of your patch,
will apply next days upstream unless some critiques are voiced on ml.
thanks.

--
maks


----- Forwarded message from Steve Langasek [off-list ref] -----

Date: Wed, 16 Feb 2011 22:05:42 -0000
From: Steve Langasek <redacted>
Subject: [Bug 527720] Re: thumb2 porting issues identified: klibc uses mov.*pc


I've also touched it up to be mergeable with Debian (support v4t builds
with #ifdef).

Confirmed that installing the resulting klibc packages on my beagleboard
gives me a successfully-booting initramfs with klibc; and the
vfork/setjmptest test cases all pass in the klibc package tree.

Fixes: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/527720
--- klibc-1.5.20.orig/usr/klibc/arch/arm/vfork.S
+++ klibc-1.5.20/usr/klibc/arch/arm/vfork.S
@@ -25,7 +25,11 @@ vfork:
? ? ? ? ?ldrcs ? ? ? ?r3, 1f
? ? ? ? ?mvncs ? ? ? ?r0, #0
? ? ? ? ?strcs ? ? ? ?r2, [r3]
+#if defined (___ARM_ARCH_4T__) || defined (__ARM_ARCH_4__)
NAK. ARMv4T supports bx intruction. ARMv4 doesn't.
You're strictly correct.  My original rationale was to ensure there is
no disruption for people building for v4/v4T -- since the more
restricted functionality of Thumb-1 means people tend not to use it to
build the whole distro anyway.

If people using <v5 are prepared to accept the change, I've got no
problem with changing the #ifs to #ifdef __ARM_ARCH_4__

We can't get rid of the #ifdef though, unless we can persuade everyone
targeting v4 to build with gcc/as -march=armv4t + ld --fix-v4bx
(unlikely).

Cheers
---Dave
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help