Hell yeah. Working with Sega Saturn homebrew stuff, got executable overlays working!
Basically: the game code is split into a main "kernel" executable, and then several "overlay" executables. The link script defines all of these overlay sections to reside at the same region in memory, but omits them from the main binary (my makefile instead manually extracts them from the ELF and emits separate binaries for each one)
Then at runtime, the kernel just ensures that the correct overlay binary is loaded into the shared region in memory before it calls into that code.
#gamedev #homebrewgames #SEGASaturn #programming