[lld] [lld-macho]Fix bug in finding "chained" re-exported libs. (PR #135241)

Vy Nguyen via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 28 10:15:39 PDT 2025


================

----------------
oontvoo wrote:

Done - updated the test to have a main which references the re-exported symbols.
W/o the change in this patch, the test failed with sth like this:


```
ld64.lld: error: /usr/local/google/home/vyng/repo/lld/oontvoo/llvm-project/build_lld/tools/lld/test/MachO/Output/reexport-with-rpath.s.tmp/aa/two/three/libAee.dylib: unable to locate re-export with install name @rpath/two/three/libBee.dylib
ld64.lld: error: undefined symbol: _b_func
>>> referenced by /usr/local/google/home/vyng/repo/lld/oontvoo/llvm-project/build_lld/tools/lld/test/MachO/Output/reexport-with-rpath.s.tmp/main.o:(symbol _main+0x6)
>>> did you mean: _a_func
>>> defined in: /usr/local/google/home/vyng/repo/lld/oontvoo/llvm-project/build_lld/tools/lld/test/MachO/Output/reexport-with-rpath.s.tmp/aa/two/three/libAee.dylib

ld64.lld: error: undefined symbol: _c_func
>>> referenced by /usr/local/google/home/vyng/repo/lld/oontvoo/llvm-project/build_lld/tools/lld/test/MachO/Output/reexport-with-rpath.s.tmp/main.o:(symbol _main+0x1)
>>> did you mean: _a_func
>>> defined in: /usr/local/google/home/vyng/repo/lld/oontvoo/llvm-project/build_lld/tools/lld/test/MachO/Output/reexport-with-rpath.s.tmp/aa/two/three/libAee.dylib

--

********************
********************
Failed Tests (1):
  lld :: MachO/reexport-with-rpath.s
```

https://github.com/llvm/llvm-project/pull/135241


More information about the llvm-commits mailing list