llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.69k stars 11.87k forks source link

ld64 does not load object files in frameworks #51589

Open int3 opened 3 years ago

int3 commented 3 years ago
Bugzilla Link 52247
Version unspecified
OS All
CC @gkmhub,@int3,@thevinster,@smeenai,@oontvoo

Extended Description

When loading some framework Foo, Foo.framework/Foo can be either (a symlink to) an archive or a dylib. ld64 will handle both those cases. However, if Foo is an object file, ld64 will not link it in. LLD on the other hand will do so.

Not sure this is particularly important to fix, since we handle all valid frameworks just fine, but it's worth making a note of.

oontvoo commented 3 years ago

This somehow smells very similar to the rootcause of llvm/llvm-project#50817

keith commented 2 years ago

I feel like this behavior might have changed, we're using relocatable objects in frameworks and both ld64 and lld link them? Is this specifically about symlinks? For reference tensorflow distributes their library as a framework with a relocatable object file