This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE:about gcc -XLinker -M


for example,

I want to locate the which lib is linked for fprintf 
vvvvvvvvvvvvvvvvv===test.c===vvvvvvvvvvvvvvvvvvvvvvvvv
#include <stdio.h>
main()
{
doit();
}
doit()
{
fprintf(stderr,"==");
}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I run
gcc -Xlinker -M test.c 2>map
vvvvvvvvvvvvvvvvvvvvv===map===vvvvvvvvvvvvvvvvvvvvvvvvv
...
.plt     0x0804826c 0x30
 *(.plt)
 .plt    0x0804826c 0x30 /usr/lib/crt1.o
         0x0804827c       fprintf@@GLIBC_2.0
         00804828c        __libc_start_main@@GLIBC_2.0
...
^^^^^^I remove some blank for better display
here^^^^^^
rpm -qf /usr/lib/crt1.o 
tell me it belong to glibc
But 
nm /usr/lib/crt1.o | grep fprint
can't find it.

I also find 
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Archive member included because of file (symbol)
                                                      
                               
/usr/lib/libc_nonshared.a(elf-init.oS)
                   /usr/lib/crt1.o (__libc_csu_init)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at the map file. Is there some information it
indicate?

Thanks for any comment
gan




                                                      
                               





		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]