diff --git a/UPDATING b/UPDATING --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,13 @@ world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +202311xx: + The special keep directive to add additional symbols to maintain in + crunchgen configurations no longer adds a leading underscore to symbol + names. It is suspected that this will have no practical impact, but if + you use your own crunchgen configuration file with a keep directive + please file a PR and assign it to kevans. + 20231027: Forward compatibility (running the new code on old kernels) for the "ino64" project have been removed. The need for it has passed long ago. diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk --- a/share/mk/bsd.crunchgen.mk +++ b/share/mk/bsd.crunchgen.mk @@ -18,6 +18,7 @@ # CRUNCH_SRCDIR_${P}: base source directory for program ${P} # CRUNCH_BUILDOPTS_${P}: additional build options for ${P} # CRUNCH_ALIAS_${P}: additional names to be used for ${P} +# CRUNCH_KEEP_${P}: additional symbols to keep for ${P} # # By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} # will be used to generate a hard link to the resulting binary. @@ -101,6 +102,9 @@ .ifdef CRUNCH_LIBS_${P} echo special ${P} lib ${CRUNCH_LIBS_${P}} >>${.TARGET} .endif +.ifdef CRUNCH_KEEP_${P} + echo special ${P} keep ${CRUNCH_KEEP_${P}} >>${.TARGET} +.endif .for A in ${CRUNCH_ALIAS_${P}} echo ln ${P} ${A} >>${.TARGET} .endfor diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c --- a/usr.sbin/crunch/crunchgen/crunchgen.c +++ b/usr.sbin/crunch/crunchgen/crunchgen.c @@ -1128,7 +1128,7 @@ fprintf(outmk, "\n"); fprintf(outmk, "\tcrunchide -k _crunched_%s_stub ", p->ident); for (lst = p->keeplist; lst != NULL; lst = lst->next) - fprintf(outmk, "-k _%s ", lst->str); + fprintf(outmk, "-k %s ", lst->str); fprintf(outmk, "%s.lo\n", p->name); }