[all-commits] [llvm/llvm-project] f1e4e2: [lld][MachO] Refactor handling of subsections

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Wed Mar 31 16:53:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f1e4e2fb204d24a62cc7eff912bcda08c4030977
      https://github.com/llvm/llvm-project/commit/f1e4e2fb204d24a62cc7eff912bcda08c4030977
  Author: Alexander Shaposhnikov <alexshap at fb.com>
  Date:   2021-03-31 (Wed, 31 Mar 2021)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/InputFiles.h
    M lld/MachO/Relocations.h

  Log Message:
  -----------
  [lld][MachO] Refactor handling of subsections

This diff is a preparation for fixing FunStabs (incorrect size calculation).
std::map<uint32_t, InputSection*> (SubsectionMap) is replaced with
a sorted vector + binary search. If .subsections_via_symbols is set
this vector will contain the list of subsections, otherwise,
the offsets will be used for calculating the symbols sizes.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D98837




More information about the All-commits mailing list