diff --git a/scripts/module.lds.S b/scripts/module.lds.S index 1713fc5383bb..8b9dcec11d1e 100644 --- a/scripts/module.lds.S +++ b/scripts/module.lds.S @@ -56,14 +56,16 @@ SECTIONS { *(.rodata.._end) } -#ifdef CONFIG_CFI_CLANG - /* - * With CFI_CLANG, ensure __cfi_check is at the beginning of the - * .text section, and that the section is aligned to page size. - */ .text : ALIGN(PAGE_SIZE) { *(.text.._start) +#ifdef CONFIG_CFI_CLANG + /* + * With CFI_CLANG, ensure __cfi_check is at the beginning of + * the .text section, and that the section is aligned to page + * size. + */ *(.text.__cfi_check) +#endif *(.text .text.[0-9a-zA-Z_]*) __cfi_jt_start = .; *(.text..L.cfi.jumptable .text..L.cfi.jumptable.*) @@ -71,7 +73,6 @@ SECTIONS { *(.text.._end) } #endif -#endif } /* bring in arch-specific sections */