android_kernel_motorola_sm6375/arch/riscv
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nathan Chancellor e69c7c1491 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 <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-05-22 11:38:29 +02:00
..
boot dts: phy: fix missing mdio device and probe failure of vsc8541-01 device 2021-01-27 11:47:45 +01:00
configs riscv: defconfig: enable gpio support for HiFive Unleashed 2021-01-27 11:47:45 +01:00
include riscv: Workaround mcount name prior to clang-13 2021-05-22 11:38:29 +02:00
kernel riscv: Workaround mcount name prior to clang-13 2021-05-22 11:38:29 +02:00
lib
mm riscv: Add sfence.vma after early page table changes 2020-09-23 12:40:43 +02:00
net riscv, bpf: Fix broken BPF tail calls 2020-02-11 04:35:28 -08:00
Kbuild
Kconfig riscv: Fix spelling mistake "SPARSEMEM" to "SPARSMEM" 2021-04-21 12:56:16 +02:00
Kconfig.debug
Kconfig.socs
Makefile Kbuild updates for v5.4 2019-09-20 08:36:47 -07:00