WEAK_REFERENCE seems to come from FreeBSD, it's not used in our tree. (WEAK_ALIAS is defined a few lines above).
ok? Index: sys/arch/riscv64/include/asm.h =================================================================== RCS file: /cvs/src/sys/arch/riscv64/include/asm.h,v retrieving revision 1.6 diff -u -p -r1.6 asm.h --- sys/arch/riscv64/include/asm.h 2 Dec 2022 12:27:08 -0000 1.6 +++ sys/arch/riscv64/include/asm.h 2 Dec 2022 23:13:38 -0000 @@ -104,10 +104,6 @@ .weak alias; \ alias = sym -#define WEAK_REFERENCE(sym, alias) \ - .weak alias; \ - .set alias,sym - #define SWAP_FAULT_HANDLER(handler, tmp0, tmp1) \ ld tmp0, CI_CURPCB(tp); /* Load the pcb */ \ ld tmp1, PCB_ONFAULT(tmp0); /* Save old handler */ \ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE