This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: [uClinux-dev] why no-mmu cannot support binfmt_aout.c
- From: Jamie Lokier <jamie at shareable dot org>
- To: uClinux development list <uclinux-dev at uclinux dot org>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>, binutils at sourceware dot org
- Date: Thu, 29 Jan 2009 06:12:15 +0000
- Subject: Re: [uClinux-dev] why no-mmu cannot support binfmt_aout.c
- References: <497CF332.5020206@snapgear.com> <3a665c760901260851x4dfcc2beve282e8ba709e94e3@mail.gmail.com> <20090126235125.GC9296@shareable.org> <3a665c760901270902r582c60dfm2668a30c754aaf17@mail.gmail.com> <20090127183339.GA23412@shareable.org> <3a665c760901281016i562c8f6h36e77d72946bc704@mail.gmail.com> <4980EE0E.9040307@snapgear.com> <3a665c760901281600q19a5d0d2n4c4bb321cdbfba6c@mail.gmail.com> <4980F5C8.3040202@snapgear.com> <3a665c760901282207g5e203ef0rfbd51a1c2c9a80a9@mail.gmail.com>
loody wrote:
> e1a0e00f mov lr, pc
> e12fff13 bx r3
> What is the specialty of the instruction, "mov lr,pc", which let
> arm cpu fail?
Both of those instructions can put the CPU into Thumb mode. If it
doesn't support Thumb, you get an instruction fault.
"mov lr,pc" is supported on all ARMs, but (guessing from what you're
getting) maybe it can fault depending on the value in "lr"?
"bx" is not available on all ARMs, and will fault when you don't have
it. That's why it's necessary to build everything with the right GCC
options.
I wouldn't be surprised if the Codesourcery tools (especially
pre-built libs) are targetting later ARM chips only, since people
using later ARM chips are probably paying Codesourcery for the work.
-- Jamie