-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
rtdl: Return null when non-elf file is dlopened #901
Conversation
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.
LGTM
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.
LGTM
Why not make |
Actually thats a better idea, Ill do that |
35e2436
to
47ef7fe
Compare
Wouldn't it be a lot cleaner to use |
Instead of the bools? Not sure how would that make it cleaner though. |
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.
Instead of lastError
being a global accross files it could stay private to main.cpp
. The functions can then return a frg::expected<void, LinkerError>
where LinkerError
is some enum. This way we keep the error handling out of linker.cpp
.
Fixed and also added more checks to the elf to make sure that it also has the correct machine and bitness. |
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.
Looks good apart from the comments.
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.
LGTM
Right now it just fails at an assert in _fetchFromFile, it should just return null according to the man page.