diff --git a/scripts/module.lds.S b/scripts/module.lds.S index 488a6f742624..ea11e2146183 100644 --- a/scripts/module.lds.S +++ b/scripts/module.lds.S @@ -33,6 +33,7 @@ SECTIONS { __patchable_function_entries : { *(__patchable_function_entries) } +#ifdef CONFIG_LTO_CLANG /* * With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and * -ffunction-sections, which increases the size of the final module. @@ -66,6 +67,7 @@ SECTIONS { __cfi_jt_end = .; } #endif +#endif } /* bring in arch-specific sections */