(elf32_thumb_to_arm_stub): Include section VMAs in computation of offset to

insert into BL instruction.
This commit is contained in:
Nick Clifton
2003-02-13 19:35:22 +00:00
parent fcd7c7c9fd
commit 427bfd905d
2 changed files with 15 additions and 7 deletions

View File

@@ -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> 2003-02-11 Uwe Stieber <uwe@wwws.de>
* config.bfd: Add support for kaOS as cross build target system. * config.bfd: Add support for kaOS as cross build target system.

View File

@@ -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); BFD_ASSERT (my_offset <= globals->thumb_glue_size);
/* Now go back and fix up the original BL insn to point /* Now go back and fix up the original BL insn to point to here. */
to here. */ ret_offset =
ret_offset = (s->output_offset /* Address of where the stub is located. */
+ my_offset (s->output_section->vma + s->output_offset + my_offset)
- (input_section->output_offset /* Address of where the BL is located. */
+ offset + addend) - (input_section->output_section->vma + input_section->output_offset + offset)
- 8); /* Addend in the relocation. */
- addend
/* Biassing for PC-relative addressing. */
- 8;
tmp = bfd_get_32 (input_bfd, hit_data tmp = bfd_get_32 (input_bfd, hit_data
- input_section->vma); - input_section->vma);