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]

Weird issues. Linker + arm/thumb interworking / stub is not implemented.


Hi,

This may not be the correct mailing list for this question.

My cross-compilation chain for ARM/THUMB for xscale doesn't behave
correctly during linking step. (use gcc-3.4.3 / glibc-2.3.3 /
binutils-2.15 / linux-2.6.10 ).

This file is built for ARM with -mthumb-interwork:

int main(){
  thumb_call();
  return 0;
}

This one, in Thumb with -mthumb-interwork:
void thumb_call(){
 int x=0;
 x++;
}

Each object dump seems correct.
It links without warning/errors.

But the executable contains something wrong:
main() call a "stub" function:  "thumb_call_FROM_ARM" which should
take care of the interworking, specially switching from ARM to Thumb
and jumping to "thumb_call".
This stub is actually empty, and since, it's at the end of the object,
the programm exits "correctly".

Problem doesn't appear, if I ask GCC to ask a static linking (-static
-static-libc),
because _thumb_call_FROM_ARM is be implemented correctly. 

My question aims at somebody who would have encounter that kind of problem.
Maybe just a problem while rebuilding toolchain. (options were:
softfloat/interworking/xscale/).

Thanks for any help,

Sylvain Becker


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