Get the latest tech news
An Introduction to ARM64 Assembly on Apple Silicon Macs
An introduction to ARM64 assembly on Apple Silicon Macs - below/HelloSilicon
In order to keep the sample both as close as possible to the book, and to allow it's use within the C-Sample from Chapter 3, I opted to keep_start and tell the linker that this is the entry point we want to use-arch arm64 for good measure, let's throw in the option to cross-compile this from an Intel Mac. Besides the common changes, we face a new issue which is described in the book in Chapter 5: Darwin does not like LDR X1, =symbol, it will produce the error ld: Absolute addressing not allowed in arm64 code. While we are using the LLVM toolchain, in assembly — including inline-assembly — all safety checks are off so we must take extra precautions and specifically declare the forward label local.
Or read this on Hacker News