diff options
author | Alan Modra <amodra@gmail.com> | 2011-07-14 03:57:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-07-14 03:57:18 +0000 |
commit | ec24dc88099d9b8f59ee6884697cf8a15a4da727 (patch) | |
tree | 19c429bf7bfb3de69ce8544c34a208bbf5cfdb02 /bfd/elflink.c | |
parent | 9df0ef5fe7ecd8bd8dc591ea3bdb2d3fb089d710 (diff) | |
download | gdb-ec24dc88099d9b8f59ee6884697cf8a15a4da727.zip gdb-ec24dc88099d9b8f59ee6884697cf8a15a4da727.tar.gz gdb-ec24dc88099d9b8f59ee6884697cf8a15a4da727.tar.bz2 |
* elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
(_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index dc3840e..2e592f5 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2517,7 +2517,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, struct elf_link_hash_entry *weakdef; weakdef = h->u.weakdef; - if (h->root.type == bfd_link_hash_indirect) + while (h->root.type == bfd_link_hash_indirect) h = (struct elf_link_hash_entry *) h->root.u.i.link; BFD_ASSERT (h->root.type == bfd_link_hash_defined @@ -2621,12 +2621,12 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) if (h->u.weakdef != NULL) { - /* If we get to this point, we know there is an implicit - reference by a regular object file via the weak symbol H. - FIXME: Is this really true? What if the traversal finds - H->U.WEAKDEF before it finds H? */ + /* If we get to this point, there is an implicit reference to + H->U.WEAKDEF by a regular object file via the weak symbol H. */ h->u.weakdef->ref_regular = 1; + /* Ensure that the backend adjust_dynamic_symbol function sees + H->U.WEAKDEF before H by recursively calling ourselves. */ if (! _bfd_elf_adjust_dynamic_symbol (h->u.weakdef, eif)) return FALSE; } |