tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Assorted pile of poorly thought out RISC-V diffs



On Sat, Apr 13, 2019 at 11:33:50AM +0000, coypu%sdf.org@localhost wrote:
> I get a lot of,
> libc_pic.a(__select50.pico): in function `__select50': (.text+0x8): relocation truncated to fit: R_RISCV_JAL against symbol `__cerror' defined in .text section in libc_pic.a(cerror.pico)

libc too fat, use call @plt instead of jal

Index: arch/riscv/SYS.h
===================================================================
RCS file: /cvsroot/src/lib/libc/arch/riscv/SYS.h,v
retrieving revision 1.2
diff -u -r1.2 SYS.h
--- arch/riscv/SYS.h	27 Mar 2015 06:44:28 -0000	1.2
+++ arch/riscv/SYS.h	13 Apr 2019 11:50:19 -0000
@@ -33,7 +33,7 @@
 #include <machine/asm.h>
 
 #define SYSTRAP(x)		li	t6,SYS_ ## x; scall
-#define	JUMP_TO_CERROR()	j	_C_LABEL(__cerror)
+#define	JUMP_TO_CERROR()	call	_C_LABEL(__cerror)@plt
 
 /*
  * Do a syscall that cannot fail (sync, get{p,u,g,eu,eg)id)


Home | Main Index | Thread Index | Old Index