PR ld/15323
[binutils-gdb.git] / bfd / elf-m10300.c
index ffd873d7b3d24e4b422d1f6b4eb5616bf9e70084..c0a9309b7fff2c1800890e2a6941ff06f049140c 100644 (file)
@@ -1084,6 +1084,10 @@ mn10300_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;
        }
 
       r_type = ELF32_R_TYPE (rel->r_info);