[PATCH] D135494: [BOLT] Section-handling refactoring/overhaul

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 15:49:27 PDT 2022


maksfb added a comment.

In D135494#3868155 <https://reviews.llvm.org/D135494#3868155>, @treapster wrote:

> I'm a bit concerned about adding OrgSecPrefix to EFMM. My understanding is that now it's impossible or really hard to rewrite a section in-place, because EFMM will automatically duplicate it and add prefix to the original section. I'm developing a patch to rewrite the entire binary and i'm now struggling to rebase it on top of this. I would appreciate clarifications regarding EFMM changes and how to update sections in-place with this code.

With this change, many sections are still updated in-place, e.g. ".rodata" and every section with code pointers. "-use-old-text" also will rewrite code at the original location.

If the change you are working on relocates every single section at a new location, while reusing space in the original binary, perhaps you need to deregister all original sections?


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