This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kbuild: reuse intermediate linker scripts in the final link steps
ld.bfd forces `--undefined X` symbols to be added to the resulting binary even if they're never used. In contrast, ld.lld may silently discard them if they're not referenced. If a kernel exported symbol (EXPORT_SYMBOL*(X)) is not used internally, it may get stripped away by ld.lld. An obvious example is __memcat_p(), which is only used by the `stm` module. With CONFIG_STM=m, the build fails: ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! Work around this issue by reusing the intermediate linker scripts in the final link steps. Signed-off-by: Ilie Halip <[email protected]>
- Loading branch information
Showing
3 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters