upleb.uk

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

summaryrefslogtreecommitdiff
path: root/docs/d3d12_command_objects.md
diff options
context:
space:
mode:
authorAyinaki <ayinakidev@gmail.com>2026-11-21 18:48:36 +0000
committerAyinaki <ayinakidev@gmail.com>2026-11-21 19:00:06 +0000
commit126062ae4a8831a564b9e3042684657c58781bef (patch)
tree1a276cc6d4aeeccd84841d275d150d58f76a4fd4 /docs/d3d12_command_objects.md
parent2a732e0881cd20e7c63ba5ced7489cc5e97bc8e1 (diff)
Runtime: initialise a loaded module's TLS and DllMain
Mapping an image never ran anything. TLS callbacks and DllMain were documented as the caller's, and nothing called them, so a module that needs either could not be brought up at all. Loader::initialise() now allocates the module's TLS slot, copies the template and SizeOfZeroFill into it, writes the slot index into the image, runs the TLS callbacks with DLL_PROCESS_ATTACH, then calls the entry point of a DLL as DllMain. Every address it follows is bounded like the rest of the loader: the directory, the template, the index, the callback table and each callback, with a 1 MiB ceiling on the block. Only DLLs get DllMain; an EXE's entry point has a different signature and stays the caller's to run, and --dry-run still runs nothing. The tests build an image whose TLS callback and DllMain are real machine-code stubs that store a sentinel, so they check the code actually executed rather than merely being parsed.
Diffstat (limited to 'docs/d3d12_command_objects.md')
0 files changed, 0 insertions, 0 deletions