fix: suppress MinGW auto-export to resolve Windows DLL ordinal overflow
Add src-tauri/.cargo/config.toml with --exclude-all-symbols linker flag for x86_64-pc-windows-gnu. MinGW auto-exports ~106k public Rust symbols into the cdylib export table, exceeding the 65,535 PE ordinal limit. The desktop binary links against rlib (static) so the cdylib export table is unused. An empty export table is a valid DLL. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
39dc65d91b
commit
2026bdb3da
@ -246,6 +246,20 @@ docker volume rm $(docker volume ls -q | grep '0_')
|
||||
docker restart woodpecker_agent
|
||||
```
|
||||
|
||||
### Windows DLL Export Ordinal Too Large
|
||||
`/usr/bin/x86_64-w64-mingw32-ld: error: export ordinal too large: 106290`
|
||||
|
||||
MinGW's `ld` auto-exports ALL public Rust symbols into the DLL export table. With a
|
||||
large dependency tree (~106k symbols), this exceeds the 65,535 PE ordinal limit.
|
||||
|
||||
Fix: `src-tauri/.cargo/config.toml` tells `ld` to suppress auto-export:
|
||||
```toml
|
||||
[target.x86_64-pc-windows-gnu]
|
||||
rustflags = ["-C", "link-arg=-Wl,--exclude-all-symbols"]
|
||||
```
|
||||
The desktop `main.exe` links against `rlib` (static), so the cdylib export table is
|
||||
unused at runtime. An empty export table is valid for a DLL.
|
||||
|
||||
### Gogs OAuth2 Limitation
|
||||
Gogs 0.14 has no OAuth2 provider support, blocking upgrade to Woodpecker 2.x.
|
||||
|
||||
|
||||
6
src-tauri/.cargo/config.toml
Normal file
6
src-tauri/.cargo/config.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[target.x86_64-pc-windows-gnu]
|
||||
# Prevent MinGW ld from auto-exporting all ~106k public symbols into the DLL
|
||||
# export table, which would exceed the 65535 ordinal limit and cause a link
|
||||
# error. The desktop binary links against rlib (static), so cdylib exports
|
||||
# are unused at runtime.
|
||||
rustflags = ["-C", "link-arg=-Wl,--exclude-all-symbols"]
|
||||
Loading…
Reference in New Issue
Block a user