-
Notifications
You must be signed in to change notification settings - Fork 156
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
Build a .drectve section in COFF objects with export directives #423
Conversation
I'm not super happy about this, but I'd like some initial feedback first. Some issues:
|
I think this is okay. If the user needs to provide their own linker options, then we should extend the API to support that in a general way for ELF (
We'll need to add more configuration settings if we need to differentiate. Using MSVC is correct for now. |
https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#the-drectve-section-object-only talks about a UTF-8 marker. Do we need to emit it? I couldn't see anywhere that LLVM adds this. |
MinGW is currently the only windows environment for which cg_clif works. I would prefer if it doesn't break. |
How does cg_clif currently handle |
Rustc knows which symbols need to be exported and then tells the linker about this when it runs it. In many cases not all symbols with |
That sounds like this is something we shouldn't be doing automatically. So the user needs to explicitly request it, and we may as well do that by creating or appending to a regular section when they request it. |
So what would the API look like in that case? |
Something like |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks! Could you publish a new version of the object crate? |
Released 0.28.3 |
This is needed to export symbols with
SymbolScope::Dynamic
from a DLL.