Commit Graph

2 Commits

Author SHA1 Message Date
nattthebear 6da864f4f7 waterbox: fix linker script putting __eh_frame_hdr_start in the wrong place
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
2020-05-25 21:02:01 -04:00
nattthebear 24286be735 Linking and unwinds
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.
2020-05-25 12:49:32 -04:00