[PATCH] D135494: [BOLT] Section-handling refactoring/overhaul
Denis Revunov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 03:09:31 PDT 2022
treapster added a comment.
@maksfb a patch is now not mature enough for RFC, but the idea is that we add more relocations including data-to-data, create them for plt, and emit all these sections with original names and call registerOrUpdate for each in EFMM. If we want to duplicate some section like .rodata, we can rename it to ".bolt.org.rodata" before emitting or emit it under a new name. In my original patch i used the latter, but for compatibility, i think renaming before emission should work. So, the general idea is that instead of this sorcery in EFMM we can call something like RenameDuplicatedSections() prior to emission(in RewriteInstance), where we decide based on options which sections we want rewritten and which duplicated, and then just emit everything under original name. Do you think it's a good idea? Or it won't work?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135494/new/
https://reviews.llvm.org/D135494
More information about the llvm-commits
mailing list