From 4769a76ca0a8aa108fca0507cd9de1e9d4d82968 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 12 Aug 1987 21:36:30 +0000 Subject: [PATCH] corrected --- mach/sun2/cv/cv.c | 11 +++++++++-- mach/sun3/cv/cv.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/mach/sun2/cv/cv.c b/mach/sun2/cv/cv.c index 3c404d050..6d1833e71 100644 --- a/mach/sun2/cv/cv.c +++ b/mach/sun2/cv/cv.c @@ -159,6 +159,8 @@ main(argc, argv) datasize= outsect[BSSSG].os_base - outsect[ROMSG].os_base ; if (! follows(&outsect[DATASG], &outsect[ROMSG])) fatal("data segment must follow rom\n") ; + outsect[ROMSG].os_size = outsect[DATASG].os_base - outsect[ROMSG].os_base; + outsect[DATASG].os_size = outsect[BSSSG].os_base - outsect[DATASG].os_base; } else if ( outsect[DATASG].os_lign == 0x20000 ) { /* 410/413 file with ROMSG in instruction space */ @@ -166,21 +168,26 @@ main(argc, argv) magic= NMAGIC ; 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") ; + outsect[TEXTSG].os_size = outsect[ROMSG].os_base - outsect[TEXTSG].os_base; + outsect[DATASG].os_size = outsect[BSSSG].os_base - outsect[DATASG].os_base; + datasize= outsect[DATASG].os_size ; } else { /* Plain 407 file */ rom_in_data = 0; magic= OMAGIC ; textsize= (outsect[DATASG].os_base - outsect[TEXTSG].os_base); - datasize= outsect[DATASG].os_size ; if (!unresolved) { if (! follows(&outsect[ROMSG],&outsect[TEXTSG])) fatal("rom segment must follow text\n") ; if (! follows(&outsect[DATASG],&outsect[ROMSG])) fatal("data segment must follow rom\n") ; } + outsect[TEXTSG].os_size = outsect[ROMSG].os_base - outsect[TEXTSG].os_base; + outsect[ROMSG].os_size = outsect[DATASG].os_base - outsect[ROMSG].os_base; + outsect[DATASG].os_size = outsect[BSSSG].os_base - outsect[DATASG].os_base; + datasize= outsect[DATASG].os_size ; } if (outsect[TEXTSG].os_base == TOT_HDRSIZE+ENTRY) { if (magic != NMAGIC) { diff --git a/mach/sun3/cv/cv.c b/mach/sun3/cv/cv.c index 3c404d050..6d1833e71 100644 --- a/mach/sun3/cv/cv.c +++ b/mach/sun3/cv/cv.c @@ -159,6 +159,8 @@ main(argc, argv) datasize= outsect[BSSSG].os_base - outsect[ROMSG].os_base ; if (! follows(&outsect[DATASG], &outsect[ROMSG])) fatal("data segment must follow rom\n") ; + outsect[ROMSG].os_size = outsect[DATASG].os_base - outsect[ROMSG].os_base; + outsect[DATASG].os_size = outsect[BSSSG].os_base - outsect[DATASG].os_base; } else if ( outsect[DATASG].os_lign == 0x20000 ) { /* 410/413 file with ROMSG in instruction space */ @@ -166,21 +168,26 @@ main(argc, argv) magic= NMAGIC ; 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") ; + outsect[TEXTSG].os_size = outsect[ROMSG].os_base - outsect[TEXTSG].os_base; + outsect[DATASG].os_size = outsect[BSSSG].os_base - outsect[DATASG].os_base; + datasize= outsect[DATASG].os_size ; } else { /* Plain 407 file */ rom_in_data = 0; magic= OMAGIC ; textsize= (outsect[DATASG].os_base - outsect[TEXTSG].os_base); - datasize= outsect[DATASG].os_size ; if (!unresolved) { if (! follows(&outsect[ROMSG],&outsect[TEXTSG])) fatal("rom segment must follow text\n") ; if (! follows(&outsect[DATASG],&outsect[ROMSG])) fatal("data segment must follow rom\n") ; } + outsect[TEXTSG].os_size = outsect[ROMSG].os_base - outsect[TEXTSG].os_base; + outsect[ROMSG].os_size = outsect[DATASG].os_base - outsect[ROMSG].os_base; + outsect[DATASG].os_size = outsect[BSSSG].os_base - outsect[DATASG].os_base; + datasize= outsect[DATASG].os_size ; } if (outsect[TEXTSG].os_base == TOT_HDRSIZE+ENTRY) { if (magic != NMAGIC) { -- 2.34.1