tmp_suning_uos_patched/arch/riscv/include/asm
Nathan Chancellor 0195e2813a riscv: Workaround mcount name prior to clang-13
[ 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>
2021-05-22 11:40:53 +02:00
..
vdso RISC-V: fix barrier() use in <vdso/processor.h> 2020-11-25 09:44:27 -08:00
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 riscv: Workaround mcount name prior to clang-13 2021-05-22 11:40:53 +02:00
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 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
kdebug.h
kgdb.h
kprobes.h
linkage.h
mmio.h
mmiowb.h
mmu_context.h
mmu.h
module.h
module.lds.h
page.h riscv: virt_addr_valid must check the address belongs to linear mapping 2021-02-17 11:02:23 +01:00
parse_asm.h
patch.h
pci.h
perf_event.h
pgalloc.h
pgtable-32.h arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed 2020-11-16 16:57:18 +01:00
pgtable-64.h
pgtable-bits.h
pgtable.h riscv: Drop a duplicated PAGE_KERNEL_EXEC 2021-01-19 18:27:20 +01:00
processor.h
ptdump.h
ptrace.h
sbi.h RISC-V: correct enum sbi_ext_rfence_fid 2021-03-25 09:04:09 +01:00
seccomp.h
sections.h
set_memory.h
smp.h
soc.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
sparsemem.h
spinlock_types.h
spinlock.h
stackprotector.h
string.h
switch_to.h
syscall.h
thread_info.h
timex.h RISC-V: Define get_cycles64() regardless of M-mode 2020-12-10 17:39:43 -08:00
tlb.h
tlbflush.h
uaccess.h riscv: evaluate put_user() arg before enabling user access 2021-04-07 15:00:13 +02:00
unistd.h
vdso.h riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL 2021-01-19 18:27:20 +01:00
vermagic.h
vmalloc.h
word-at-a-time.h