Commit 03d58b0 ("arm64-win32 support : runtime", 2026-04-04) added IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE to winnt.h, and it was later used in tccpe.c, but older tcc like 0.9.27 don't have it. So define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE is missing.
Unified · Split
| @@ -292,6 +292,11 @@ typedef struct _IMAGE_BASE_RELOCATION { · 291 unmodified lines | ||
| 292 | 292 | #endif /* ndef IMAGE_NT_SIGNATURE */ |
| 293 | 293 | /* ----------------------------------------------------------- */ |
| 294 | 294 | |
| 295 | +#ifndef IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE | |
| 296 | + /* allow self-host build with tcc 0.97 - doesn't have this in winnt.h */ | |
| 297 | + #define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040 | |
| 298 | +#endif | |
| 299 | + | |
| 295 | 300 | #pragma pack(push, 1) |
| 296 | 301 | struct pe_header |
| 297 | 302 | { |