-
Notifications
You must be signed in to change notification settings - Fork 26
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
Expand declaration attributes #68
Conversation
b85b0f8
to
239d1a3
Compare
and, put section_index into SymbolBuilder because many users set it right after building the symbol anyway
TODO: come up with a plan to deprecate automatically making .debug_str and .debug_line_str into string sections, because theres a proper api for that now
7e9a242
to
d59a348
Compare
Integrated with goblin changes and added a test suite. Found that failure::Error was being used in Artifact::declare instead of ArtifactError, so I switched it to that, which i think is the intention. It will coerce into failure::Error at any use sites that expect that type and use Once a reviewer approves this PR, I'll bump the faerie version to 0.8.0 and merge it. |
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.
Very nice!
Thanks for the code review. I published on crates.io as 0.8.0. |
Wow this was epic great work ! I especially like the testing scaffold you added, thanks for that and all the hard work that went into this ! |
Based on #67
Adds attributes to each declaration that allow the user to control:
Scope { Global, Local, Weak }
. Local by default,is_global()
still gives a bool. Fixes Weak linkage support #60Visibility { Default, Protected, Hidden }
. Default by default. Fixes External linkage + hidden visibility support #61The data type attribute means:
.debug_str
and.debug_line_str
sections as strings automatically. This heuristic is left in place for now to minimize breakage downstream.Additionally, non-writable data are now put in the
.rodata
segment, which means the loader will put that data in memory that is protected against writing.