-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lld-macho] Use DO_BIND_ADD_ADDR_IMM_SCALED for bind opcodes
Implement pass 3 of bind opcodes from ld64 (which supports both 32-bit and 64-bit). Pass 3 implementation condenses BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB opcode to BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED. This change is already behind an O2 flag so it shouldn't impact current performance. I verified ld64's output with x86_64 LLD and they were both emitting the same optimized bind opcodes (although in a slightly different order). Tested with arm64_32 LLD and compared that with x86 LLD that the order of the bind opcodes are the same (offset values are different which should be expected). Reviewed By: int3, #lld-macho Differential Revision: https://reviews.llvm.org/D106128
- Loading branch information
1 parent
de3ea51
commit 321b2be
Showing
2 changed files
with
126 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters