5

Is it possible to take a binary compiled for ARMv7 architecture and convert it to ARMv6 ? Are there any tools that can do this?

5
  • Whether or not this question would be allowed on SO is a question for Meta Stack Overflow. I'm not entirely sure, so I'm going to leave it for someone else to judge.
    – Adam Lear
    Commented Jun 30, 2011 at 20:01
  • Produced by which compiler? For what platform (OS, etc)? Thumb, not, or both? Using supervisor-only instructions (e.g. messing with the MMU)? Not that I know any, but I suspect partial solutions are a lot easier. @AnnaLear why wouldn't this question be ok on SO? Commented Jun 30, 2011 at 23:30
  • For the Android platform. Not sure about the other questions. :/
    – Tom
    Commented Jun 30, 2011 at 23:37
  • I am just trying to understand why this is not possible, if it is not. Or if it is, then how could it be done?
    – Tom
    Commented Jun 30, 2011 at 23:39
  • 1
    There would be two ways you could do this. You can scan the code for any instructions not supported on ARMv6 and replace them with functionally equivalent ARMv6 instructions, relocating as needed. Alternatively, you could trap illegal instruction exceptions, analyze the faulting instruction, create a 'thunk' that does what the instruction should do and replace the faulting instruction with a jump/call to the thunk. That said, I don't know of anyone who has actually done this. Commented Aug 13, 2011 at 18:27

1 Answer 1

4

In theory, yes, it is possible. No, there are no tools that can do this, and, in general, it is not recommended. The overhead, performance hit, and human effort required doesn't match the potential reward.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.