| Previous | Next |
| ERROR_RING2SEG_MUST_BE_MOVABLE | ERROR_INFLOOP_IN_RELOC_CHAIN |
ERROR_RELOC_CHAIN_XEEDS_SEGLIM
What ERROR_RELOC_CHAIN_XEEDS_SEGLIM means
ERROR_RELOC_CHAIN_XEEDS_SEGLIM is Win32 system error code associated with the documented message: “The operating system cannot run %1.” The significant condition is that a relocation chain extends beyond the bounds of the segment it is supposed to fix up.
Relocation processing adjusts addresses when the image is placed in memory. With this result, a malformed chain is an image-integrity problem: the loader cannot safely guess which fixups were intended.
Likely causes
- the relocation table is corrupt or truncated
- a packer or patcher changed segment offsets without rebuilding relocation chains
- storage corruption altered a relocation link or segment length
Troubleshooting steps
- Validate every relocation-chain offset against its segment size
- Compare relocation tables with a known-good executable
- remove post-link transformation and rebuild the artifact
Code-specific investigation notes
Every relocation location must lie inside the segment being fixed. Once a chain crosses that boundary, following it could overwrite unrelated loader memory.
A safe validator stops at the first out-of-range link and reports the previous valid record, segment size, and offending offset.
If a custom patcher is involved, verify its behavior when segment alignment changes; unchanged logical offsets can become invalid after repacking.
Example
A post-build packer rewrites a legacy executable. The packaged file copies successfully, but its relocation data is inconsistent and startup stops with it.
Difference from related errors
ERROR_INFLOOP_IN_RELOC_CHAIN detects a cyclic relocation chain; it detects a chain that escapes the segment boundary.
References
Looking for a different code? Search another status or error code.