diff options
author | Nick Clifton <nickc@redhat.com> | 2003-02-13 19:35:22 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-02-13 19:35:22 +0000 |
commit | 427bfd905da0f6acce66519e17ba5ccbbef19677 (patch) | |
tree | 8a5564eed18692cc3483ffc495922487de617127 /bfd | |
parent | fcd7c7c9fd660414a8f86e4dd8733e6c1058c9f0 (diff) | |
download | fsf-binutils-gdb-427bfd905da0f6acce66519e17ba5ccbbef19677.zip fsf-binutils-gdb-427bfd905da0f6acce66519e17ba5ccbbef19677.tar.gz fsf-binutils-gdb-427bfd905da0f6acce66519e17ba5ccbbef19677.tar.bz2 |
(elf32_thumb_to_arm_stub): Include section VMAs in computation of offset to
insert into BL instruction.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.h | 17 |
2 files changed, 15 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f58ec79..f5c91e5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-02-13 Nick Clifton <nickc@redhat.com> + + * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs + in computation of offset to insert into BL instruction. + 2003-02-11 Uwe Stieber <uwe@wwws.de> * config.bfd: Add support for kaOS as cross build target system. diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index effe7e6..509b481 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -929,13 +929,16 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section, BFD_ASSERT (my_offset <= globals->thumb_glue_size); - /* Now go back and fix up the original BL insn to point - to here. */ - ret_offset = (s->output_offset - + my_offset - - (input_section->output_offset - + offset + addend) - - 8); + /* Now go back and fix up the original BL insn to point to here. */ + ret_offset = + /* Address of where the stub is located. */ + (s->output_section->vma + s->output_offset + my_offset) + /* Address of where the BL is located. */ + - (input_section->output_section->vma + input_section->output_offset + offset) + /* Addend in the relocation. */ + - addend + /* Biassing for PC-relative addressing. */ + - 8; tmp = bfd_get_32 (input_bfd, hit_data - input_section->vma); |