From 658e35be8161a6f54d4690aae5bc04286db2b43d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 10 Dec 1998 09:53:41 +0000 Subject: [PATCH] Warn if two .exes conflict with each other and the second does not have relocation records. --- loader/pe_image.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/loader/pe_image.c b/loader/pe_image.c index 674719719e0..a9a7c724863 100644 --- a/loader/pe_image.c +++ b/loader/pe_image.c @@ -724,7 +724,18 @@ static BOOL32 PE_MapImage( PDB32 *process,WINE_MODREF *wm, OFSTRUCT *ofs, DWORD if(nt_header->OptionalHeader.DataDirectory[15].Size) FIXME(win32,"Unknown directory 15 ignored\n"); - if(pem->pe_reloc) do_relocations(wm); + if(wm->module!=nt_header->OptionalHeader.ImageBase) { + if (pem->pe_reloc) + do_relocations(wm); + else { + /* FIXME: we could return before the second VirtualAlloc ... */ + FIXME(win32, + "Had to relocate %s, but without relocation records (%s), continuing. (But expect crash now).\n", + ofs->szPathName, + (nt_header->FileHeader.Characteristics&IMAGE_FILE_RELOCS_STRIPPED)?"stripped during link":"unknown reason" + ); + } + } if(pem->pe_export) { dump_exports(wm->module);