-
Notifications
You must be signed in to change notification settings - Fork 16
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
[EraVM] Adding support of library linkage #682
Conversation
d5104c6
to
e702b66
Compare
6fadd01
to
e209205
Compare
e209205
to
8c28956
Compare
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.
Could we put some effort into improving readability/maintainability?
Thank you very much for your comments! Sure, I'll address them. But I'd start with renaming "linker symbol" -> "library symbol" everywhere, but the intrinsic name. @hedgar2017, @akiramenai, are you OK with this? Original terminology "linker symbol" came from Solidity docs, but it is meaningless in LLVM-based tool chain. Essentially, these are usual symbols (in terminology of ELF format) that are resolved to the library addresses at a linking time. The only difference from the default workflow is that on MC level each library symbol is split into 5 sub-symbols because a library address is a 20-byte relocatable value, but our ELF format is ELF-32 one. |
4cf8ae3
to
9511326
Compare
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.
Documentation and code improvements look great, thank you.
I agree that library symbols make more sense in terms of terminology. @hedgar2017 is it ok to rename?
Except for that and remained triple pointer, LGTM.
I don't think it makes sense to make linker know about Solidity libraries. Even Yul is agnostic of libraries and only features |
Thank you for the review! |
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.
Please squash
You may just remove the lock, as it is not complete and FE is not going to be multi-threaded here anymore. |
Yep, will remove it. |
|
2eb8037
to
864213b
Compare
This also includes the C-API for requiting the following info: - If the given memory buffer contains an ELF file - List of undefined linker symbols of the given ELF file
864213b
to
5901176
Compare
Code Review Checklist
Purpose
Ticket Number
Requirements
Implementation
Logic Errors and Bugs
code does not behave as intended?
that could break the code?
Error Handling and Logging
be added or removed?
written in a way that allows for easy
debugging?
Maintainability
Dependencies
Security
Performance
system performance?
performance of the code significantly?
Testing and Testability
that should be tested in addition?
Readability
smaller methods?
different function, method or variable names?
file/folder/package?
restructured to have a more intuitive control
flow?
better?
understandable?
Documentation
Best Practices
Experts' Opinion
expert or a usability expert, should look over
the code before it can be accepted?