PR ld/15323
[binutils-gdb.git] / bfd / elf32-iq2000.c
index 8cf47758e3099415c0b06e6eb0e216b747b0473f..3a90a996982b9a297d55b810ba0996d9231bb25e 100644 (file)
@@ -478,6 +478,10 @@ iq2000_elf_check_relocs (bfd *abfd,
          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;
        }
 
       switch (ELF32_R_TYPE (rel->r_info))