This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: interworking problem
- From: Nick Clifton <nickc at redhat dot com>
- To: aram bharathi <arambharathi at linuxmail dot org>
- Cc: Ian Lance Taylor <ian at airs dot com>, gcc at gcc dot gnu dot org, binutils at sourceware dot org
- Date: Tue, 22 Feb 2005 09:21:40 +0000
- Subject: Re: interworking problem
- References: <20050222042227.BEF75416119@ws5-2.us4.outblaze.com>
Hi Aram,
i have gone through the a.out file after this error.
> that is producing full of arm instructions other than the main
function(which is compiled for -mthumb).
where should i change for this corresponding error.
It is not clear what question you are asking here.
Ian has pointed out that you should be compiling your program with the
-mthumb-interwork switch specified on the gcc command line.
i have added one new add instruction in thumb mode. based on that
i have written one sample program to emit the corresponding new
instruction. gcc works fine. when i assemble the function it emits
> correct opcode. but when i give the same function to the ld it
> emits full of arm instructions instead of thumb instructions.
> which routine checks for this corresponding change.
Again this is not clear. Do you mean that when the linker is creating
the executable that it is inserting some ARM-encoded instructions into
the output, or that it is somehow magically transforming your
THUMB-encoded instructions into ARM-encoded instructions ?
Perhaps it would help if you could provide a *small* example program and
the command lines you use to compile it, as well as description of
what is wrong with the resulting executable.
Cheers
Nick