mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
add support for clang Control Flow Integrity (CFI)
This change adds the CONFIG_CFI_CLANG option, CFI error handling, and a faster look-up table for cross module CFI checks. Bug: 67506682 Change-Id: Ic009f0a629b552a0eb16e6d89808c7029e91447d Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
@@ -67,10 +67,12 @@
|
||||
*/
|
||||
#ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
|
||||
#define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
|
||||
#define TEXT_CFI_MAIN .text.cfi .text.[0-9a-zA-Z_]*.cfi
|
||||
#define DATA_MAIN .data .data.[0-9a-zA-Z_]*
|
||||
#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]*
|
||||
#else
|
||||
#define TEXT_MAIN .text
|
||||
#define TEXT_CFI_MAIN .text.cfi
|
||||
#define DATA_MAIN .data
|
||||
#define BSS_MAIN .bss
|
||||
#endif
|
||||
@@ -461,6 +463,7 @@
|
||||
ALIGN_FUNCTION(); \
|
||||
*(.text.hot TEXT_MAIN .text.fixup .text.unlikely) \
|
||||
*(.text..ftrace) \
|
||||
*(TEXT_CFI_MAIN) \
|
||||
*(.ref.text) \
|
||||
MEM_KEEP(init.text) \
|
||||
MEM_KEEP(exit.text) \
|
||||
|
||||
Reference in New Issue
Block a user