shithub: riscv

Download patch

ref: e0c19ae048ae671883fd4d27d5f617c02020bdf5
parent: 335e019746d2572162c83b8f6c5c243baf1ceda4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri May 17 14:14:10 EDT 2019

7l: don't hardcode 4k pagesize, use INITRND

--- a/sys/src/cmd/7l/asm.c
+++ b/sys/src/cmd/7l/asm.c
@@ -100,7 +100,7 @@
 		seek(cout, OFFSET, 0);
 		break;
 	case 6:	/* no header, padded segments */
-		OFFSET = rnd(HEADR+textsize, 4096);
+		OFFSET = rnd(HEADR+textsize, INITRND);
 		seek(cout, OFFSET, 0);
 		break;
 	}
@@ -132,7 +132,7 @@
 			seek(cout, OFFSET, 0);
 			break;
 		case 6:	/* no header, padded segments */
-			OFFSET += rnd(datsize, 4096);
+			OFFSET += rnd(datsize, INITRND);
 			seek(cout, OFFSET, 0);
 			break;
 		case 7:
--- a/sys/src/cmd/7l/obj.c
+++ b/sys/src/cmd/7l/obj.c
@@ -35,8 +35,8 @@
 
 /*
  *	-H0				no header
- *	-H2 -T0x100028 -R0x100000		is plan9 format
- *	-H6 -R4096		no header with segments padded to pages
+ *	-H2 -T0x100028 -R0x100000	is plan9 format
+ *	-H6 -R0x10000			no header with segments padded to pages
  *	-H7				is elf
  */