diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-06-02 23:51:26 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-06-02 23:51:26 +0000 |
commit | cd779d0139238c88c1bfbabea5fabaa087905aec (patch) | |
tree | 6eff405b7f8c05fd24fa6b61a8d4ae72334962d7 /bfd/sunos.c | |
parent | e4125bb4d950429510bdddf4e519bc0ba1b4edd9 (diff) | |
download | gdb-cd779d0139238c88c1bfbabea5fabaa087905aec.zip gdb-cd779d0139238c88c1bfbabea5fabaa087905aec.tar.gz gdb-cd779d0139238c88c1bfbabea5fabaa087905aec.tar.bz2 |
Get the address of Sun3 dynamic relocs right.
Diffstat (limited to 'bfd/sunos.c')
-rw-r--r-- | bfd/sunos.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/sunos.c b/bfd/sunos.c index 7039d74..9740cdd 100644 --- a/bfd/sunos.c +++ b/bfd/sunos.c @@ -1731,6 +1731,10 @@ sunos_write_dynamic_symbol (output_bfd, info, harg) s = bfd_get_section_by_name (sunos_hash_table (info)->dynobj, ".dynrel"); BFD_ASSERT (s != NULL); + r_address = (h->root.root.u.def.section->output_section->vma + + h->root.root.u.def.section->output_offset + + h->root.root.u.def.value); + switch (bfd_get_arch (output_bfd)) { case bfd_arch_sparc: @@ -1748,6 +1752,7 @@ sunos_write_dynamic_symbol (output_bfd, info, harg) bfd_put_16 (output_bfd, M68K_PLT_ENTRY_WORD0, p); bfd_put_32 (output_bfd, (- (h->root.root.u.def.value + 2)), p + 2); bfd_put_16 (output_bfd, s->reloc_count, p + 6); + r_address += 2; break; default: @@ -1756,9 +1761,6 @@ sunos_write_dynamic_symbol (output_bfd, info, harg) /* We also need to add a jump table reloc. */ p = s->contents + s->reloc_count * obj_reloc_entry_size (output_bfd); - r_address = (h->root.root.u.def.section->output_section->vma - + h->root.root.u.def.section->output_offset - + h->root.root.u.def.value); if (obj_reloc_entry_size (output_bfd) == RELOC_STD_SIZE) { struct reloc_std_external *srel; |