Skip to content

Commit 84a566c

Browse files
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

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ lint :
609609
@$(TEST_DIR)/check-component-output
610610
@$(TEST_DIR)/check-component-meta
611611
@$(TEST_DIR)/check-live-probes
612+
@$(TEST_DIR)/check-hash-parity
612613
@$(TEST_DIR)/check-text-floor
613614
@$(TEST_DIR)/check-text-region
614615
@$(TEST_DIR)/check-confidence-floor

0 commit comments

Comments
 (0)