ntdll: Don't cancel loading on IMAGE_FILE_RELOCS_STRIPPED

André Hentschel nerv at dawncrow.de
Tue Sep 7 10:47:12 CDT 2010


Am 07.09.2010 17:27, schrieb Marcus Meissner:
> On Tue, Sep 07, 2010 at 04:37:49PM +0200, André Hentschel wrote:
>> give the file a try when it only links to ordinals instead of just stopping execution here.
>> ---
>>  dlls/ntdll/virtual.c |    4 ----
>>  1 files changed, 0 insertions(+), 4 deletions(-)
>>
>> diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
>> index a42ed5f..0bd3023 100644
>> --- a/dlls/ntdll/virtual.c
>> +++ b/dlls/ntdll/virtual.c
>> @@ -1232,12 +1232,8 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
>>          const IMAGE_DATA_DIRECTORY *relocs;
>>  
>>          if (nt->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)
>> -        {
>>              WARN_(module)( "Need to relocate module from %p to %p, but there are no relocation records\n",
>>                             base, ptr );
>> -            status = STATUS_CONFLICTING_ADDRESSES;
>> -            goto error;
>> -        }
>>  
>>          TRACE_(module)( "relocating from %p-%p to %p-%p\n",
>>                          base, base + total_size, ptr, ptr + total_size );
> 
> Have you seen a program needing this? Which?
> 
> "links to ordinals" is also a wrong comment, as RELOCS are used for 
> relocation addresses within the binary itself (not imports).
> 
> Ciao, Marcus
> 
> 
When trying to run WinCE apps in my ARM tree that was a show stopper, because the mobile apps only import by ordinal for size reasons i thought.
So by your explanation i guess running such apps is really not possible unless the RELOCS are not stripped?


-- 

Best Regards, André Hentschel



More information about the wine-devel mailing list