[PATCH] D97438: [lld-macho] Change loadReexport to handle the case where a TAPI re-exports to reference documents nested within other TBD.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 20:57:17 PST 2021


oontvoo created this revision.
oontvoo added reviewers: int3, jyknight.
Herald added subscribers: cishida, hiraditya.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
oontvoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently, it was delibrately impleneted to not handle this case, but as it has turnt out, we need this feature.
The concrete use case is

  `System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa` reexports
          /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit , which then rexports
               /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation

OPEN-ISSUE:

Haven't been able to write a good test for this. The test checked in here, ideally, should have failed with errors like `lld: error: unable to locate re-export with install name <path to the second-level dylib>`

Unfortunately, it kept failing with "undefined symbols". Can someone tell me what I did wrong in the test?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97438

Files:
  lld/MachO/Driver.cpp
  lld/MachO/Driver.h
  lld/MachO/DriverUtils.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/InputFiles.h
  lld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd
  lld/test/MachO/reexport-nested-lib.s
  llvm/include/llvm/TextAPI/MachO/InterfaceFile.h
  llvm/lib/TextAPI/MachO/InterfaceFile.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97438.326276.patch
Type: text/x-patch
Size: 13464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210225/3b0bcf1a/attachment.bin>


More information about the llvm-commits mailing list