Blame SOURCES/binutils-2.27-s390x-complain-missing-fPIC.patch

be6651
--- binutils.orig/bfd/elf64-s390.c	2017-08-11 11:09:23.264667227 +0000
be6651
+++ binutils-2.27/bfd/elf64-s390.c	2017-08-11 11:15:07.510029088 +0000
be6651
@@ -2745,6 +2745,19 @@ elf_s390_relocate_section (bfd *output_b
be6651
 	case R_390_PC32:
be6651
 	case R_390_PC32DBL:
be6651
 	case R_390_PC64:
be6651
+	  if (h != NULL
be6651
+	      && bfd_link_pie (info)
be6651
+	      && !h->def_regular)
be6651
+	    {
be6651
+	      _bfd_error_handler (_("%B: `%s' non-PLT reloc for symbol defined "
be6651
+				        "in shared library and accessed "
be6651
+				        "from executable "
be6651
+				        "(rebuild file with -fPIC ?)"),
be6651
+				    input_bfd, h->root.root.string);
be6651
+	      bfd_set_error (bfd_error_bad_value);
be6651
+	      return FALSE;
be6651
+	    }
be6651
+
be6651
 	  /* The target of these relocs are instruction operands
be6651
 	     residing in read-only sections.  We cannot emit a runtime
be6651
 	     reloc for it.  */