upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/src/tls_host.cpp
diff options
context:
space:
mode:
authorAyinaki <ayinakidev@gmail.com>2026-11-21 19:40:33 +0000
committerAyinaki <ayinakidev@gmail.com>2026-11-21 19:56:27 +0000
commitff573ee55ecc402ca2a4242f3b9a43edbb146638 (patch)
tree2d93c861dec8e30d685fb722ff7390711ad96c58 /runtime/src/tls_host.cpp
parent4c75ce537add406b426d0a1dc84d9a01fb4c86c9 (diff)
loader: follow forwarded exports and validate delay-import descriptors
parse_exports stored base + RVA for every export, but an export whose RVA lands inside the export directory is a forwarder string ("KERNEL32.Sleep"), not code, so an import of one received a pointer into the string. Forwarders are now recorded separately and followed when an import asks for one: bundled modules first, then LoadLibraryEx/GetProcAddress for system DLLs, with a depth cap so two modules re-exporting each other stop instead of recursing. An unresolvable forwarder records the import as unimplemented. The delay-import walk also assumed every descriptor is RVA-based and has a name table. A descriptor without dlattrRva stores 32-bit virtual addresses, which cannot address an x64 image base, so it is rejected with a message instead of being misread. A missing address table is rejected, and a missing name table now reads its entries back through the address table.
Diffstat (limited to 'runtime/src/tls_host.cpp')
0 files changed, 0 insertions, 0 deletions