shithub: riscv

Download patch

ref: 4032db00a7a813e8f36b2755204b6863b4545906
parent: c57c8919e303aaad512a5e603f60d4be22d6afea
author: cinap_lenrek <[email protected]>
date: Fri May 3 17:16:23 EDT 2019

ktrace: arm64 support

--- a/sys/src/cmd/ktrace.c
+++ b/sys/src/cmd/ktrace.c
@@ -109,6 +109,7 @@
 	case V_MAGIC:	/* mips 3000 */
 	case M_MAGIC:	/* mips 4000 */
 	case E_MAGIC:	/* arm 7-something */
+	case R_MAGIC:	/* arm64 */
 	case Q_MAGIC:	/* powerpc */
 	case N_MAGIC:	/* mips 4000 LE */
 	case L_MAGIC:	/* dec alpha */
@@ -383,6 +384,7 @@
 		r = 0;
 		switch(fhdr.magic){
 		case S_MAGIC:
+		case R_MAGIC:
 			m = 0xffffffff00000000ULL;
 			break;
 		default:
@@ -394,6 +396,7 @@
 	}
 	switch(fhdr.magic){
 	case S_MAGIC:
+	case R_MAGIC:
 		r = (long)r;	// sign extend
 		break;
 	}