I just added ad-hoc code signing to the new LLD MachO port: https://reviews.llvm.org/D96164
Observe what happens for a simple “hello world” test program:
-
Build with ld64.lld.darwinnew
-
Attempt to run. It dies immediately with SIGKILL
-
Wait a few hours
-
The same program now runs
-
Rebuild as in step (1). cmp(1) says it is byte-for-byte identical with the program built at step (1).
-
Attempt to run. It dies immediately with SIGKILL
-
Use cp(1) to copy the program built in step (5)
-
The step (5) program continues to die with SIGKILL, while the copy from step (7) runs
WTF?!
G