Make sure debugging symbol sections are aligned.

This commit is contained in:
thorpej 1997-09-05 21:46:59 +00:00
parent 2d074efe44
commit f576b48b39

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_elf.c,v 1.1 1997/07/01 18:36:36 thorpej Exp $ */
/* $NetBSD: db_elf.c,v 1.2 1997/09/05 21:46:59 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -166,7 +166,9 @@ X_db_sym_init(symtab, esymtab, name)
/*
* Now, sanity check the symbols against the string table.
*/
if (symtab_start == NULL || strtab_start == NULL)
if (symtab_start == NULL || strtab_start == NULL ||
ALIGNED_POINTER(symtab_start, long) == 0 ||
ALIGNED_POINTER(strtab_start, long) == 0)
goto badheader;
for (symp = symtab_start; symp < symtab_end; symp++)
if (symp->st_name + strtab_start > strtab_end)