changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: 7l: don't hardcode 4k pagesize, use INITRND

changeset 7243: 34f64dcbbc25
parent 7241: 4b6277dd0535
child 7244: 2e8af1bf191d
author: cinap_lenrek@felloff.net
date: Fri, 17 May 2019 18:14:10 +0200
files: sys/src/cmd/7l/asm.c sys/src/cmd/7l/obj.c
description: 7l: don't hardcode 4k pagesize, use INITRND
     1.1--- a/sys/src/cmd/7l/asm.c
     1.2+++ b/sys/src/cmd/7l/asm.c
     1.3@@ -100,7 +100,7 @@ asmb(void)
     1.4 		seek(cout, OFFSET, 0);
     1.5 		break;
     1.6 	case 6:	/* no header, padded segments */
     1.7-		OFFSET = rnd(HEADR+textsize, 4096);
     1.8+		OFFSET = rnd(HEADR+textsize, INITRND);
     1.9 		seek(cout, OFFSET, 0);
    1.10 		break;
    1.11 	}
    1.12@@ -132,7 +132,7 @@ asmb(void)
    1.13 			seek(cout, OFFSET, 0);
    1.14 			break;
    1.15 		case 6:	/* no header, padded segments */
    1.16-			OFFSET += rnd(datsize, 4096);
    1.17+			OFFSET += rnd(datsize, INITRND);
    1.18 			seek(cout, OFFSET, 0);
    1.19 			break;
    1.20 		case 7:
     2.1--- a/sys/src/cmd/7l/obj.c
     2.2+++ b/sys/src/cmd/7l/obj.c
     2.3@@ -35,8 +35,8 @@ isobjfile(char *f)
     2.4 
     2.5 /*
     2.6  *	-H0				no header
     2.7- *	-H2 -T0x100028 -R0x100000		is plan9 format
     2.8- *	-H6 -R4096		no header with segments padded to pages
     2.9+ *	-H2 -T0x100028 -R0x100000	is plan9 format
    2.10+ *	-H6 -R0x10000			no header with segments padded to pages
    2.11  *	-H7				is elf
    2.12  */
    2.13