aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/rrs.c
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1997-04-25 15:26:12 +0000
committerJohn Polstra <jdp@FreeBSD.org>1997-04-25 15:26:12 +0000
commitec77d02207e6ad81c066806e78c99979b303be8a (patch)
tree007872c2d8142112f00805618389c1579d766522 /gnu/usr.bin/ld/rrs.c
parentd4192bac8edf1257bb64638ebc894057a65d11a0 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/ld/rrs.c')
-rw-r--r--gnu/usr.bin/ld/rrs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/usr.bin/ld/rrs.c b/gnu/usr.bin/ld/rrs.c
index 915f2bf07f477..9e0ff8b43e0a1 100644
--- a/gnu/usr.bin/ld/rrs.c
+++ b/gnu/usr.bin/ld/rrs.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id$
+ * $Id: rrs.c,v 1.20 1997/02/22 15:46:23 peter Exp $
*/
#include <sys/param.h>
@@ -989,6 +989,7 @@ write_rrs_text()
int symsize;
struct nzlist *nlp;
int offset = 0;
+ int aligned_offset;
struct shobj *shp;
struct sod *sodp;
int bind;
@@ -1165,7 +1166,10 @@ write_rrs_text()
} END_EACH_SYMBOL;
- if (MALIGN(offset) != rrs_strtab_size)
+ aligned_offset = MALIGN(offset);
+ while (offset < aligned_offset) /* Pad deterministically */
+ rrs_strtab[offset++] = '\0';
+ if (offset != rrs_strtab_size)
errx(1, "internal error: "
"inconsistent RRS string table length: %d, expected %d",
offset, rrs_strtab_size);