From 0f409d388bdbd4afcb3c1fc31b0bac675e4d2a6c Mon Sep 17 00:00:00 2001 From: mycroft Date: Sat, 17 Apr 1993 20:06:31 +0000 Subject: [PATCH] Fix egregious stupidity which caused QMAGIC execs to be 32 bytes too long. (Also occurs in BSDI's version, apparently.) --- usr.bin/strip/strip.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/usr.bin/strip/strip.c b/usr.bin/strip/strip.c index 182e8f5b6fa0..b3627bb98439 100644 --- a/usr.bin/strip/strip.c +++ b/usr.bin/strip/strip.c @@ -107,7 +107,6 @@ s_sym(fn, fd, ep) int fd; register EXEC *ep; { - static int pagesize = -1; register off_t fsize; /* If no symbols or data/text relocation info, quit. */ @@ -119,11 +118,7 @@ s_sym(fn, fd, ep) * and NMAGIC formats have the text/data immediately following the * header. ZMAGIC format wastes the rest of of header page. */ - if (ep->a_magic == ZMAGIC) - fsize = pagesize == -1 ? (pagesize = getpagesize()) : pagesize; - else - fsize = sizeof(EXEC); - fsize += ep->a_text + ep->a_data; + fsize = N_RELOFF(*ep); /* Set symbol size and relocation info values to 0. */ ep->a_syms = ep->a_trsize = ep->a_drsize = 0;