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:
parent
12f82a1ed4
commit
0f409d388b
@ -107,7 +107,6 @@ s_sym(fn, fd, ep)
|
|||||||
int fd;
|
int fd;
|
||||||
register EXEC *ep;
|
register EXEC *ep;
|
||||||
{
|
{
|
||||||
static int pagesize = -1;
|
|
||||||
register off_t fsize;
|
register off_t fsize;
|
||||||
|
|
||||||
/* If no symbols or data/text relocation info, quit. */
|
/* 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
|
* and NMAGIC formats have the text/data immediately following the
|
||||||
* header. ZMAGIC format wastes the rest of of header page.
|
* header. ZMAGIC format wastes the rest of of header page.
|
||||||
*/
|
*/
|
||||||
if (ep->a_magic == ZMAGIC)
|
fsize = N_RELOFF(*ep);
|
||||||
fsize = pagesize == -1 ? (pagesize = getpagesize()) : pagesize;
|
|
||||||
else
|
|
||||||
fsize = sizeof(EXEC);
|
|
||||||
fsize += ep->a_text + ep->a_data;
|
|
||||||
|
|
||||||
/* Set symbol size and relocation info values to 0. */
|
/* Set symbol size and relocation info values to 0. */
|
||||||
ep->a_syms = ep->a_trsize = ep->a_drsize = 0;
|
ep->a_syms = ep->a_trsize = ep->a_drsize = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user