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
Describe the bug
Like with #1055, --whole-archive can cause a lot of issues. It would be great to get rid of the --whole-archive workaround and instead force all registered symbols (like modules and NED functions) to be marked as 'referenced' to avoid automatic symbol garbage collection when linked into an executable. (Linking into a shared lib does not cause an issue as all exported symbols are automatically deemed 'referenced' in case of the creation of a shared lib). The same is not true if an executable is created. In that case the linker adds only symbols that it thinks was referenced from the main executable.
Possible solution retain and used attributes might be enough to force the linker to always avoid garbage collecting these symbols. If that works, we can get rid of the --whole-archive menchanism.
The text was updated successfully, but these errors were encountered:
Platform
Describe the bug
Like with #1055,
--whole-archive
can cause a lot of issues. It would be great to get rid of the--whole-archive
workaround and instead force all registered symbols (like modules and NED functions) to be marked as 'referenced' to avoid automatic symbol garbage collection when linked into an executable. (Linking into a shared lib does not cause an issue as all exported symbols are automatically deemed 'referenced' in case of the creation of a shared lib). The same is not true if an executable is created. In that case the linker adds only symbols that it thinks was referenced from the main executable.Possible solution
retain and used attributes might be enough to force the linker to always avoid garbage collecting these symbols. If that works, we can get rid of the --whole-archive menchanism.
The text was updated successfully, but these errors were encountered: