Commit 84a566c
committed
qemu_tcg_iret: hash the offset-table keys to shrink the binary
The uname-keyed #DE offset table had grown to 4,873 rows (~392 KiB of
fingerprint strings plus a pointer array), dwarfing the rest of the
component. Key each row on an FNV-1a-64 hash of the trimmed
"<release> <version>" instead of the string -- a packed
{ uint64_t uname_hash; uint32_t de_offset; }, with the readable uname
kept as a trailing // comment. match_de_handler hashes the runtime
fingerprint and linear-scans. Binary: 597 KiB -> 118 KiB, and the string
blob and .data.rel.ro relocations are gone.
The hash function lives in a shared include/kasld/hash.h (reused by the
other uname-keyed components), and tests/check-hash-parity recomputes
every row's key from its uname comment to assert the runtime hash, the
stored key, and per-file distinctness all agree -- so the runtime hash
and the offline generator cannot silently drift.1 parent c484381 commit 84a566c
5 files changed
Lines changed: 5152 additions & 4896 deletions
File tree
- src
- components
- include/kasld
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
612 | 613 | | |
613 | 614 | | |
614 | 615 | | |
| |||
0 commit comments