Author: fireball Date: Sun Mar 27 11:32:55 2011 New Revision: 51171
URL: http://svn.reactos.org/svn/reactos?rev=51171&view=rev Log: [NTOS/MM] - Return STATUS_IMAGE_NOT_AT_BASE when mapping an image section to a different base address. New ntdll loader depends on this and fails to relocate the image if this status is not returned.
Modified: trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/section.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=5... ============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Sun Mar 27 11:32:55 2011 @@ -4571,6 +4571,7 @@ PMMSUPPORT AddressSpace; ULONG ViewOffset; NTSTATUS Status = STATUS_SUCCESS; + BOOLEAN NotAtBase = FALSE;
if ((ULONG_PTR)SectionObject & 1) { @@ -4652,6 +4653,8 @@ MmUnlockAddressSpace(AddressSpace); return(STATUS_UNSUCCESSFUL); } + /* Remember that we loaded image at a different base address */ + NotAtBase = TRUE; }
for (i = 0; i < NrSegments; i++) @@ -4756,7 +4759,12 @@
MmUnlockAddressSpace(AddressSpace);
- return(STATUS_SUCCESS); + if (NotAtBase) + Status = STATUS_IMAGE_NOT_AT_BASE; + else + Status = STATUS_SUCCESS; + + return Status; }
/*