diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-12-11 04:38:44 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-12-11 04:38:44 +0000 |
commit | 5ee8d9327b60a4b89e2dfe6a017d0867f96378af (patch) | |
tree | 98dfa402560a157f4d00a2b20924b46c180155af /bfd | |
parent | 06434f5f166690629f2d5ce14e56a7727b259ed0 (diff) | |
download | gdb-5ee8d9327b60a4b89e2dfe6a017d0867f96378af.zip gdb-5ee8d9327b60a4b89e2dfe6a017d0867f96378af.tar.gz gdb-5ee8d9327b60a4b89e2dfe6a017d0867f96378af.tar.bz2 |
* elflink.h (elf_link_input_bfd): Handle a relocateable link in
which a relocation refers to an indirect or warning symbol.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 25 | ||||
-rw-r--r-- | bfd/elflink.h | 12 |
2 files changed, 34 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d4c8bb3..e8fc13f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,30 @@ +Wed Dec 10 23:37:11 1997 Ian Lance Taylor <ian@cygnus.com> + + * elflink.h (elf_link_input_bfd): Handle a relocateable link in + which a relocation refers to an indirect or warning symbol. + Wed Dec 10 11:15:55 1997 Nick Clifton <nickc@cygnus.com> + * coff-arm.c (bfd_arm_coff_final_link): Function deleted. + (coff_arm_final_link_postscript): New function. + (coff_arm_link_output_has_begun): New function. + + * libcoff.h (struct bfd_coff_backend_data): Add new fields: + _bfd_coff_link_output_has_begun and + _bfd_coff_final_link_postscript. Add new macros: + bfd_coff_link_output_has_begun() and + bfd_coff_final_link_postscript(). + + * cofflink.c (_bfd_coff_final_link): Insert calls to + bfd_coff_link_output_has_begun() and + bfd_coff_final_link_postscript(). + + * coffcode.h: Add two new fields to bfd_coff_backend_data + structure: _bfd_coff_link_output_has_begun and + _bfd_coff_final_link_postscript. Add default initialisers for + these fields. Add overridable aliases for the coff swap functions + in the backend data structure. + * elf32-v850.c: Update with patches from the branch to fix HI16_S/LO16 reloc pairs. diff --git a/bfd/elflink.h b/bfd/elflink.h index 711372d..7a9e33b 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -4731,6 +4731,7 @@ elf_link_input_bfd (finfo, input_bfd) || (elf_bad_symtab (input_bfd) && finfo->sections[r_symndx] == NULL)) { + struct elf_link_hash_entry *rh; long indx; /* This is a reloc against a global symbol. We @@ -4741,13 +4742,18 @@ elf_link_input_bfd (finfo, input_bfd) for this symbol. The symbol index is then set at the end of elf_bfd_final_link. */ indx = r_symndx - extsymoff; - *rel_hash = elf_sym_hashes (input_bfd)[indx]; + rh = elf_sym_hashes (input_bfd)[indx]; + while (rh->root.type == bfd_link_hash_indirect + || rh->root.type == bfd_link_hash_warning) + rh = (struct elf_link_hash_entry *) rh->root.u.i.link; /* Setting the index to -2 tells elf_link_output_extsym that this symbol is used by a reloc. */ - BFD_ASSERT ((*rel_hash)->indx < 0); - (*rel_hash)->indx = -2; + BFD_ASSERT (rh->indx < 0); + rh->indx = -2; + + *rel_hash = rh; continue; } |