From 6b3204674fc181f9613ac62c04fc64d0c2f3ea10 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 7 Jun 2005 08:56:23 +0000 Subject: [PATCH] [project @ 2005-06-07 08:56:23 by simonmar] add filename to some error messages on mingw32 --- ghc/rts/Linker.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index cd6e03d..6f396ed 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -1730,24 +1730,25 @@ ocVerifyImage_PEi386 ( ObjectCode* oc ) + hdr->NumberOfSymbols * sizeof_COFF_symbol; if (hdr->Machine != 0x14c) { - errorBelch("Not x86 PEi386"); + errorBelch("%s: Not x86 PEi386", oc->fileName); return 0; } if (hdr->SizeOfOptionalHeader != 0) { - errorBelch("PEi386 with nonempty optional header"); + errorBelch("%s: PEi386 with nonempty optional header", oc->fileName); return 0; } if ( /* (hdr->Characteristics & MYIMAGE_FILE_RELOCS_STRIPPED) || */ (hdr->Characteristics & MYIMAGE_FILE_EXECUTABLE_IMAGE) || (hdr->Characteristics & MYIMAGE_FILE_DLL) || (hdr->Characteristics & MYIMAGE_FILE_SYSTEM) ) { - errorBelch("Not a PEi386 object file"); + errorBelch("%s: Not a PEi386 object file", oc->fileName); return 0; } if ( (hdr->Characteristics & MYIMAGE_FILE_BYTES_REVERSED_HI) /* || !(hdr->Characteristics & MYIMAGE_FILE_32BIT_MACHINE) */ ) { - errorBelch("Invalid PEi386 word size or endiannness: %d", - (int)(hdr->Characteristics)); + errorBelch("%s: Invalid PEi386 word size or endiannness: %d", + oc->fileName, + (int)(hdr->Characteristics)); return 0; } /* If the string table size is way crazy, this might indicate that -- 1.7.10.4