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