Fix egregious stupidity which caused QMAGIC execs to be 32 bytes too long.

(Also occurs in BSDI's version, apparently.)
This commit is contained in:
mycroft 1993-04-17 20:06:31 +00:00
parent 12f82a1ed4
commit 0f409d388b
1 changed files with 1 additions and 6 deletions

View File

@ -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;