You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
link: search for entry point in archives if no object file explicitly specified #15103
The key part is: zig ld doesn't look into the archives unless there are symbols missing in any of the object files.
I wonder if zig ld should perhaps look through archives in case no object file was explicitly specified.
Am I correct to say that both the Apple linker and the Linux linker (which I presume is ld.lld) seem consistent in the behavior of looking into the archive files for missing symbols? Or the fact that the reproduction case seems to work in Linux is irrelevant?
Activity
alloveras commentedon Mar 28, 2023
Following up on your comment from the ticket where I originally reported this problem:
Right, that explains why this works (which I couldn't understand before):
The key part is: zig ld doesn't look into the archives unless there are symbols missing in any of the object files.
Am I correct to say that both the Apple linker and the Linux linker (which I presume is
ld.lld) seem consistent in the behavior of looking into the archive files for missing symbols? Or the fact that the reproduction case seems to work in Linux is irrelevant?kubkon commentedon Mar 30, 2023
You are correct, and this is something our linker will need to accomodate also.