Index: usr.sbin/crunch/crunchide/crunchide.c =================================================================== --- usr.sbin/crunch/crunchide/crunchide.c +++ usr.sbin/crunch/crunchide/crunchide.c @@ -76,7 +76,7 @@ #include "extern.h" -char *pname = "crunchide"; +static const char *pname = "crunchide"; void usage(void); @@ -85,7 +85,7 @@ int hide_syms(const char *filename); -int verbose; +static int verbose; int main(int, char *[]); @@ -137,7 +137,7 @@ /* ---------------------------- */ -struct keep { +static struct keep { struct keep *next; char *sym; } *keep_list; @@ -206,7 +206,7 @@ /* ---------------------------- */ -struct { +static struct { const char *name; int (*check)(int, const char *); /* 1 if match, zero if not */ int (*hide)(int, const char *); /* non-zero if error */ Index: usr.sbin/crunch/crunchide/exec_elf32.c =================================================================== --- usr.sbin/crunch/crunchide/exec_elf32.c +++ usr.sbin/crunch/crunchide/exec_elf32.c @@ -155,7 +155,7 @@ } int -ELFNAMEEND(check)(int fd, const char *fn) +ELFNAMEEND(check)(int fd, const char *fn __unused) { Elf_Ehdr eh; struct stat sb; @@ -435,12 +435,12 @@ * update section header table in ascending order of offset */ for (i = strtabidx + 1; i < shnum; i++) { - Elf_Off off, align; - off = xewtoh(layoutp[i - 1].shdr->sh_offset) + + Elf_Off soff, align; + soff = xewtoh(layoutp[i - 1].shdr->sh_offset) + xewtoh(layoutp[i - 1].shdr->sh_size); align = xewtoh(layoutp[i].shdr->sh_addralign); - off = (off + (align - 1)) & ~(align - 1); - layoutp[i].shdr->sh_offset = htoxew(off); + soff = (soff + (align - 1)) & ~(align - 1); + layoutp[i].shdr->sh_offset = htoxew(soff); } /*