0195e2813a
[ Upstream commit 7ce04771503074a7de7f539cc43f5e1b385cb99b ] Prior to clang 13.0.0, the RISC-V name for the mcount symbol was "mcount", which differs from the GCC version of "_mcount", which results in the following errors: riscv64-linux-gnu-ld: init/main.o: in function `__traceiter_initcall_level': main.c:(.text+0xe): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `__traceiter_initcall_start': main.c:(.text+0x4e): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `__traceiter_initcall_finish': main.c:(.text+0x92): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `.LBB32_28': main.c:(.text+0x30c): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `free_initmem': main.c:(.text+0x54c): undefined reference to `mcount' This has been corrected in https://reviews.llvm.org/D98881 but the minimum supported clang version is 10.0.1. To avoid build errors and to gain a working function tracer, adjust the name of the mcount symbol for older versions of clang in mount.S and recordmcount.pl. Link: https://github.com/ClangBuiltLinux/linux/issues/1331 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Sasha Levin <sashal@kernel.org> |
||
---|---|---|
.. | ||
vdso | ||
asm-offsets.h | ||
asm-prototypes.h | ||
asm.h | ||
atomic.h | ||
barrier.h | ||
bitops.h | ||
bug.h | ||
cache.h | ||
cacheflush.h | ||
cacheinfo.h | ||
clint.h | ||
clocksource.h | ||
cmpxchg.h | ||
cpu_ops.h | ||
csr.h | ||
current.h | ||
delay.h | ||
efi.h | ||
elf.h | ||
fence.h | ||
fixmap.h | ||
ftrace.h | ||
futex.h | ||
gdb_xml.h | ||
hugetlb.h | ||
hwcap.h | ||
image.h | ||
io.h | ||
irq_work.h | ||
irq.h | ||
irqflags.h | ||
jump_label.h | ||
kasan.h | ||
Kbuild | ||
kdebug.h | ||
kgdb.h | ||
kprobes.h | ||
linkage.h | ||
mmio.h | ||
mmiowb.h | ||
mmu_context.h | ||
mmu.h | ||
module.h | ||
module.lds.h | ||
page.h | ||
parse_asm.h | ||
patch.h | ||
pci.h | ||
perf_event.h | ||
pgalloc.h | ||
pgtable-32.h | ||
pgtable-64.h | ||
pgtable-bits.h | ||
pgtable.h | ||
processor.h | ||
ptdump.h | ||
ptrace.h | ||
sbi.h | ||
seccomp.h | ||
sections.h | ||
set_memory.h | ||
smp.h | ||
soc.h | ||
sparsemem.h | ||
spinlock_types.h | ||
spinlock.h | ||
stackprotector.h | ||
string.h | ||
switch_to.h | ||
syscall.h | ||
thread_info.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
uaccess.h | ||
unistd.h | ||
vdso.h | ||
vermagic.h | ||
vmalloc.h | ||
word-at-a-time.h |