[all-commits] [llvm/llvm-project] 77e204: [lld-macho][arm64] implement -objc_stubs_small (#7...
Kyungwoo Lee via All-commits
all-commits at lists.llvm.org
Tue Jan 23 07:31:47 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 77e204c7b04f1f516db9a1dd5602e4a853bb0d1c
https://github.com/llvm/llvm-project/commit/77e204c7b04f1f516db9a1dd5602e4a853bb0d1c
Author: Kyungwoo Lee <kyulee at meta.com>
Date: 2024-01-23 (Tue, 23 Jan 2024)
Changed paths:
M lld/MachO/Arch/ARM64.cpp
M lld/MachO/Arch/ARM64Common.h
M lld/MachO/Arch/ARM64_32.cpp
M lld/MachO/Arch/X86_64.cpp
M lld/MachO/Driver.cpp
M lld/MachO/SyntheticSections.cpp
M lld/MachO/SyntheticSections.h
M lld/MachO/Target.h
A lld/test/MachO/arm64-objc-stubs-dyn.s
M lld/test/MachO/arm64-objc-stubs.s
M lld/test/MachO/x86-64-objc-stubs.s
Log Message:
-----------
[lld-macho][arm64] implement -objc_stubs_small (#78665)
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.
More information about the All-commits
mailing list