diff options
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index a5ad454..317e7b2 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -7814,10 +7814,16 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, else { h = sym_hashes[r_symndx - extsymoff]; - while (h != NULL - && (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning)) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h != NULL) + { + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + /* PR15323, ref flags aren't set for references in the + same object. */ + h->root.non_ir_ref = 1; + } } /* Set CAN_MAKE_DYNAMIC_P to true if we can convert this |