Mail Archives: djgpp/1996/07/20/21:55:03
Reply to message 2939452 from NTCOLLIE AT MIDW on 07/19/96 9:08PM
>How do I view the asm source of library functions. For example, if I have some
>function that calls memset and compile it with -S the assembly source merely
>says "call _memset" when I want to see the asm source of memset. Is there a
>another command line switch or a source file I can look at.
Well, the library code is (ta-dum!) contained in the libraries, and as such
isn't actually linked until the compiler calls ld. I suppose you could
extract the object files from libc.a and disassemble them, but a much
easier way would be to download the library sources (djlsr200.zip)
and paw through them to find memset. I just checked, and you can
find 'memset.s' in '<DJGPP>/src/libc/ansi/string'. (<DJGPP> is your
DJGPP dir.)
Warning: the sources take about 10 megs unzipped, partially because
of cluster size. :) Alternatively, I could simply email it to you if you
like.
However, I recommend getting the whole source distribution because
it can be enormously helpful.
John
P.S.: In case you're wondering the command I used to locate memset
was this:
<in the SRC directory>
C:\DJGPP\SRC> find . -type d -exec grep "memset" {}/*.* ;
Find and grep are enormously useful for this sort of thing; if you want
them, look for find??b.zip and grep??b.zip in the v2gnu directory.
- Raw text -