From 9a1acbb650c2ef63ea4201fa0e9be577c1bdd392 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 10 Apr 1997 10:50:29 +0000 Subject: [PATCH] calc page alignment correctly for -p; pk@netbsd --- gnu/usr.bin/ld/ld.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index 0b282ee4ada..439c758e9d1 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ld.c,v 1.7 1997/04/09 02:08:27 deraadt Exp $ */ +/* $OpenBSD: ld.c,v 1.8 1997/04/10 10:50:29 deraadt Exp $ */ /*- * This code is derived from software copyrighted by the Free Software @@ -1695,8 +1695,7 @@ digest_symbols() */ if (page_align_segments || page_align_data) { - int text_end = text_size + N_TXTOFF(outheader); - text_pad = PALIGN(text_end, page_size) - text_end; + text_pad = PALIGN(text_size, page_size) - text_size; text_size += text_pad; } outheader.a_text = text_size; -- 2.20.1