Blame SOURCES/binutils-rh1406430.patch

d9d3dc
--- binutils.orig/bfd/elf64-s390.c	2017-01-06 10:25:00.803925177 +0000
d9d3dc
+++ binutils-2.25.1/bfd/elf64-s390.c	2017-01-06 10:26:29.124842261 +0000
d9d3dc
@@ -2690,6 +2690,19 @@ elf_s390_relocate_section (bfd *output_b
d9d3dc
 	case R_390_PC64:
d9d3dc
 
d9d3dc
 	  if (h != NULL
d9d3dc
+	      && info->pie
d9d3dc
+	      && !h->def_regular)
d9d3dc
+	    {
d9d3dc
+	      _bfd_error_handler (_("%B: `%s' non-PLT reloc for symbol defined "
d9d3dc
+				    "in shared library and accessed "
d9d3dc
+				    "from executable "
d9d3dc
+				    "(rebuild file with -fPIC ?)"),
d9d3dc
+				  input_bfd, h->root.root.string);
d9d3dc
+	      bfd_set_error (bfd_error_bad_value);
d9d3dc
+	      return FALSE;
d9d3dc
+	    }
d9d3dc
+
d9d3dc
+	  if (h != NULL
d9d3dc
 	      && s390_is_ifunc_symbol_p (h)
d9d3dc
 	      && h->def_regular)
d9d3dc
 	    {