从零开始,学习windows编程外篇(1)--分析lib文件

大家都知道,lib文件是很多obj文件合在一起得到的一个静态库文件。那某一个特定的lib文件,到底是由哪些obj文件组成的呢?

有一个工具可以帮到你,它的名字叫做lib.exe。

还是用LIBC.LIB来举例。我电脑上这个lib文件的位置是在“d:\Program Files\Microsoft Visual Studio\VC98\Lib\LIBC.LIB”,进入这个目录。

所有的lib使用选项:

d:\Program Files\Microsoft Visual Studio\VC98\Lib>lib /?
Microsoft (R) Library Manager Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

usage: LIB [options] [files]

   options:

      /CONVERT
      /DEBUGTYPE:CV
      /DEF[:filename]
      /EXPORT:symbol
      /EXTRACT:membername
      /INCLUDE:symbol
      /LIBPATH:dir
      /LINK50COMPAT
      /LIST[:filename]
      /MACHINE:{ALPHA|ARM|IX86|MIPS|MIPS16|MIPSR41XX|PPC|SH3|SH4}
      /NAME:filename
      /NODEFAULTLIB[:library]
      /NOLOGO
      /OUT:filename
      /REMOVE:membername
      /SUBSYSTEM:{NATIVE|WINDOWS|CONSOLE|WINDOWSCE|POSIX}[,#[.##]]
      /VERBOSE

可以使用list来显示其中的obj文件。

d:\Program Files\Microsoft Visual Studio\VC98\Lib>lib /list libc.lib

整个列表比较长,所以我又做了个重定向,将输入放到log文件中了。

d:\Program Files\Microsoft Visual Studio\VC98\Lib>lib /list libc.lib > d:\test\libc.log

最终输出有600多行,所以折叠起来,大家可以展开看。

Microsoft (R) Library Manager Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

..\build\intel\st_obj\util.obj
..\build\intel\st_obj\matherr.obj
..\build\intel\st_obj\ldexp.obj
..\build\intel\st_obj\ieeemisc.obj
..\build\intel\st_obj\frexp.obj
..\build\intel\st_obj\fpexcept.obj
..\build\intel\st_obj\bessel.obj
..\build\intel\st_obj\xmmi2_fp_emul.obj
..\build\intel\st_obj\xmmi_fp_emul.obj
..\build\intel\st_obj\sqrt.obj
..\build\intel\st_obj\pow.obj
..\build\intel\st_obj\log10.obj
..\build\intel\st_obj\log.obj
..\build\intel\st_obj\tan.obj
..\build\intel\st_obj\cos.obj
..\build\intel\st_obj\sin.obj
..\build\intel\st_obj\atan.obj
..\build\intel\st_obj\acos.obj
..\build\intel\st_obj\asin.obj
..\build\intel\st_obj\testfdiv.obj
..\build\intel\st_obj\powhlp.obj
..\build\intel\st_obj\modf.obj
..\build\intel\st_obj\ieee87.obj
..\build\intel\st_obj\hypot.obj
..\build\intel\st_obj\huge.obj
..\build\intel\st_obj\genexcep.obj
..\build\intel\st_obj\ftol.obj
..\build\intel\st_obj\fsqrt.obj
..\build\intel\st_obj\frnd.obj
..\build\intel\st_obj\fpctrl.obj
..\build\intel\st_obj\floor.obj
..\build\intel\st_obj\filter_simd.obj
..\build\intel\st_obj\filter.obj
..\build\intel\st_obj\fabs.obj
..\build\intel\st_obj\common.obj
..\build\intel\st_obj\ceil.obj
..\build\intel\st_obj\adj_fdiv.obj
..\build\intel\st_obj\87trigh.obj
..\build\intel\st_obj\87triga.obj
..\build\intel\st_obj\87trig.obj
..\build\intel\st_obj\87tran.obj
..\build\intel\st_obj\87sqrt.obj
..\build\intel\st_obj\87fmod.obj
..\build\intel\st_obj\87except.obj
..\build\intel\st_obj\87disp.obj
..\build\intel\st_obj\87ctrigh.obj
..\build\intel\st_obj\87ctriga.obj
..\build\intel\st_obj\87ctran.obj
..\build\intel\st_obj\87cdisp.obj
..\build\intel\st_obj\fltinf.obj
..\build\intel\st_obj\x10fout.obj
..\build\intel\st_obj\tenpow.obj
..\build\intel\st_obj\strgtold.obj
..\build\intel\st_obj\mantold.obj
..\build\intel\st_obj\intrncvt.obj
..\build\intel\st_obj\fpinit.obj
..\build\intel\st_obj\cvt.obj
..\build\intel\st_obj\constpow.obj
..\build\intel\st_obj\cfout.obj
..\build\intel\st_obj\cfin.obj
build\intel\st_obj\wutime.obj
build\intel\st_obj\wstrtime.obj
build\intel\st_obj\wstrdate.obj
build\intel\st_obj\wctime.obj
build\intel\st_obj\wasctime.obj
build\intel\st_obj\wcsftime.obj
build\intel\st_obj\utime.obj
build\intel\st_obj\tzset.obj
build\intel\st_obj\timeset.obj
build\intel\st_obj\time.obj
build\intel\st_obj\systime.obj
build\intel\st_obj\strtime.obj
build\intel\st_obj\strdate.obj
build\intel\st_obj\strftime.obj
build\intel\st_obj\mktime.obj
build\intel\st_obj\localtim.obj
build\intel\st_obj\gmtime.obj
build\intel\st_obj\ftime.obj
build\intel\st_obj\dtoxtime.obj
build\intel\st_obj\difftime.obj
build\intel\st_obj\days.obj
build\intel\st_obj\ctime.obj
build\intel\st_obj\clock.obj
build\intel\st_obj\asctime.obj
build\intel\st_obj\tcmap\mbslen.obj
build\intel\st_obj\tcmap\nset.obj
build\intel\st_obj\tcmap\nicoll.obj
build\intel\st_obj\tcmap\nicmp.obj
build\intel\st_obj\tcmap\ncpy.obj
build\intel\st_obj\tcmap\ncoll.obj
build\intel\st_obj\tcmap\ncmp.obj
build\intel\st_obj\tcmap\ncat.obj
build\intel\st_obj\tcmap\nbset.obj
build\intel\st_obj\tcmap\nbicoll.obj
build\intel\st_obj\tcmap\nbicmp.obj
build\intel\st_obj\tcmap\nbcpy.obj
build\intel\st_obj\tcmap\nbcoll.obj
build\intel\st_obj\tcmap\nbcmp.obj
build\intel\st_obj\tcmap\nbcat.obj
build\intel\st_obj\tcmap\_mbscpy.obj
build\intel\st_obj\tcmap\_mbclen.obj
build\intel\st_obj\tcmap\len.obj
build\intel\st_obj\tcmap\icoll.obj
build\intel\st_obj\tcmap\coll.obj
build\intel\st_obj\tcmap\icmp.obj
build\intel\st_obj\tcmap\cmp.obj
build\intel\st_obj\tcmap\upr.obj
build\intel\st_obj\tcmap\lwr.obj
build\intel\st_obj\tcmap\spnp.obj
build\intel\st_obj\tcmap\ninc.obj
build\intel\st_obj\tcmap\nextc.obj
build\intel\st_obj\tcmap\nccnt.obj
build\intel\st_obj\tcmap\nbcnt.obj
build\intel\st_obj\tcmap\inc.obj
build\intel\st_obj\tcmap\dec.obj
build\intel\st_obj\tcmap\set.obj
build\intel\st_obj\tcmap\rev.obj
build\intel\st_obj\tcmap\tok.obj
build\intel\st_obj\tcmap\str.obj
build\intel\st_obj\tcmap\spn.obj
build\intel\st_obj\tcmap\rchr.obj
build\intel\st_obj\tcmap\pbrk.obj
build\intel\st_obj\tcmap\cspn.obj
build\intel\st_obj\tcmap\chr.obj
build\intel\st_obj\wcsxfrm.obj
build\intel\st_obj\wcsupr.obj
build\intel\st_obj\wcstok.obj
build\intel\st_obj\wcsstr.obj
build\intel\st_obj\wcsspn.obj
build\intel\st_obj\wcsset.obj
build\intel\st_obj\wcsrev.obj
build\intel\st_obj\wcsrchr.obj
build\intel\st_obj\wcspbrk.obj
build\intel\st_obj\wcsnset.obj
build\intel\st_obj\wcsnicol.obj
build\intel\st_obj\wcsnicmp.obj
build\intel\st_obj\wcsncpy.obj
build\intel\st_obj\wcsncoll.obj
build\intel\st_obj\wcsncmp.obj
build\intel\st_obj\wcsncat.obj
build\intel\st_obj\wcslwr.obj
build\intel\st_obj\wcslen.obj
build\intel\st_obj\wcsicoll.obj
build\intel\st_obj\wcsicmp.obj
build\intel\st_obj\wcsdup.obj
build\intel\st_obj\wcscspn.obj
build\intel\st_obj\wcscoll.obj
build\intel\st_obj\wcscmp.obj
build\intel\st_obj\wcschr.obj
build\intel\st_obj\wcscat.obj
build\intel\st_obj\strxfrm.obj
build\intel\st_obj\strupr.obj
build\intel\st_obj\strtok.obj
build\intel\st_obj\strnicol.obj
build\intel\st_obj\strncoll.obj
build\intel\st_obj\strlwr.obj
build\intel\st_obj\stricoll.obj
build\intel\st_obj\strcoll.obj
build\intel\st_obj\strstr.obj
build\intel\st_obj\strspn.obj
build\intel\st_obj\strset.obj
build\intel\st_obj\strrev.obj
build\intel\st_obj\strrchr.obj
build\intel\st_obj\strpbrk.obj
build\intel\st_obj\strnset.obj
build\intel\st_obj\strnicmp.obj
build\intel\st_obj\strncpy.obj
build\intel\st_obj\strncmp.obj
build\intel\st_obj\strncat.obj
build\intel\st_obj\strlen.obj
build\intel\st_obj\stricmp.obj
build\intel\st_obj\strdup.obj
build\intel\st_obj\strcspn.obj
build\intel\st_obj\strcmp.obj
build\intel\st_obj\strchr.obj
build\intel\st_obj\strcat.obj
build\intel\st_obj\memset.obj
build\intel\st_obj\memmove.obj
build\intel\st_obj\memicmp.obj
build\intel\st_obj\memccpy.obj
build\intel\st_obj\memcmp.obj
build\intel\st_obj\memchr.obj
build\intel\st_obj\memcpy.obj
build\intel\st_obj\ncommode.obj
build\intel\st_obj\wtmpfile.obj
build\intel\st_obj\wtempnam.obj
build\intel\st_obj\wscanf.obj
build\intel\st_obj\wprintf.obj
build\intel\st_obj\wpopen.obj
build\intel\st_obj\woutput.obj
build\intel\st_obj\_wopen.obj
build\intel\st_obj\winput.obj
build\intel\st_obj\wfreopen.obj
build\intel\st_obj\wfopen.obj
build\intel\st_obj\wfdopen.obj
build\intel\st_obj\vwprintf.obj
build\intel\st_obj\vswprint.obj
build\intel\st_obj\vsnwprnt.obj
build\intel\st_obj\vsnprint.obj
build\intel\st_obj\vsprintf.obj
build\intel\st_obj\vfwprint.obj
build\intel\st_obj\vfprintf.obj
build\intel\st_obj\vprintf.obj
build\intel\st_obj\ungetwc.obj
build\intel\st_obj\ungetc.obj
build\intel\st_obj\tmpfile.obj
build\intel\st_obj\tempnam.obj
build\intel\st_obj\swscanf.obj
build\intel\st_obj\swprintf.obj
build\intel\st_obj\stream.obj
build\intel\st_obj\sscanf.obj
build\intel\st_obj\sprintf.obj
build\intel\st_obj\snwprint.obj
build\intel\st_obj\snprintf.obj
build\intel\st_obj\setvbuf.obj
build\intel\st_obj\setbuf.obj
build\intel\st_obj\setmaxf.obj
build\intel\st_obj\scanf.obj
build\intel\st_obj\rmtmp.obj
build\intel\st_obj\rewind.obj
build\intel\st_obj\putws.obj
build\intel\st_obj\putw.obj
build\intel\st_obj\puts.obj
build\intel\st_obj\printf.obj
build\intel\st_obj\popen.obj
build\intel\st_obj\output.obj
build\intel\st_obj\input.obj
build\intel\st_obj\getws.obj
build\intel\st_obj\getw.obj
build\intel\st_obj\gets.obj
build\intel\st_obj\fwscanf.obj
build\intel\st_obj\fwrite.obj
build\intel\st_obj\fwprintf.obj
build\intel\st_obj\ftelli64.obj
build\intel\st_obj\ftell.obj
build\intel\st_obj\fsetpos.obj
build\intel\st_obj\fseeki64.obj
build\intel\st_obj\fseek.obj
build\intel\st_obj\fscanf.obj
build\intel\st_obj\freopen.obj
build\intel\st_obj\fread.obj
build\intel\st_obj\fprintf.obj
build\intel\st_obj\fopen.obj
build\intel\st_obj\fgetpos.obj
build\intel\st_obj\fflush.obj
build\intel\st_obj\fdopen.obj
build\intel\st_obj\fclose.obj
build\intel\st_obj\cscanf.obj
build\intel\st_obj\cprintf.obj
build\intel\st_obj\closeall.obj
build\intel\st_obj\clearerr.obj
build\intel\st_obj\_sftbuf.obj
build\intel\st_obj\_open.obj
build\intel\st_obj\_getbuf.obj
build\intel\st_obj\_freebuf.obj
build\intel\st_obj\_flswbuf.obj
build\intel\st_obj\_flsbuf.obj
build\intel\st_obj\_file.obj
build\intel\st_obj\_filwbuf.obj
build\intel\st_obj\_filbuf.obj
build\intel\st_obj\fputwchr.obj
build\intel\st_obj\fputws.obj
build\intel\st_obj\fputwc.obj
build\intel\st_obj\fputchar.obj
build\intel\st_obj\fputs.obj
build\intel\st_obj\fputc.obj
build\intel\st_obj\fileno.obj
build\intel\st_obj\fgetwchr.obj
build\intel\st_obj\fgetws.obj
build\intel\st_obj\fgetwc.obj
build\intel\st_obj\fgets.obj
build\intel\st_obj\fgetchar.obj
build\intel\st_obj\fgetc.obj
build\intel\st_obj\feoferr.obj
build\intel\st_obj\fp8.obj
build\intel\st_obj\atlssup.obj
build\intel\st_obj\wwincrt0.obj
build\intel\st_obj\wwild.obj
build\intel\st_obj\wwncmdln.obj
build\intel\st_obj\wstdenvp.obj
build\intel\st_obj\wstdargv.obj
build\intel\st_obj\wincrt0.obj
build\intel\st_obj\wincmdln.obj
build\intel\st_obj\wild.obj
build\intel\st_obj\wcrt0.obj
build\intel\st_obj\tlssup.obj
build\intel\st_obj\tidtable.obj
build\intel\st_obj\threadex.obj
build\intel\st_obj\thread.obj
build\intel\st_obj\stdenvp.obj
build\intel\st_obj\stdargv.obj
build\intel\st_obj\mlock.obj
build\intel\st_obj\dllmain.obj
build\intel\st_obj\dllcrt0.obj
build\intel\st_obj\crt0msg.obj
build\intel\st_obj\crt0init.obj
build\intel\st_obj\crt0fp.obj
build\intel\st_obj\crt0dat.obj
build\intel\st_obj\crt0.obj
build\intel\st_obj\chkstk.obj
build\intel\st_obj\_wstargv.obj
build\intel\st_obj\_setargv.obj
build\intel\st_obj\wtombenv.obj
build\intel\st_obj\wrt2err.obj
build\intel\st_obj\wsplitpa.obj
build\intel\st_obj\wsetloca.obj
build\intel\st_obj\wsetenv.obj
build\intel\st_obj\wsearche.obj
build\intel\st_obj\wputenv.obj
build\intel\st_obj\wperror.obj
build\intel\st_obj\wmakepat.obj
build\intel\st_obj\wgetpath.obj
build\intel\st_obj\wgetenv.obj
build\intel\st_obj\winxfltr.obj
build\intel\st_obj\winsig.obj
build\intel\st_obj\w_str.obj
build\intel\st_obj\w_map.obj
build\intel\st_obj\w_loc.obj
build\intel\st_obj\w_env.obj
build\intel\st_obj\w_cmp.obj
build\intel\st_obj\umask.obj
build\intel\st_obj\syserr.obj
build\intel\st_obj\strerror.obj
build\intel\st_obj\_strerr.obj
build\intel\st_obj\splitpat.obj
build\intel\st_obj\setlocal.obj
build\intel\st_obj\setenv.obj
build\intel\st_obj\searchen.obj
build\intel\st_obj\rotr.obj
build\intel\st_obj\rotl.obj
build\intel\st_obj\rand.obj
build\intel\st_obj\qsort.obj
build\intel\st_obj\putenv.obj
build\intel\st_obj\purevirt.obj
build\intel\st_obj\perror.obj
build\intel\st_obj\nlsdata3.obj
build\intel\st_obj\nlsdata2.obj
build\intel\st_obj\nlsdata1.obj
build\intel\st_obj\onexit.obj
build\intel\st_obj\mbtowenv.obj
build\intel\st_obj\makepath.obj
build\intel\st_obj\lsearch.obj
build\intel\st_obj\lfind.obj
build\intel\st_obj\ldiv.obj
build\intel\st_obj\lconv.obj
build\intel\st_obj\lcnvinit.obj
build\intel\st_obj\labs.obj
build\intel\st_obj\inittime.obj
build\intel\st_obj\initnum.obj
build\intel\st_obj\initmon.obj
build\intel\st_obj\inithelp.obj
build\intel\st_obj\initctyp.obj
build\intel\st_obj\initcoll.obj
build\intel\st_obj\getqloc.obj
build\intel\st_obj\getpath.obj
build\intel\st_obj\getenv.obj
build\intel\st_obj\errmode.obj
build\intel\st_obj\dbgrpt.obj
build\intel\st_obj\dbgnew.obj
build\intel\st_obj\dbgdel.obj
build\intel\st_obj\dbghook.obj
build\intel\st_obj\dbgheap.obj
build\intel\st_obj\div.obj
build\intel\st_obj\ctype.obj
build\intel\st_obj\crtmbox.obj
build\intel\st_obj\cmiscdat.obj
build\intel\st_obj\charmax.obj
build\intel\st_obj\bsearch.obj
build\intel\st_obj\aw_com.obj
build\intel\st_obj\assert.obj
build\intel\st_obj\abs.obj
build\intel\st_obj\abort.obj
build\intel\st_obj\a_str.obj
build\intel\st_obj\a_map.obj
build\intel\st_obj\a_loc.obj
build\intel\st_obj\a_env.obj
build\intel\st_obj\a_cmp.obj
build\intel\st_obj\setjmpex.obj
build\intel\st_obj\setjmp3.obj
build\intel\st_obj\setjmp.obj
build\intel\st_obj\sehsupp.obj
build\intel\st_obj\longjmp.obj
build\intel\st_obj\exsup3.obj
build\intel\st_obj\exsup2.obj
build\intel\st_obj\exsup.obj
build\intel\st_obj\chkesp.obj
build\intel\st_obj\tombbmbc.obj
build\intel\st_obj\tojisjms.obj
build\intel\st_obj\mbtoupr.obj
build\intel\st_obj\mbtolwr.obj
build\intel\st_obj\mbtokata.obj
build\intel\st_obj\mbtohira.obj
build\intel\st_obj\mbsupr.obj
build\intel\st_obj\mbstok.obj
build\intel\st_obj\mbsstr.obj
build\intel\st_obj\mbsspnp.obj
build\intel\st_obj\mbsspn.obj
build\intel\st_obj\mbsset.obj
build\intel\st_obj\mbsrev.obj
build\intel\st_obj\mbsrchr.obj
build\intel\st_obj\mbspbrk.obj
build\intel\st_obj\mbsnset.obj
build\intel\st_obj\mbsninc.obj
build\intel\st_obj\mbsnicol.obj
build\intel\st_obj\mbsnicmp.obj
build\intel\st_obj\mbsnextc.obj
build\intel\st_obj\mbsncpy.obj
build\intel\st_obj\mbsncoll.obj
build\intel\st_obj\mbsncmp.obj
build\intel\st_obj\mbsnccnt.obj
build\intel\st_obj\mbsncat.obj
build\intel\st_obj\mbsnbset.obj
build\intel\st_obj\mbsnbico.obj
build\intel\st_obj\mbsnbicm.obj
build\intel\st_obj\mbsnbcpy.obj
build\intel\st_obj\mbsnbcol.obj
build\intel\st_obj\mbsnbcnt.obj
build\intel\st_obj\mbsnbcmp.obj
build\intel\st_obj\mbsnbcat.obj
build\intel\st_obj\mbslwr.obj
build\intel\st_obj\mbslen.obj
build\intel\st_obj\mbsinc.obj
build\intel\st_obj\mbsicoll.obj
build\intel\st_obj\mbsicmp.obj
build\intel\st_obj\mbsdec.obj
build\intel\st_obj\mbscspn.obj
build\intel\st_obj\mbscoll.obj
build\intel\st_obj\mbscmp.obj
build\intel\st_obj\mbschr.obj
build\intel\st_obj\mbsbtype.obj
build\intel\st_obj\mbctype.obj
build\intel\st_obj\mbclevel.obj
build\intel\st_obj\mbclen.obj
build\intel\st_obj\mbccpy.obj
build\intel\st_obj\mbbtype.obj
build\intel\st_obj\ismbupr.obj
build\intel\st_obj\ismbstr.obj
build\intel\st_obj\ismbspc.obj
build\intel\st_obj\ismbsle.obj
build\intel\st_obj\ismbpunc.obj
build\intel\st_obj\ismbprn.obj
build\intel\st_obj\ismblwr.obj
build\intel\st_obj\ismblgl.obj
build\intel\st_obj\ismbknj.obj
build\intel\st_obj\ismbgrph.obj
build\intel\st_obj\ismbdgt.obj
build\intel\st_obj\ismbbyte.obj
build\intel\st_obj\ismbalph.obj
build\intel\st_obj\ismbalnm.obj
build\intel\st_obj\mbsdup.obj
build\intel\st_obj\mbscat.obj
build\intel\st_obj\wopen.obj
build\intel\st_obj\outp.obj
build\intel\st_obj\inp.obj
build\intel\st_obj\wmktemp.obj
build\intel\st_obj\wcreat.obj
build\intel\st_obj\putch.obj
build\intel\st_obj\getch.obj
build\intel\st_obj\cputs.obj
build\intel\st_obj\cgets.obj
build\intel\st_obj\write.obj
build\intel\st_obj\txtmode.obj
build\intel\st_obj\telli64.obj
build\intel\st_obj\tell.obj
build\intel\st_obj\setmode.obj
build\intel\st_obj\read.obj
build\intel\st_obj\pipe.obj
build\intel\st_obj\osfinfo.obj
build\intel\st_obj\open.obj
build\intel\st_obj\mktemp.obj
build\intel\st_obj\lseeki64.obj
build\intel\st_obj\lseek.obj
build\intel\st_obj\locking.obj
build\intel\st_obj\isatty.obj
build\intel\st_obj\ioinit.obj
build\intel\st_obj\initcon.obj
build\intel\st_obj\fstati64.obj
build\intel\st_obj\fstat.obj
build\intel\st_obj\fleni64.obj
build\intel\st_obj\flength.obj
build\intel\st_obj\eof.obj
build\intel\st_obj\dup2.obj
build\intel\st_obj\dup.obj
build\intel\st_obj\creat.obj
build\intel\st_obj\commit.obj
build\intel\st_obj\close.obj
build\intel\st_obj\chsize.obj
build\intel\st_obj\ullshr.obj
build\intel\st_obj\ullrem.obj
build\intel\st_obj\ulldiv.obj
build\intel\st_obj\llshr.obj
build\intel\st_obj\llshl.obj
build\intel\st_obj\llrem.obj
build\intel\st_obj\llmul.obj
build\intel\st_obj\lldiv.obj
build\intel\st_obj\new.obj
build\intel\st_obj\_newmode.obj
build\intel\st_obj\delete.obj
build\intel\st_obj\new_mode.obj
build\intel\st_obj\setnewh.obj
build\intel\st_obj\handler.obj
build\intel\st_obj\sbheap.obj
build\intel\st_obj\realloc.obj
build\intel\st_obj\msize.obj
build\intel\st_obj\malloc.obj
build\intel\st_obj\heapwalk.obj
build\intel\st_obj\heapused.obj
build\intel\st_obj\hpabort.obj
build\intel\st_obj\heapmin.obj
build\intel\st_obj\heapinit.obj
build\intel\st_obj\heapchk.obj
build\intel\st_obj\heapadd.obj
build\intel\st_obj\free.obj
build\intel\st_obj\expand.obj
build\intel\st_obj\calloc.obj
build\intel\st_obj\align.obj
build\intel\st_obj\wsystem.obj
build\intel\st_obj\wspwnvpe.obj
build\intel\st_obj\wspawnvp.obj
build\intel\st_obj\wspawnve.obj
build\intel\st_obj\wspawnv.obj
build\intel\st_obj\wspwnlpe.obj
build\intel\st_obj\wspawnlp.obj
build\intel\st_obj\wspawnle.obj
build\intel\st_obj\wspawnl.obj
build\intel\st_obj\wexecvpe.obj
build\intel\st_obj\wexecvp.obj
build\intel\st_obj\wexecve.obj
build\intel\st_obj\wexecv.obj
build\intel\st_obj\wexeclpe.obj
build\intel\st_obj\wexeclp.obj
build\intel\st_obj\wexecle.obj
build\intel\st_obj\wexecl.obj
build\intel\st_obj\wdospawn.obj
build\intel\st_obj\wcenvarg.obj
build\intel\st_obj\wait.obj
build\intel\st_obj\system.obj
build\intel\st_obj\spawnvpe.obj
build\intel\st_obj\spawnvp.obj
build\intel\st_obj\spawnve.obj
build\intel\st_obj\spawnv.obj
build\intel\st_obj\spawnlpe.obj
build\intel\st_obj\spawnlp.obj
build\intel\st_obj\spawnle.obj
build\intel\st_obj\spawnl.obj
build\intel\st_obj\loaddll.obj
build\intel\st_obj\getproc.obj
build\intel\st_obj\execvpe.obj
build\intel\st_obj\execvp.obj
build\intel\st_obj\execve.obj
build\intel\st_obj\execv.obj
build\intel\st_obj\execlpe.obj
build\intel\st_obj\execlp.obj
build\intel\st_obj\execle.obj
build\intel\st_obj\execl.obj
build\intel\st_obj\dospawn.obj
build\intel\st_obj\fileinfo.obj
build\intel\st_obj\cenvarg.obj
build\intel\st_obj\typname.obj
build\intel\st_obj\typinfo.obj
build\intel\st_obj\stdexcpt.obj
build\intel\st_obj\rtti.obj
build\intel\st_obj\undname.obj
build\intel\st_obj\ehvecdtr.obj
build\intel\st_obj\ehveccvb.obj
build\intel\st_obj\ehvecctr.obj
build\intel\st_obj\validate.obj
build\intel\st_obj\user.obj
build\intel\st_obj\unhandld.obj
build\intel\st_obj\throw.obj
build\intel\st_obj\hooks.obj
build\intel\st_obj\frame.obj
build\intel\st_obj\ehprolog2.obj
build\intel\st_obj\ehprolog.obj
build\intel\st_obj\lowhelpr.obj
build\intel\st_obj\trnsctrl.obj
build\intel\st_obj\wunlink.obj
build\intel\st_obj\wstati64.obj
build\intel\st_obj\wstat.obj
build\intel\st_obj\wrmdir.obj
build\intel\st_obj\wrename.obj
build\intel\st_obj\wmkdir.obj
build\intel\st_obj\wgetcwd.obj
build\intel\st_obj\wfullpat.obj
build\intel\st_obj\wchmod.obj
build\intel\st_obj\wchdir.obj
build\intel\st_obj\waccess.obj
build\intel\st_obj\unlink.obj
build\intel\st_obj\stati64.obj
build\intel\st_obj\stat.obj
build\intel\st_obj\rmdir.obj
build\intel\st_obj\rename.obj
build\intel\st_obj\mterrno.obj
build\intel\st_obj\mkdir.obj
build\intel\st_obj\getpid.obj
build\intel\st_obj\getcwd.obj
build\intel\st_obj\fullpath.obj
build\intel\st_obj\drive.obj
build\intel\st_obj\dosmap.obj
build\intel\st_obj\chdir.obj
build\intel\st_obj\chmod.obj
build\intel\st_obj\access.obj
build\intel\st_obj\wfndfi64.obj
build\intel\st_obj\wfindfil.obj
build\intel\st_obj\enable.obj
build\intel\st_obj\slbeep.obj
build\intel\st_obj\seterrm.obj
build\intel\st_obj\findfi64.obj
build\intel\st_obj\findfile.obj
build\intel\st_obj\drivfree.obj
build\intel\st_obj\drivemap.obj
build\intel\st_obj\xtow.obj
build\intel\st_obj\xtoa.obj
build\intel\st_obj\wtox.obj
build\intel\st_obj\wctomb.obj
build\intel\st_obj\wcstombs.obj
build\intel\st_obj\wcstol.obj
build\intel\st_obj\wcstod.obj
build\intel\st_obj\towupper.obj
build\intel\st_obj\towlower.obj
build\intel\st_obj\toupper.obj
build\intel\st_obj\tolower.obj
build\intel\st_obj\swab.obj
build\intel\st_obj\strtol.obj
build\intel\st_obj\strtod.obj
build\intel\st_obj\mbtowc.obj
build\intel\st_obj\mbstowcs.obj
build\intel\st_obj\mblen.obj
build\intel\st_obj\iswctype.obj
build\intel\st_obj\isctype.obj
build\intel\st_obj\gcvt.obj
build\intel\st_obj\fcvt.obj
build\intel\st_obj\atox.obj
build\intel\st_obj\atof.obj
build\intel\st_obj\_wctype.obj
build\intel\st_obj\_mbslen.obj
build\intel\st_obj\_fptostr.obj
build\intel\st_obj\_ctype.obj

从这里也可以看出,所有合在里面的obj文件,都是在/build/intel/st_obj/目录下面的。也就验证了libc.lib是给单线程静态库使用的说法。

另外,使用lib命令还可以将需要的obj文件从lib文件中分离出来。这里解压的时候,最好是先将lib文件拷贝到一个临时目录下,不要放在VC原来的lib目录下操作。我这里放在d:\test目录进行。目标是解出一个crt0.obj文件。

D:\test>lib /EXTRACT:build\intel\st_obj\crt0.obj libc.lib
Microsoft (R) Library Manager Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

之后,就可以用dumpbin来观察解出来的obj文件了。

D:\test>dumpbin crt0.obj
Microsoft (R) COFF Binary File Dumper Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Dump of file crt0.obj

File Type: COFF OBJECT

  Summary

           C .bss
           8 .data
          20 .debug$F
           C .rdata
         128 .text

这里使用/all选项出来的内容过多,大家可以自己去看输出,这里就不贴出来了。只是提供一个思路和方法。

另外,使用dumpbin命令,还可以看到lib文件中的函数,具体可以用linkermember选项。

D:\test>dumpbin /linkermember libc.lib>func.log

同样因为内容过多,大家还是自己去看,可以找一下_mainCRTStartup。

注意:

第8行,第1850行,第4334行有一个分隔。

转载于:https://www.cnblogs.com/cnyao/archive/2011/06/21/win32sdk_o1.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值