-
Notifications
You must be signed in to change notification settings - Fork 1
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
Changes to better handle relocation #33
Conversation
cond = cond && curr_sym.sym_offset != 0; | ||
} | ||
|
||
if (cond) |
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.
Would it be clearer to say if (cond && curr_sym.sym_type == sym_type && curr_sym.sym_offset != 0)
?
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.
I prefer it this way, since then I have each condition separate, with a clarifying comment. I would assume the compiler will collapse it down to something better.
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.
I found this really hard to read, because it's so unconventional, and it took me a while to convince myself it was intentional. Another way around this is to use a nested if
with a comment at each level?
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.
As per our offline talk, I've added some additional clarifying comments about the use of cond
here - faf4545.
Please squash. |
* Record relocation `shndx`, so we know this is either an external, or a local symbol (improves lookup logic) * Add function to do symbol look-up per library, than per compartment * Fix amount of memory available in `comp_utils` when not going through a compartment * Add some more tests (currently not working: `toupper` and `lua_suite_some`)
Squashed. |
shndx
, so we know this is either an external, or a local symbol (improves lookup logic)comp_utils
when not going through a compartmenttoupper
andlua_suite_some
)This should've fixed at least
toupper
, but (hopefully) it's at least a step forward.