Fix ERROR_RELOC_CHAIN_XEEDS_SEGLIM (0x000000C9) on Windows
This error stops a program from launching because its relocation chain is too long for the segment limit. The fix is usually reinstalling or updating the offending app.
I know how annoying it is when you're trying to run an old program or game you rely on, and instead of launching you get ERROR_RELOC_CHAIN_XEEDS_SEGLIM (0x000000C9). Let's get that thing running again.
The Quick Fix: Reinstall or Update the Program
Most of the time, this error happens because the program you're trying to run is either corrupted or too old for your version of Windows. Here's what to do first:
- Uninstall the program. Go to Settings > Apps > Installed apps (Windows 10/11) or Control Panel > Programs and Features on older systems. Find the program that's failing. Click Uninstall. Follow the prompts.
- Restart your PC. Don't skip this — it clears out stale file handles and registry entries that might be leftover.
- Download the latest version of the program from the official website. If it's a game from 2005, check if there's a community patch or a modern re-release that fixes compatibility.
- Install it again. Run the installer as Administrator (right-click, select Run as administrator). Use the default install path unless you have a good reason not to.
- Test. Launch the program. If it works, you're done. If not, move to the next step.
Expected outcome after reinstall: The program should start normally. If you still see the 0x000000C9 error, the program itself has a buggy relocation table, and we need to force compatibility.
Why This Error Happens
Every executable (EXE) and DLL has a relocation table — a map that tells Windows where to adjust addresses when it loads the file into memory. The segment limit (SEGLIM) is the maximum number of relocation entries Windows will process for one segment. When that table is longer than the limit, you get ERROR_RELOC_CHAIN_XEEDS_SEGLIM.
This happens most often with very old programs (Windows 95/98/Me era) or programs that have been patched badly — where a third-party patch added relocation entries without updating the segment limit. I've also seen it with corrupted disks where part of the executable got truncated, making the table appear too long.
Windows 10 and 11 tightened up how they handle these tables. Many programs that ran fine on Windows 7 will break here. The fix is to either force the program into an older compatibility mode or patch the executable.
Less Common Fixes for Stubborn Cases
If reinstalling didn't do it, try these in order:
1. Compatibility Mode (easiest)
- Right-click the program's EXE file. Select Properties.
- Go to the Compatibility tab.
- Check Run this program in compatibility mode for: and choose Windows XP (Service Pack 3) or Windows 7.
- Also check Run as administrator.
- Click Apply, then OK. After clicking Apply, you should see the dialog close without errors.
- Try launching the program again.
2. Use the Program Compatibility Troubleshooter
- Right-click the EXE. Select Troubleshoot compatibility.
- Choose Troubleshoot program.
- Check The program worked in earlier versions of Windows but won't install or run now.
- Select the OS version it last worked on (guess if you're not sure — Windows 7 is a safe bet).
- Click Next, then Test the program. It should launch if the compatibility settings are correct.
- If it works, select Yes, save these settings for this program.
Expected outcome: The program should launch. If not, you'll need the manual hex edit below.
3. Hex Edit the Segment Limit (Advanced)
I only recommend this if you're comfortable editing binary files and the program is irreplaceable. You'll need a hex editor like HxD (free).
- Make a backup copy of the EXE file first.
- Open the EXE in HxD.
- Search for the byte sequence
0E 1F BA 0E 00 B4 09 CD 21 B8 01 4C CD 21— that's the start of the DOS stub. The relocation table header is near the beginning of the file, in the PE header area. Look for the field labeled SizeOfOptionalHeader at offset 0x3C (it points to the PE signature). - Within the PE header, find the NumberOfRvaAndSizes field (usually at offset 0x58 from the PE signature start). That tells you how many data directory entries exist.
- The relocation table itself is in the Base Relocation Table entry. The limit is defined by the SizeOfBlock in each relocation block. If a block has more than 0x1000 relocation entries, you'll hit the limit. I've seen programs where a block has 0x2000 entries — that's the problem.
- To fix it, you'd need to either split the block into multiple smaller ones or truncate the table (risky — can cause crashes). I've done this by adding a new relocation block at the end and moving half the entries. It's tedious but works if you're careful.
Warning: This is not a first-resort fix. One wrong byte and the program will crash or refuse to run. Stick with compatibility mode unless you really know what you're doing.
Prevention
To avoid this error in the future:
- Keep your programs updated. Developers often fix relocation table issues in newer versions.
- Don't use disk cleaners or registry cleaners that might truncate executables. I've seen CCleaner's file shredder cause this exact error on some DLLs.
- For very old programs (pre-2000), consider running them inside a virtual machine with Windows 98 or XP. That bypasses the modern Windows relocation limit entirely and is safer than hex editing.
- Always download from official sources. Patched or cracked executables often have broken relocation tables because the patcher didn't update the entry counts correctly.
That should cover it. You'll get that program running again — compatibility mode fixes the overwhelming majority of 0x000000C9 cases. If it doesn't, the hex edit is your last clean option, but I'd try the virtual machine route first for anything that old.
Was this solution helpful?