This also gives easier access to the current guest process structure via the thread structure, just like any kernel does for their internal structures.
This commit introduces two new kernel thread types, `KNceThread` and `Jit32Thread`.
`KNceThread`s behave like the previous kernel thread object by setting up thread state and jumping into guest code.
`KJit32Thread`s need to run guest code on a `JitCore32` object, so they perform the necessary state setup and then they also setup the jit core for executing guest code. A loop was introduced because jit execution might return when halted, either for an SVC or for preemption. In those cases the thread needs to wait to be scheduled before executing again.
The process object has also been updated to be able to create 32bit threads when running 32bit processes.
Additionally NCE's ThreadContext has been removed from DeviceState, since a thread is not an NCE thread only anymore, and IPC code has been changed to retrieve the tls region from the thread object.
CI now performs build checks on pushes to the master branch only.
For pull requests, the dev variant of the app is built and artifacts are uploaded for ease of testing and side-by-side installation. PR builds use autogenerated debug signing keys, resulting in different keys being used for each build on purpose to ensure they cannot be installed over each other, avoiding any possible conflict between two PRs.
The memory manager has been reworked to handle addresses in the guest address space, and applying an offset to get the address on the host whenever memory needs to be mapped/unmapped/reprotected.
The memory manager was incorrectly inserting chunks when the new chunk was being inserted at the beginning of the chunks map (no previous chunk available). The existing chunk was resized to an empty chunk (correctly), but the new chunk was never inserted because of `std::map::insert` skipping insertion on an already existing key.
This resulted in an empty chunk being left at the beginning of the map, causing infinite loops for code that worked by scanning the chunks map.
Usages of `std::map::operator[]` have also been replaced with the safer `insert_or_assign`.
dynsym is not hardcoded to handle Elf64_Sym only anymore, and a templated ResolveSymbol function has been introduced to easily support Elf32_Sym lookup in the future.
Starting from version 26+, the NDK is based on LLVM 17 and comes with Clang 17 featuring full language and library C++20 support.
This means we can get rid of the massive LLVM submodule in the repo, which will be done in a following commit.
Version code uses the number of commits until the last tag.
Version name uses the tag name if HEAD is a tag, otherwise it uses the last tag name followed by the branch name and the short commit hash.