PATCH: PR 440: i386/COFF linker is broken

H. J. Lu hjl@lucon.org
Wed Oct 13 18:17:00 GMT 2004
sofar may be long long and vma unsigned long. I checked in this patch
to fix PR 440.


H.J.
---
2004-10-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR 440
	* coffcode.h (coff_compute_section_file_positions): Cast to
	bfd_vma when computing page alignment.

--- bfd/coffcode.h.coff	2004-10-08 07:53:56.000000000 -0700
+++ bfd/coffcode.h	2004-10-13 11:09:55.039081748 -0700
@@ -3243,7 +3243,7 @@ coff_compute_section_file_positions (abf
 #ifdef COFF_PAGE_SIZE
       if ((abfd->flags & D_PAGED) != 0
 	  && (current->flags & SEC_ALLOC) != 0)
-	sofar += (current->vma - sofar) % page_size;
+	sofar += (current->vma - (bfd_vma) sofar) % page_size;
 #endif
       current->filepos = sofar;
 



More information about the Binutils mailing list