ld: library not found for -lSystem

Hello,

I am trying to compile arm64 assembly, but the linker tells me that libSystem.dylib can not be found.

Is this due to system libraries no longer present on the system (I don't have a 11.0 x86_64 system to compare), or am I doing it wrong?

My call is

ld -o HelloWorld HelloWorld.o -macosx_version_min 11.0 -lSystem
For starters, -static solves that. However, the executable crashes:

Code Block .global start // Provide program starting address to linker
// Setup the parameters to print hello world
// and then call the Kernel to do it.
start: mov X0, #1 // 1 = StdOut
ldr X1, =helloworld // string to print
mov X2, #13 // length of the string
mov X16, #4 // Mach write system call 4
svc 80 // Call Mach to output the string
// Setup the parameters to exit the program
// and then call the Kernel to do it.
mov X0, #0 // Use 0 return code
mov X8, #1 // Service command code 1 terminates this program
svc 80 // Call Mach to terminate the program
.data
helloworld: .ascii "Hello World!\n"

I have put my current results at https://github.com/below/HelloSilicon.

It would be cool if anyone had an Idea how that would work without a C-Wrapper
ld: library not found for -lSystem
 
 
Q