-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
GH-142305: JIT: Deduplicating GOT symbols in the trace #142316
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
base: main
Are you sure you want to change the base?
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.
Just a question about the design choice!
Meta comment: man, I feel like GitHub has done this to me twice now where it's posted stale comments and/or eaten comments I've written during review...
|
When you're done making the requested changes, leave the comment: |
|
|
||
| // Get the symbol slot memory location for a given symbol ordinal. | ||
| static unsigned char * | ||
| get_symbol_slot(int ordinal, symbol_state *state, int size) |
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.
IMO, merging GOT and trampoline symbols into the same structure makes things a bit more challenging to understand, since they serve different purposes. Would it be worth keeping them as separate structures with their own ordinals? I know it means some duplication, but it might be easier to reason about.
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.
The purpose of the symbol map is just to track the symbols available, independently how they are reached (either by GOT or trampolines). In fact the symbol map won't change at all, it's just an enumeration of the symbols across different stencils.
The way that differentiates how they are reached is the relocation tag associated to it. For example:
R_AARCH64_CALL26will use trampolinesR_AARCH64_ADR_GOT_PAGE/R_AARCH64_LD64_GOT_LO12_NCwill use the GOT
but the ordinal of the symbol is consistent because the collection of the symbol is unified.
Indeed in the trace, trampolines and got entries are allocated in separate areas.
Uh oh!
There was an error while loading. Please reload this page.