-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fedora Rawhide kernel builds fails with unkown symbol errors
.
#2006
Comments
@nathanchance Here is the config file we were using for the last successful build with clang-17: config.txt |
I suspect that the key part of the config is |
test.c:
module.lds:
Then:
Produces:
With old ld.lld and ld.bfd, the undefined symbol was not present. |
This regressed in llvm/llvm-project@1981b1b, cc @MaskRay |
Filed an upstream issue: llvm/llvm-project#85048 |
llvm#69295 demoted Defined symbols relative to discarded sections. If such a symbol is unreferenced, the desired behavior is to eliminate it from .symtab just like --gc-sections discarded definitions. Linux kernel's CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y configuration expects that the unreferenced `unused` is not emitted to .symtab (ClangBuiltLinux/linux#2006). For relocations referencing demoted symbols, the symbol index restores to 0 like older lld (`R_X86_64_64 0` in `discard-section.s`). Fix llvm#85048
…85167) #69295 demoted Defined symbols relative to discarded sections. If such a symbol is unreferenced, the desired behavior is to eliminate it from .symtab just like --gc-sections discarded definitions. Linux kernel's CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y configuration expects that the unreferenced `unused` is not emitted to .symtab (ClangBuiltLinux/linux#2006). For relocations referencing demoted symbols, the symbol index restores to 0 like older lld (`R_X86_64_64 0` in `discard-section.s`). Fix #85048
…lvm#85167) llvm#69295 demoted Defined symbols relative to discarded sections. If such a symbol is unreferenced, the desired behavior is to eliminate it from .symtab just like --gc-sections discarded definitions. Linux kernel's CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y configuration expects that the unreferenced `unused` is not emitted to .symtab (ClangBuiltLinux/linux#2006). For relocations referencing demoted symbols, the symbol index restores to 0 like older lld (`R_X86_64_64 0` in `discard-section.s`). Fix llvm#85048 (cherry picked from commit 8fe3e70)
Issue has been fixed and backported to the 18.x branch, so this can be closed. |
After upgrading from clang-17 to clang-18, the Fedora Rawhide kernel builds started to fail with many errors like:
nfsv4.ko needs unknown symbol __pcpu_unique_nfs4_callback_count1
Full build log is here
The text was updated successfully, but these errors were encountered: