Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify ARM64 thunktemplates.S to make it work with GNU ld (#77275)
Currently the ld linker links incorrectly the compiled thunktemplates.S for ARM64 and puts wrong offsets into all the LDR instructions. Only the LLVM lld linker works correctly. I have looked into it and it turns out the assembler was putting in relocations that the linker then replaced by fixed offsets. That's where the GNU ld made the mistake. I have figured out a slight modification of expressing the addresses in the data page referenced by those LDR instructions so that the assembler doesn't produce any relocs and so the linker cannot cause any problems.
- Loading branch information