Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Darwin, Arm64 : Assign a register for the static chain.
At present, we do not have a workable solution for trampolines for the Darwin Arm64 port. Executable stack is not an option and the advice from Arm is not to use any lower address bits to signal that we have a descriptor. It is possible that we might be able to load some remappable object (e.g. a dylib) - but the details there still have to be resolved. In any case, we need a usable static chain - and the port has that assigned to R18 by default - which is the platform register in darwinpcs. It's uncertain whether R16/R17 are actually used in the darwinpcs in the role of support for branch islanding. The AAPCS64 use as IP0/1 is conditional on ELF relocations, so perhaps irrelevant to Darwin. Using R16 does not conflict with the existing (non-functional) trampoline code. lots of TODOs here.
- Loading branch information