Skip to content
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

Improve eager symbol relocation #26

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Conversation

0152la
Copy link
Contributor

@0152la 0152la commented Mar 19, 2024

Previously, we were improperly distinguishing object symbols versus function symbols by looking at the type of the relocation. We now use the type of the underlying symbol to know precisely whether we're relocating an object or a function.

Furthermore, we now also consider symbol binding, in two situations:

  • It is fine for a WEAK bound symbol to not have a relocation - we emit a warning when this is the case, and do relocate if a symbol is available, but some weird artifacts (e.g., _Jv_RegisterClasses, which seems to be some Java stuff and would do some extra work if it were to exist) do not seem to have definitions;
  • We only eagerly relocate against GLOBAL bound symbols, not against LOCAL ones.

Previously, we were improperly distinguishing object symbols versus
function symbols by looking at the type of the relocation. We now use
the type of the underlying symbol to know precisely whether we're
relocating an object or a function.

Furthermore, we now also consider symbol binding, in two situations:
* It is fine for a WEAK bound symbol to not have a relocation - we emit
  a warning when this is the case, and do relocate if a symbol is
  available, but some weird artifacts (e.g., `_Jv_RegisterClasses`,
  which seems to be some Java stuff and would do some extra work if it
  were to exist) do not seem to have definitions;
* We only eagerly relocate against GLOBAL bound symbols, not against
  LOCAL ones.
@0152la 0152la requested a review from ltratt March 19, 2024 12:12
@ltratt ltratt added this pull request to the merge queue Mar 19, 2024
Merged via the queue into capablevms:master with commit 9bc215b Mar 19, 2024
2 checks passed
@0152la 0152la deleted the weak-symbols2 branch March 19, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants