This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: interworking problem


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]