-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[LLD][COFF][NFC] Store live flag in ImportThunkChunk. #108459
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 from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,7 +125,7 @@ static void getSymbols(const COFFLinkerContext &ctx, | |
if (!file->thunkSym) | ||
continue; | ||
|
||
if (!file->thunkLive) | ||
if (!file->thunkSym->isLive()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bit had me a bit surprised here, when reading the context of the code below: Do I understand the existing logic here, that if we only access (Although if GC isn't enabled, then all chunks are considered live, and they're emitted into the map file anyway.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe that in most cases, these symbols will be emitted regardless of the loop. They are typically referenced by some object file and pulled in earlier during the function execution. If no object file references the symbol, it wouldn’t be pulled in the first place. However, if the code only references the thunk In the context of ARM64EC, there are additional symbols implicitly defined, so this logic won’t fully cover those scenarios. I'll take a closer look at that. |
||
continue; | ||
|
||
if (auto *thunkSym = dyn_cast<Defined>(file->thunkSym)) | ||
|
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 presume the move from header to cpp file is because you want to access
ctx.config
here, which otherwise isn't visible?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.
Yes, that was the reason.