[llvm] [BOLT] Add rewriting support for Linux kernel __bug_table (PR #86908)

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 22:29:02 PDT 2024


================
@@ -1223,6 +1232,52 @@ Error LinuxKernelRewriter::readBugTable() {
   return Error::success();
 }
 
+/// find_bug() uses linear search to match an address to an entry in the bug
+/// table. Hence, there is no need to sort entries when rewriting the table.
+/// When we need to erase an entry, we set its instruction address to zero.
+Error LinuxKernelRewriter::rewriteBugTable() {
+  if (!BugTableSection)
----------------
dcci wrote:

Thanks for explaining. Makes sense.

https://github.com/llvm/llvm-project/pull/86908


More information about the llvm-commits mailing list