Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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

share|improve this question
    
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. –  Anna Lear Jun 30 '11 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? –  Gilles Jun 30 '11 at 23:30
    
For the Android platform. Not sure about the other questions. :/ –  Tom Jun 30 '11 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 Jun 30 '11 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. –  David Schwartz Aug 13 '11 at 18:27

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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