[Clang][LoongArch] Generate _mcount instead of mcount (#65657)
When building the LoongArch Linux kernel without `CONFIG_DYNAMIC_FTRACE`, the build fails to link because the mcount symbol is `mcount`, not `_mcount` like GCC generates and the kernel expects: ``` ld.lld: error: undefined symbol: mcount >>> referenced by version.c >>> init/version.o:(early_hostname) in archive vmlinux.a >>> referenced by do_mounts.c >>> init/do_mounts.o:(rootfs_init_fs_context) in archive vmlinux.a >>> referenced by main.c >>> init/main.o:(__traceiter_initcall_level) in archive vmlinux.a >>> referenced 97011 more times >>> did you mean: _mcount >>> defined in: vmlinux.a(arch/loongarch/kernel/mcount.o) ``` Set `MCountName` in `LoongArchTargetInfo` to `_mcount`, which resolves the build failure.
Loading
Please sign in to comment