From a0f89188b900835549087b43acf3fc65b22b1f7c Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 12 Aug 1987 20:51:23 +0000 Subject: [PATCH] fixed --- mach/sun2/cv/cv.c | 7 ++++--- mach/sun3/cv/cv.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mach/sun2/cv/cv.c b/mach/sun2/cv/cv.c index 5932a80aa..3c404d050 100644 --- a/mach/sun2/cv/cv.c +++ b/mach/sun2/cv/cv.c @@ -156,7 +156,7 @@ main(argc, argv) rom_in_data = 1; magic= NMAGIC ; textsize= outsect[TEXTSG].os_size ; - datasize= outsect[ROMSG].os_size + outsect[DATASG].os_size ; + datasize= outsect[BSSSG].os_base - outsect[ROMSG].os_base ; if (! follows(&outsect[DATASG], &outsect[ROMSG])) fatal("data segment must follow rom\n") ; } else @@ -164,7 +164,8 @@ main(argc, argv) /* 410/413 file with ROMSG in instruction space */ rom_in_data = 0; magic= NMAGIC ; - textsize= outsect[TEXTSG].os_size + outsect[ROMSG].os_size ; + textsize= (outsect[ROMSG].os_base - outsect[TEXTSG].os_base) + + outsect[ROMSG].os_size ; datasize= outsect[DATASG].os_size ; if (! follows(&outsect[ROMSG],&outsect[TEXTSG].os_base)) fatal("rom segment must follow text\n") ; @@ -172,7 +173,7 @@ main(argc, argv) /* Plain 407 file */ rom_in_data = 0; magic= OMAGIC ; - textsize= outsect[TEXTSG].os_size + outsect[ROMSG].os_size ; + textsize= (outsect[DATASG].os_base - outsect[TEXTSG].os_base); datasize= outsect[DATASG].os_size ; if (!unresolved) { if (! follows(&outsect[ROMSG],&outsect[TEXTSG])) diff --git a/mach/sun3/cv/cv.c b/mach/sun3/cv/cv.c index 5932a80aa..3c404d050 100644 --- a/mach/sun3/cv/cv.c +++ b/mach/sun3/cv/cv.c @@ -156,7 +156,7 @@ main(argc, argv) rom_in_data = 1; magic= NMAGIC ; textsize= outsect[TEXTSG].os_size ; - datasize= outsect[ROMSG].os_size + outsect[DATASG].os_size ; + datasize= outsect[BSSSG].os_base - outsect[ROMSG].os_base ; if (! follows(&outsect[DATASG], &outsect[ROMSG])) fatal("data segment must follow rom\n") ; } else @@ -164,7 +164,8 @@ main(argc, argv) /* 410/413 file with ROMSG in instruction space */ rom_in_data = 0; magic= NMAGIC ; - textsize= outsect[TEXTSG].os_size + outsect[ROMSG].os_size ; + textsize= (outsect[ROMSG].os_base - outsect[TEXTSG].os_base) + + outsect[ROMSG].os_size ; datasize= outsect[DATASG].os_size ; if (! follows(&outsect[ROMSG],&outsect[TEXTSG].os_base)) fatal("rom segment must follow text\n") ; @@ -172,7 +173,7 @@ main(argc, argv) /* Plain 407 file */ rom_in_data = 0; magic= OMAGIC ; - textsize= outsect[TEXTSG].os_size + outsect[ROMSG].os_size ; + textsize= (outsect[DATASG].os_base - outsect[TEXTSG].os_base); datasize= outsect[DATASG].os_size ; if (!unresolved) { if (! follows(&outsect[ROMSG],&outsect[TEXTSG]))