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

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