[all-commits] [llvm/llvm-project] 33ab99: Recommit "[lld-macho] Use DO_BIND_ADD_ADDR_IMM_SCA...

Vincent Lee via All-commits all-commits at lists.llvm.org
Tue Jul 20 13:46:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 33ab995617d02be3bca00514584c568560d2fbb3
      https://github.com/llvm/llvm-project/commit/33ab995617d02be3bca00514584c568560d2fbb3
  Author: Vincent Lee <leevince at fb.com>
  Date:   2021-07-20 (Tue, 20 Jul 2021)

  Changed paths:
    M lld/MachO/SyntheticSections.cpp
    M lld/test/MachO/bind-opcodes.s

  Log Message:
  -----------
  Recommit "[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, MaskRay

Differential Revision: https://reviews.llvm.org/D106128




More information about the All-commits mailing list