This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Mixed linking of ARM/THUMB object files
- To: totohero at poppy dot snu dot ac dot kr
- Subject: Re: Mixed linking of ARM/THUMB object files
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Thu, 13 Jan 2000 14:56:41 -0800
- CC: crossgcc at sourceware dot cygnus dot com, binutils at sourceware dot cygnus dot com
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