Simon Ellwood wrote:
> This does not make much sense. The libraries are already built for the
> architecture that they run on.
> Codesourcery have there own forum you can go on. I would try there.
> I am guessing you are using the lite version ?
> I would say you have a makefile issue here and you are specifying the
> wrong architecture.
> Which chip are you building for ?
Yes, I am building for little endian. The chip is FA526 core that is
compatible with armv4 instruction set.
The libc and libgcc is build from armv4t that generate interwork code
using BX OP code.
Refer the source code of BFD in binutils that will replace the BX OP
code to MOV OP code.
Below is the portion from elf32-arm.c in binutils.
bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
/* Ensure that we have a BX instruction. */
BFD_ASSERT ((insn & 0x0ffffff0) == 0x012fff10);
/* Preserve Rm (lowest four bits) and the condition code
(highest four bits). Other bits encode MOV PC,Rm. */
insn = (insn & 0xf000000f) | 0x01a0f000;
bfd_put_32 (input_bfd, insn, hit_data);
So, I suppose the -fix-v4bx should be work.