Which library contans the malloc object code and what is the name of the main library that C links to?
Ray Hurst
rhurst2@cox.net
Fri Apr 20 20:20:00 GMT 2007
Ian Lance Taylor wrote:
> Ray Hurst <rhurst2@cox.net> writes:
>
>> Which library contains the malloc object code?
>
> Normally the C library.
>
>> What is the name of the main C library the gcc links to?
>
> libc. Often named /usr/lib/libc.a and/or /usr/lib/libc.so.
>
> On a GNU/Linux system, the C library is glibc; see
> http://sourceware.org/glibc/.
>
> Ian
>
Thanks for the info. How do I display the contents of libc.a.
I tried ar -t libc.a and malloc did not show up.
However, if I open lib.c with a hex editor I can see that the symbol
__malloc exitst is libc.a
Ray
More information about the Gcc-help
mailing list