
With non-canonical CFI, the compiler rewrites function references to point to the CFI jump table for indirect call checking. This won't happen when the address is taken in assembly, and will result in a CFI failure if we jump to the address later in C code. This change adds the __cficanonical attribute, which tells the compiler to switch to a canonical jump table for the function. With canonical CFI, the compiler appends a .cfi postfix to the function name, and points the original symbol to the jump table. This allows addresses taken in assembly code to be used for indirect calls without tripping CFI checks. Bug: 145210207 Change-Id: Iaca9d1d95f59d7169168d89bc10bf71420487a67 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
11 KiB
11 KiB