PRB: Module Relocation Fixups in Shared Sections Cause Problem

Article translations Article translations
Article ID: 137235 - View products that this article applies to.
This article was previously published under Q137235
Expand all | Collapse all

SYMPTOMS

If a shared section in a 32-bit PE module contains relocation fixups, those fixups are applied to all instances of that shared section. This implies that all instances of a module with such a section must be loaded at the module's preferred image base; otherwise, the resulting relocated values will be invalid. This is true in both Windows 95 and Windows NT.

CAUSE

Because an explicitly shared section shares the same physical pages with all instances of that module, fixups that are applied in a second or subsequent instance of the module overwrite the values from the first instance. The resulting values will be invalid for either one or all instances.

RESOLUTION

Do not place relocatable values in a shared section. A module can be forced to be non-relocatable by removing fixup records, although this may result in load failures for that module if it can't be loaded at its preferred address.

STATUS

This behavior is by design.

MORE INFORMATION

An example of something that causes a relocation fixup is a pointer in a shared section. Storing hInstance variables in a shared section is another.

Properties

Article ID: 137235 - Last Review: July 11, 2005 - Revision: 1.1
APPLIES TO
  • Microsoft Platform Software Development Kit-January 2000 Edition
Keywords: 
KB137235

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com