Cores that used the .invisible section to store data were saving it; this was a regression from before, so PCFX states should be back down to the previous release size, or perhaps a bit smaller.
Add the ability to dirty track libco cothreads, as used in the bsnes core. This saves a lot of space in those states and they're now quite competitive in size.
some bsnes cothreads call callbacks that hit managed threads. We shouldn't do that, but we do, and sometimes those threads run MSVC's __stkchk which can, depending on circumstances, blow up if the thread extents aren't set.
This also means that we cannot save space on a lot of cothread stacks because __stkchck will blow up any detection guards we try
The waterbox system now uses host os facilities to track whether memory has been written to, to automatically choose what thing to savestate. This results in a large size decrease for some cores, like snes9x or gpgx (when running cartridge games). Doesn't do much for cores that were already memory efficient, or for bsnes because of libco compatibility issues; but those cores don't regress either.
and who said waterbox can't thread. well, it sort of can't. but it sort of can.
the speedup isn't that great, but speed is now pretty close (5%?) to snes9x in the only game that matters (final fantasy 5)
For the external cores, I simply listed whatever the release build we have right now built them with. There are other makefiles and such hanging around...
Nyma cores have to move some big complex structs on init and it's annoying and error prone. This solution is not fast, but these are one time transfers anyway, and it does keep code size and saved size down. Architecture yay.
This was benign, because libunwind will ignore a frame header it doesn't understand (__eh_frame was still fine). But now there's no spew in the console. And over the next 50 years it will save a combined 0.3 seconds of cpu time
The goal here is to provide an unwind implementation that works. We (probably) don't have a working ldso, so reconfigure libunwind to work without that. To do that, it needs __eh_frame_* variables which it can addressof to find the locations of .eh_frame and .eh_frame_hdr. There is no way I could get gold to add these at all, so switch back to ld and add a custom linkscript. The custom linkscript gives us the opportunity to simplify the savestate memory mapping stuff inside ElfLoader, which should knock a bit of time off of state loads -- those VirtualProtect calls are not cheap. This also removes a potential source of nondeterminism with certain clever out of range pointers.
Any waterbox core that I didn't recompile for this commit will assert now until it is recompiled, because .wbxsyscall is in the wrong palace.