Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that all model symbols from static libraries would be linked in and no symbol garbage collection occurs #1100

Open
rhornig opened this issue Feb 13, 2024 · 0 comments
Assignees
Labels
feature A feature request
Milestone

Comments

@rhornig
Copy link
Contributor

rhornig commented Feb 13, 2024

Platform

  • OMNeT++ version: 6.0.3
  • OS: all platforms

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.

@rhornig rhornig added the feature A feature request label Feb 13, 2024
@rhornig rhornig added this to the 7.0 milestone Feb 13, 2024
@rhornig rhornig self-assigned this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request
Projects
None yet
Development

No branches or pull requests

1 participant