Use a ndis_ prefix on the C variable instead of directly using the .sys

filename, this would fail if the filename started with a number.

PR:		bin/84911
Submitted by:	Fredrik Lindberg
This commit is contained in:
Andrew Thompson 2008-04-15 04:17:13 +00:00
parent c4738b2d88
commit 19c3793335
2 changed files with 7 additions and 7 deletions

View File

@ -207,9 +207,9 @@ bincvt(char *sysfile, char *outfile, void *img, int fsize)
}
snprintf(sysbuf, sizeof(sysbuf),
"objcopy --redefine-sym _binary_%s_start=%s_drv_data_start "
"objcopy --redefine-sym _binary_%s_start=ndis_%s_drv_data_start "
"--strip-symbol _binary_%s_size "
"--redefine-sym _binary_%s_end=%s_drv_data_end %s.o %s.o\n",
"--redefine-sym _binary_%s_end=ndis_%s_drv_data_end %s.o %s.o\n",
tname, sysfile, tname, tname, sysfile, outfile, outfile);
printf("%s", sysbuf);
system(sysbuf);
@ -384,10 +384,10 @@ main(int argc, char *argv[])
ptr++;
}
fprintf(outfp,
"\nextern unsigned char %s_drv_data_start[];\n",
"\nextern unsigned char ndis_%s_drv_data_start[];\n",
sysfile);
fprintf(outfp, "static unsigned char *drv_data = "
"%s_drv_data_start;\n\n", sysfile);
"ndis_%s_drv_data_start;\n\n", sysfile);
bincvt(sysfile, outfile, img, fsize);
goto done;
}

View File

@ -414,9 +414,9 @@ echo "KMOD= ${SYSBASE}" >> ${MAKEFILE}
echo "SRCS+= ${STUBFILE} ${DNAME}.h bus_if.h device_if.h" >> ${MAKEFILE}
echo "OBJS+=${FRMLIST} ${DNAME}.o" >> ${MAKEFILE}
echo "CFLAGS+= \\" >> ${MAKEFILE}
echo " -DDRV_DATA_START=${SYSBASE}_drv_data_start \\" >> ${MAKEFILE}
echo " -DDRV_NAME=${SYSBASE} \\" >> ${MAKEFILE}
echo " -DDRV_DATA_END=${SYSBASE}_drv_data_end" >> ${MAKEFILE}
echo " -DDRV_DATA_START=ndis_${SYSBASE}_drv_data_start \\" >> ${MAKEFILE}
echo " -DDRV_NAME=ndis_${SYSBASE} \\" >> ${MAKEFILE}
echo " -DDRV_DATA_END=ndis_${SYSBASE}_drv_data_end" >> ${MAKEFILE}
echo "CLEANFILES+= \\" >> ${MAKEFILE}
echo " ${INFFILE} \\" >> ${MAKEFILE}
echo " ${DNAME}.h \\" >> ${MAKEFILE}