mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 01:16:06 +00:00

This patch implements `-objc_stubs_small` targeting arm64, aiming to align with ld64's behavior. 1. `-objc_stubs_fast`: As previously implemented, this always uses the Global Offset Table (GOT) to invoke `objc_msgSend`. The alignment of the objc stub is 32 bytes. 2. `-objc_stubs_small`: This behavior depends on whether `objc_msgSend` is defined. If it is, it directly jumps to `objc_msgSend`. If not, it creates another stub to indirectly jump to `objc_msgSend`, minimizing the size. The alignment of the objc stub in this case is 4 bytes.