-
Notifications
You must be signed in to change notification settings - Fork 2
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
libcextract: SymbolExternalizer: Drop klpe_ prefix if IBT is specified #72
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.
It is not that simple. The way you are doing this you are going to update every reference to the function or variable with a new name that is equal to the name of the old function. That is unnecessary and will result in unnecessary header expansions. You should instead skip the update of those symbols.
And please rebase it on top of the latest branch, as this conflicts with the LateExternalization :) .
You will need to rewrite the declaration of the symbol, yes. But you do not need to change any use of the symbol. Adding them at the end will most likely break the one-definition rule. If it doesn't, then yes, it would be just better to add them to the end of the file. That will remove any necessity of header expansion.
At the Now with regard to the closure, if the Decl you are externalizing is being referenced by the function you want to extract or any of its dependencies, then it will be dragged to the closure by consequence. We do not eliminate any redeclarations. |
@giulianobelinassi please take a look in this new version of the patch. I found some issues with this approach, because it seems that it trigger different header expansion to some LPs tested (thanks to my klp-build test.sh script now I can test if changes like this ripple over previously working LPs...) I'm sure that I'm forgetting something... |
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
This one was superseded by #101 |
The resulting code would be exactly the same as the original code, or at least as much as it can be the same.