[all-commits] [llvm/llvm-project] 652713: [MachO][ObjCopy] Handle exports trie in LC_DYLD_IN...

Daniel Rodríguez Troitiño via All-commits all-commits at lists.llvm.org
Tue Nov 22 18:51:51 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 652713e268d86a79c9a2935fb4ed7207bd0f0d1c
      https://github.com/llvm/llvm-project/commit/652713e268d86a79c9a2935fb4ed7207bd0f0d1c
  Author: Daniel Rodríguez Troitiño <danielrodriguez at fb.com>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M llvm/lib/ObjCopy/MachO/MachOLayoutBuilder.cpp
    M llvm/lib/ObjCopy/MachO/MachOReader.cpp
    M llvm/lib/ObjCopy/MachO/MachOWriter.cpp
    A llvm/test/tools/llvm-objdump/MachO/exports-trie-lc.test

  Log Message:
  -----------
  [MachO][ObjCopy] Handle exports trie in LC_DYLD_INFO and LC_DYLD_EXPORTS_TRIE

The exports trie used to be pointed by the information in LC_DYLD_INFO,
but when chained fixups are present, the exports trie is pointed by
LC_DYLD_EXPORTS_TRIE instead.

Modify ObjCopy code to calculate the right offset and size needed
depending on the existence of LC_DYLD_INFO or LC_DYLD_EXPORTS_TRIE, read
the exports from either of those places, and write the export
information as pointed to either of those places.

Depends on D134571.

Reviewed By: alexander-shaposhnikov

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




More information about the All-commits mailing list