From 2ebffe31b57e7fe73ea8dbd60f3330da1f780243 Mon Sep 17 00:00:00 2001
From: Nagaraju Mekala <nmekala@xilix.com>
Date: Sun, 30 Sep 2018 17:06:58 +0530
Subject: [PATCH 18/38] Fixing the branch related issues

Conflicts:
	bfd/elf64-microblaze.c
---
 bfd/elf64-microblaze.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c
index 010ee1d15b4..f68fc344c1a 100644
--- a/bfd/elf64-microblaze.c
+++ b/bfd/elf64-microblaze.c
@@ -2521,6 +2521,9 @@ microblaze_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_regular = 1;
 	}
 
       switch (r_type)
-- 
2.17.1

