Mixed linking of ARM/THUMB object files

Nick Clifton nickc@cygnus.com
Sat Apr 1 00:00:00 GMT 2000


Hi Lim,

: I think I found a bug of arm-elf (or thumb-elf) targetted ld. When thumb-mode code
: calls arm-mode function foo(), ld should generate codes as follows.
: 
:     ....   # thumb mode
:     b __foo_from_thumb  
:     ....
: __foo_from_thumb:
:     ....
: __foo_change_to_arm:
:     b foo
: 
: but actually ld generated
: 
:     ....   # thumb mode
:     b __foo_change_to_arm  
:     ....
: __foo_from_thumb:
:     .... ( 2 words long)
: __foo_change_to_arm:
:     b foo
: 
: and code below the label __foo_from_thumb (2 words long) wasn't executed.
: So I modified binutils-991229 (which supports thumb-elf) and my example 
: program worked successfully with gdb instruction set simulator. I just changed
: the digit 4 at line 897 of binutils-991229/bfd/elf32-arm.h to 8.
: Any comment is welcome.

Thanks very much for catching this bug.  I have tested it myself and
you are correct, the bug exists and your fix does correct it.

I have taken the liberty of applying the fix to the source
repository. 

Cheers
	Nick

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list