



2015-06-01 Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* bfd/cofflink.c (_bfd_coff_generic_relocate_section): Do not ignore the
	relocation if the output section has been discarded.





diff -aprNU5 binutils-2.25.orig/bfd/cofflink.c binutils-2.25/bfd/cofflink.c
--- binutils-2.25.orig/bfd/cofflink.c	2015-06-04 12:57:58 +0000
+++ binutils-2.25/bfd/cofflink.c	2015-06-04 15:40:26 +0000
@@ -2977,13 +2977,18 @@ _bfd_coff_generic_relocate_section (bfd
 	    }
 	  else
 	    {
 	      sec = sections[symndx];
 
+	      /* This does not work for the DJGPP port of binutils-2.25.
+	         As soon as this issue has been fixed in the master branch
+	         it will be removed in the next DJGPP port.  */
+#ifndef __DJGPP__
 	      /* If the output section has been discarded then ignore this reloc.  */
 	      if (sec->output_section->vma == 0)
 		continue;
+#endif
 
               val = (sec->output_section->vma
 		     + sec->output_offset
 		     + sym->n_value);
 	      if (! obj_pe (input_bfd))
