ntdll: Don't cancel loading on IMAGE_FILE_RELOCS_STRIPPED

Marcus Meissner meissner at suse.de
Tue Sep 7 10:27:42 CDT 2010


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



More information about the wine-devel mailing list