thumb2 porting issues identified: klibc uses mov.*pc

Bug #527720 reported by Alexander Sack on 2010-02-25
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
klibc (Ubuntu)
High
Unassigned
Lucid
High
Alexander Sack
Alexander Sack (asac) wrote :

12:52 < dmart> ./klibc-1.5.15/usr/klibc/arch/arm/setjmp.S: mov pc, lr
12:52 < dmart> ./klibc-1.5.15/usr/klibc/arch/arm/setjmp.S: mov pc, lr
12:52 < dmart> ./klibc-1.5.15/usr/klibc/arch/arm/setjmp.S: mov pc, lr
12:52 < dmart> ./klibc-1.5.15/usr/klibc/arch/arm/setjmp.S:1: mov pc, r3
12:52 < dmart> ./klibc-1.5.15/usr/klibc/arch/arm/vfork.S: mov pc, lr
12:52 < dmart> ./klibc-1.5.15/usr/klibc/arch/arm/vfork.S: mov pc, lr

Changed in klibc (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-10.04-beta-1
Alexander Sack (asac) wrote :
Changed in klibc (Ubuntu Lucid):
assignee: nobody → Alexander Sack (asac)
Alexander Sack (asac) wrote :
Steve Langasek (vorlon) on 2010-03-17
Changed in klibc (Ubuntu Lucid):
milestone: ubuntu-10.04-beta-1 → ubuntu-10.04-beta-2
tags: added: patch
Alexander Sack (asac) wrote :

removing from beta 2 list. seems its build with an odd abi for armv4 . - however it seems to work for us, so its not critical.

Changed in klibc (Ubuntu Lucid):
milestone: ubuntu-10.04-beta-2 → none
Steve Langasek (vorlon) wrote :

should this also be marked 'wontfix' for lucid and/or have the bug importance reduced?

Alexander Sack (asac) wrote :

klibc is used confined in initramfs and isnt release critical for arm as it is. There might be issues with the two build-rdepends we have, but those are not critical. Wontfix for lucid. Lets get this sorted next cycle.

Changed in klibc (Ubuntu Lucid):
status: Triaged → Won't Fix
Changed in klibc (Ubuntu):
assignee: Alexander Sack (asac) → Michael Casadevall (mcasadevall)

dmart:

Has this patch been tested yet? I want to forwad to klibc upstream, but I don't have a board available to confirm this works with the way we build klibc

Loïc Minier (lool) on 2010-07-12
tags: added: armel armv7 thumb

This patch is most likely not yet complete. Last we said was that it
wasnt worth following through and that we should rather try to kill
klibc alltogether on arm.

On Wed, May 05, 2010 at 05:30:27AM -0000, Michael Casadevall wrote:
> dmart:
>
> Has this patch been tested yet? I want to forwad to klibc upstream, but
> I don't have a board available to confirm this works with the way we
> build klibc
>

 - Alexander

Changed in klibc (Ubuntu):
assignee: Michael Casadevall (mcasadevall) → nobody
Steve Langasek (vorlon) on 2011-02-15
tags: added: arm-porting-queue
Steve Langasek (vorlon) wrote :

here is an updated patch for this bug. I'm not sure if the upstream code has changed in the meantime, but I found a couple more uses of 'mov pc' in the code that I've also patched. Is that what was meant by this being "incomplete"?

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.

We may yet want to move away from klibc on arm, but I don't see any reason not to apply this fix (and push to Debian)?

Thorsten Glaser (mirabilos) wrote :

Steve Langasek dixit:

>We may yet want to move away from klibc on arm, but I don't see any

Actually, I’d quite like to get a working klibc on most linux-any
ports in the medium term. My package mksh has a /bin/mksh-static
which currently uses dietlibc, if available, eglibc otherwise. The
state of dietlibc is… poor (especially on Ubuntu/arm*), and I had
already gotten an older klibc patched up to do the job well enough
(not just the English “good enough”). It’s even smaller, works de-
cent and is pretty fast. (Actually I aim for replacing all ash and
similar shells, too, but that’s my secondary goal.)

With GNU libc, it’s a rather huge beast.

Please keep this in mind.

Thanks,
//mirabilos • tg@d.o
--
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh

Steve Langasek (vorlon) wrote :

Sure; I only mean that we may want to avoid pulling klibc in by default in ARM images in Ubuntu, where it's used in the initramfs. We aren't going to be making any decisions one way or the other regarding its availability.

Steve Langasek (vorlon) wrote :

Updated patch; based on upstream feedback it seems we should use bx for armv4t as well, only falling back to mov pc on armv4. Have inquired of davem why the porting guide is inconsistent on this.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package klibc - 1.5.20-1ubuntu2

---------------
klibc (1.5.20-1ubuntu2) natty; urgency=low

  * debian/patches/arm-thumb2: fix up ARM assembly to use 'bx lr' in place
    of 'mov pc, lr'. LP: #527720.
 -- Steve Langasek <email address hidden> Sat, 19 Feb 2011 22:54:19 -0800

Changed in klibc (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers