upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/tiny_game_exit_code_test.cpp
diff options
context:
space:
mode:
authorjakeefr <jakeefr@users.noreply.github.com>2026-11-22 09:44:09 +0000
committerjakeefr <jakeefr@users.noreply.github.com>2026-11-22 10:00:48 +0000
commit32c2a232998ced3631813f4078d6b233ae677f97 (patch)
treed1a1058801b11377e7f9666014b037ff5aa221ea /runtime/test/tiny_game_exit_code_test.cpp
parentc0ac5fd6518b3ba9fa66765b8b07099990dadd74 (diff)
pe_inspect: honour NumberOfRvaAndSizes, map RVAs by virtual span, read long import names
Three places where the report on an image could be wrong, each reproduced with a synthetic image: - Data directories: all 16 slots were read whatever NumberOfRvaAndSizes said, so stale bytes past the count showed up as .pdata functions, TLS callbacks or a relocation directory (has_relocs decides whether the image can load away from its preferred base). A slot past the count is now empty, as in runtime/src/pe_loader.cpp. - RVA to file offset: a section's span was max(VirtualSize, SizeOfRawData), so a section whose raw data is longer than the span to the next one answered the next section's RVAs from its own raw tail. The span is VirtualSize (SizeOfRawData when that is 0), as the loader maps it. - Names stopped at 512 characters: a longer decorated import name became "?", and a DLL with a longer name lost its entry. The bound is 4,096 characters. tests/test_pe_inspect.py: nine new tests, seven of which fail on the old code. No game files; synthetic images only.
Diffstat (limited to 'runtime/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions